diff --git a/api/agent/agent.go b/api/agent/agent.go
index d50a66643..55009c518 100644
--- a/api/agent/agent.go
+++ b/api/agent/agent.go
@@ -173,7 +173,7 @@ func (a *agent) Submit(callI Call) error {
default:
}
- a.stats.Enqueue()
+ a.stats.Enqueue(callI.Model().Path)
call := callI.(*call)
ctx := call.req.Context()
@@ -188,6 +188,7 @@ func (a *agent) Submit(callI Call) error {
slot, err := a.getSlot(ctx, call) // find ram available / running
if err != nil {
+ a.stats.Dequeue(callI.Model().Path)
return err
}
// TODO if the call times out & container is created, we need
@@ -197,16 +198,17 @@ func (a *agent) Submit(callI Call) error {
// TODO Start is checking the timer now, we could do it here, too.
err = call.Start(ctx)
if err != nil {
+ a.stats.Dequeue(callI.Model().Path)
return err
}
- a.stats.Start()
+ a.stats.Start(callI.Model().Path)
err = slot.exec(ctx, call)
// pass this error (nil or otherwise) to end directly, to store status, etc
// End may rewrite the error or elect to return it
- a.stats.Complete()
+ a.stats.Complete(callI.Model().Path)
// TODO: we need to allocate more time to store the call + logs in case the call timed out,
// but this could put us over the timeout if the call did not reply yet (need better policy).
diff --git a/api/agent/stats.go b/api/agent/stats.go
index 3dc4f08ac..c8a70866a 100644
--- a/api/agent/stats.go
+++ b/api/agent/stats.go
@@ -6,36 +6,83 @@ import "sync"
// * hot containers active
// * memory used / available
+// global statistics
type stats struct {
- mu sync.Mutex
+ mu sync.Mutex
+ // statistics for all functions combined
+ queue uint64
+ running uint64
+ complete uint64
+ // statistics for individual functions, keyed by function path
+ functionStatsMap map[string]*functionStats
+}
+
+// statistics for an individual function
+type functionStats struct {
queue uint64
running uint64
complete uint64
}
type Stats struct {
+ // statistics for all functions combined
+ Queue uint64
+ Running uint64
+ Complete uint64
+ // statistics for individual functions, keyed by function path
+ FunctionStatsMap map[string]*FunctionStats
+}
+
+// statistics for an individual function
+type FunctionStats struct {
Queue uint64
Running uint64
Complete uint64
}
-func (s *stats) Enqueue() {
+func (s *stats) getStatsForFunction(path string) *functionStats {
+ if s.functionStatsMap == nil {
+ s.functionStatsMap = make(map[string]*functionStats)
+ }
+ thisFunctionStats, found := s.functionStatsMap[path]
+ if !found {
+ thisFunctionStats = &functionStats{}
+ s.functionStatsMap[path] = thisFunctionStats
+ }
+
+ return thisFunctionStats
+}
+
+func (s *stats) Enqueue(path string) {
s.mu.Lock()
s.queue++
+ s.getStatsForFunction(path).queue++
s.mu.Unlock()
}
-func (s *stats) Start() {
+// Call when a function has been queued but cannot be started because of an error
+func (s *stats) Dequeue(path string) {
s.mu.Lock()
s.queue--
- s.running++
+ s.getStatsForFunction(path).queue--
s.mu.Unlock()
}
-func (s *stats) Complete() {
+func (s *stats) Start(path string) {
+ s.mu.Lock()
+ s.queue--
+ s.getStatsForFunction(path).queue--
+ s.running++
+ s.getStatsForFunction(path).running++
+ s.mu.Unlock()
+}
+
+func (s *stats) Complete(path string) {
s.mu.Lock()
s.running--
+ s.getStatsForFunction(path).running--
s.complete++
+ s.getStatsForFunction(path).complete++
s.mu.Unlock()
}
@@ -45,6 +92,11 @@ func (s *stats) Stats() Stats {
stats.Running = s.running
stats.Complete = s.complete
stats.Queue = s.queue
+ stats.FunctionStatsMap = make(map[string]*FunctionStats)
+ for key, value := range s.functionStatsMap {
+ thisFunctionStats := &FunctionStats{Queue: value.queue, Running: value.running, Complete: value.complete}
+ stats.FunctionStatsMap[key] = thisFunctionStats
+ }
s.mu.Unlock()
return stats
}
diff --git a/api/server/server.go b/api/server/server.go
index cd7cf5978..fdb38168a 100644
--- a/api/server/server.go
+++ b/api/server/server.go
@@ -50,7 +50,7 @@ type Server struct {
}
// NewFromEnv creates a new Functions server based on env vars.
-func NewFromEnv(ctx context.Context) *Server {
+func NewFromEnv(ctx context.Context, opts ...ServerOption) *Server {
ds, err := datastore.New(viper.GetString(EnvDBURL))
if err != nil {
logrus.WithError(err).Fatalln("Error initializing datastore.")
@@ -69,7 +69,7 @@ func NewFromEnv(ctx context.Context) *Server {
}
}
- return New(ctx, ds, mq, logDB)
+ return New(ctx, ds, mq, logDB, opts...)
}
// New creates a new Functions server with the passed in datastore, message queue and API URL
diff --git a/api/server/server_options.go b/api/server/server_options.go
index b3ed708a2..159636a4b 100644
--- a/api/server/server_options.go
+++ b/api/server/server_options.go
@@ -1,6 +1,12 @@
package server
-import "context"
+import (
+ "context"
+ "fmt"
+ "net/http"
+
+ "github.com/gin-gonic/gin"
+)
type ServerOption func(*Server)
@@ -9,3 +15,38 @@ func EnableShutdownEndpoint(halt context.CancelFunc) ServerOption {
s.Router.GET("/shutdown", s.handleShutdown(halt))
}
}
+
+func LimitRequestBody(max int64) ServerOption {
+ return func(s *Server) {
+ s.Router.Use(limitRequestBody(max))
+ }
+}
+
+func limitRequestBody(max int64) func(c *gin.Context) {
+ return func(c *gin.Context) {
+ cl := int64(c.Request.ContentLength)
+ if cl > max {
+ // try to deny this quickly, instead of just letting it get lopped off
+
+ handleErrorResponse(c, errTooBig{cl, max})
+ c.Abort()
+ return
+ }
+
+ // if no Content-Length specified, limit how many bytes we read and error
+ // if we hit the max (intercontinental anti-air missile defense system).
+ // read http.MaxBytesReader for gritty details..
+ c.Request.Body = http.MaxBytesReader(c.Writer, c.Request.Body, max)
+ c.Next()
+ }
+}
+
+// models.APIError
+type errTooBig struct {
+ n, max int64
+}
+
+func (e errTooBig) Code() int { return http.StatusRequestEntityTooLarge }
+func (e errTooBig) Error() string {
+ return fmt.Sprintf("Content-Length too large for this server, %d > max %d", e.n, e.max)
+}
diff --git a/api/version/version.go b/api/version/version.go
index c36c200ee..0389377ed 100644
--- a/api/version/version.go
+++ b/api/version/version.go
@@ -1,4 +1,4 @@
package version
// Version of Functions
-var Version = "0.3.106"
+var Version = "0.3.109"
diff --git a/fnlb/main.go b/fnlb/main.go
index adef5f55d..cdcfcb344 100644
--- a/fnlb/main.go
+++ b/fnlb/main.go
@@ -17,12 +17,12 @@ import (
"github.com/sirupsen/logrus"
)
-const VERSION = "0.0.72"
+const VERSION = "0.0.75"
func main() {
// XXX (reed): normalize
fnodes := flag.String("nodes", "", "comma separated list of functions nodes")
- minAPIVersion := flag.String("min-api-version", "0.0.39", "minimal node API to accept")
+ minAPIVersion := flag.String("min-api-version", "0.0.42", "minimal node API to accept")
var conf lb.Config
flag.StringVar(&conf.DBurl, "db", "sqlite3://:memory:", "backend to store nodes, default to in memory")
diff --git a/glide.lock b/glide.lock
index 02ec300a9..65fe4b994 100644
--- a/glide.lock
+++ b/glide.lock
@@ -1,16 +1,16 @@
-hash: 60c3aa7f40235c70cfcc42335f9795bd1af326dc46f817aabbe7098fdd9f91a1
-updated: 2017-09-05T11:30:26.153448972-07:00
+hash: 9c04b00c52a7378e748a93c062aacd32f39fece29a79b50fddad6aa81e2cbab0
+updated: 2017-09-19T14:13:44.550343214-07:00
imports:
- name: github.com/amir/raidman
version: 1ccc43bfb9c93cb401a4025e49c64ba71e5e668b
- name: github.com/apache/thrift
- version: 9235bec082127e84bf1b0353a0764c9060aca6d2
+ version: 4c30c15924bfbc7c9e6bfc0e82630e97980e556e
subpackages:
- lib/go/thrift
- name: github.com/asaskevich/govalidator
- version: 73945b6115bfbbcc57d89b7316e28109364124e1
+ version: 15028e809df8c71964e8efa6c11e81d5c0262302
- name: github.com/Azure/go-ansiterm
- version: fa152c58bc15761d0200cb75fe958b89a9d4888e
+ version: 19f72df4d05d31cbe1c56bfc8045c96babff6c7e
subpackages:
- winterm
- name: github.com/beorn7/perks
@@ -18,15 +18,15 @@ imports:
subpackages:
- quantile
- name: github.com/boltdb/bolt
- version: 2f1ce7a837dcb8da3ec595b1dac9d0632f0f99e8
+ version: fa5367d20c994db73282594be0146ab221657943
- name: github.com/cactus/go-statsd-client
version: ce77ca9ecdee1c3ffd097e32f9bb832825ccb203
subpackages:
- statsd
- name: github.com/cenkalti/backoff
- version: 61153c768f31ee5f130071d08fc82b85208528de
+ version: 80e08cb804a3eb3e576876c777e957e874609a9a
- name: github.com/cloudflare/cfssl
- version: 42549e19d448b683fa35bcce1aea3bf193ee8037
+ version: 7d88da830aad9d533c2fb8532da23f6a75331b52
subpackages:
- api
- auth
@@ -44,11 +44,11 @@ imports:
- signer
- signer/local
- name: github.com/coreos/etcd
- version: 589a7a19ac469afa687ab1f7487dd5d4c2a6ee6a
+ version: 5bb9f9591f01d0a3c61d2eb3a3bb281726005b2b
subpackages:
- raft/raftpb
- name: github.com/coreos/go-semver
- version: 1817cd4bea52af76542157eeabd74b057d1a199e
+ version: 8ab6407b697782a06568d4b7f1db25550ec2e4c6
subpackages:
- semver
- name: github.com/davecgh/go-spew
@@ -58,7 +58,7 @@ imports:
- name: github.com/dchest/siphash
version: 4ebf1de738443ea7f45f02dc394c4df1942a126d
- name: github.com/dghubble/go-twitter
- version: f74be7f0f20b142558537ca43852457f7c52e051
+ version: c4115fa44a928413e0b857e0eb47376ffde3a61a
subpackages:
- twitter
- name: github.com/dghubble/oauth1
@@ -68,7 +68,7 @@ imports:
- name: github.com/dgrijalva/jwt-go
version: a539ee1a749a2b895533f979515ac7e6e0f5b650
- name: github.com/docker/cli
- version: f5a192bcc4c2794e44eb9dd7d91c2be95c5c6342
+ version: 139fcd3ee95f37f3ac17b1200fb0a63908cb6781
subpackages:
- cli/config/configfile
- name: github.com/docker/distribution
@@ -132,7 +132,7 @@ imports:
subpackages:
- store
- name: github.com/docker/libnetwork
- version: ba46b928444931e6865d8618dc03622cac79aa6f
+ version: 6d098467ec58038b68620a3c2c418936661efa64
subpackages:
- datastore
- discoverapi
@@ -140,7 +140,7 @@ imports:
- name: github.com/docker/libtrust
version: aabc10ec26b754e797f9028f4589c5b7bd90dc20
- name: github.com/docker/swarmkit
- version: 0554c9bc9a485025e89b8e5c2c1f0d75961906a2
+ version: bd7bafb8a61de1f5f23c8215ce7b9ecbcb30ff21
subpackages:
- api
- api/deepcopy
@@ -167,12 +167,8 @@ imports:
version: bb955e01b9346ac19dc29eb16586c90ded99a98c
- name: github.com/eapache/queue
version: 44cc805cf13205b55f69e14bcb69867d1ae92f98
-- name: github.com/fsnotify/fsnotify
- version: 4da3e2cfbabc9f751898f250b49f2439785783a1
-- name: github.com/fsouza/go-dockerclient
- version: 75772940379e725b5aae213e570f9dcd751951cb
- name: github.com/fnproject/fn_go
- version: e046aa4ca1f1028a04fc51395297ff07515cb0b6
+ version: 418dcd8e37593d86604e89a48d7ee2e109a1d3bf
subpackages:
- client
- client/apps
@@ -180,15 +176,19 @@ imports:
- client/operations
- client/routes
- models
+- name: github.com/fsnotify/fsnotify
+ version: 4da3e2cfbabc9f751898f250b49f2439785783a1
+- name: github.com/fsouza/go-dockerclient
+ version: 98edf3edfae6a6500fecc69d2bcccf1302544004
- name: github.com/garyburd/redigo
- version: b925df3cc15d8646e9b5b333ebaf3011385aba11
+ version: 70e1b1943d4fc9c56791abaa6f4d1e727b9ab925
subpackages:
- internal
- redis
- name: github.com/gin-contrib/sse
version: 22d885f9ecc78bf4ee5d72b937e4bbcdc58e8cae
- name: github.com/gin-gonic/gin
- version: 848fa41ca016fa3a3d385af710c4219c1cb477a4
+ version: 5afc5b19730118c9b8324fe9dd995d44ec65c81a
subpackages:
- binding
- json
@@ -208,7 +208,7 @@ imports:
subpackages:
- fmts
- name: github.com/go-openapi/runtime
- version: bf2ff8f7150788b1c7256abb0805ba0410cbbabb
+ version: d6605b7c17ac3b1033ca794886e6142a4141f5b0
subpackages:
- client
- name: github.com/go-openapi/spec
@@ -220,7 +220,7 @@ imports:
- name: github.com/go-openapi/validate
version: 8a82927c942c94794a5cd8b8b50ce2f48a955c0c
- name: github.com/go-sql-driver/mysql
- version: 26471af196a17ee75a22e6481b5a5897fb16b081
+ version: 21d7e97c9f760ca685a01ecea202e1c84276daa1
- name: github.com/gogo/protobuf
version: 100ba4e885062801d56799d78530b73b178a78f3
subpackages:
@@ -267,7 +267,7 @@ imports:
subpackages:
- simplelru
- name: github.com/hashicorp/hcl
- version: 8f6b1344a92ff8877cf24a5de9177bf7d0a2a187
+ version: 68e816d1c783414e79bc65b3994d9ab6b0a722ab
subpackages:
- hcl/ast
- hcl/parser
@@ -278,7 +278,7 @@ imports:
- json/scanner
- json/token
- name: github.com/iron-io/iron_go3
- version: 830335d420db87fc84cbff7f0d1348a46b499946
+ version: ded317cb147d3b52b593da08495bc7d53efa17d8
subpackages:
- api
- config
@@ -290,17 +290,17 @@ imports:
subpackages:
- reflectx
- name: github.com/json-iterator/go
- version: 8c7fc7584a2a4dad472a39a85889dabb3091dfb1
+ version: fdfe0b9a69118ff692d6e1005e9de7e0cffb7d6b
- name: github.com/kr/logfmt
version: b84e30acd515aadc4b783ad4ff83aff3299bdfe0
- name: github.com/lib/pq
- version: e42267488fe361b9dc034be7a6bffef5b195bceb
+ version: 23da1db4f16d9658a86ae9b717c245fc078f10f1
subpackages:
- oid
- name: github.com/magiconair/properties
version: 8d7837e64d3c1ee4e54a880c5a920ab4316fc90a
- name: github.com/mailru/easyjson
- version: 2a92e673c9a6302dd05c3a691ae1f24aef46457d
+ version: 2f5df55504ebc322e4d52d34df6a1f5b503bf26d
subpackages:
- buffer
- jlexer
@@ -322,7 +322,7 @@ imports:
- name: github.com/opencontainers/go-digest
version: 279bed98673dd5bef374d3b6e4b09e2af76183bf
- name: github.com/opencontainers/image-spec
- version: 7653c236dd968a4f18c94d588591d98dea106323
+ version: ebd93fd0782379ca3d821f0fa74f0651a9347a3e
subpackages:
- specs-go
- specs-go/v1
@@ -339,7 +339,7 @@ imports:
- ext
- log
- name: github.com/openzipkin/zipkin-go-opentracing
- version: 37e942825de0f846d15acc3bc9d027c9134a9b25
+ version: 9c88fa03bfdfaa5fec7cd1b40f3d10ec15c15fc6
subpackages:
- flag
- thrift/gen-go/scribe
@@ -357,7 +357,7 @@ imports:
subpackages:
- xxHash32
- name: github.com/pkg/errors
- version: c605e284fe17294bda444b34710735b29d1a9d90
+ version: 2b3a18b5f0fb6b4f9190549597d3f962c02bc5eb
- name: github.com/prometheus/client_golang
version: c5b7fccd204277076155f10851dad72b76a49317
subpackages:
@@ -367,7 +367,7 @@ imports:
subpackages:
- go
- name: github.com/prometheus/common
- version: 49fee292b27bfff7f354ee0f64e1bc4850462edf
+ version: 2f17f4a9d485bf34b4bfaccc273805040e4f86c8
subpackages:
- expfmt
- internal/bitbucket.org/ww/goautoneg
@@ -377,13 +377,13 @@ imports:
subpackages:
- xfs
- name: github.com/PuerkitoBio/purell
- version: f619812e3caf603a8df60a7ec6f2654b703189ef
+ version: 7cf257f0a33260797b0febf39f95fccd86aab2a3
- name: github.com/PuerkitoBio/urlesc
version: de5bf2ad457846296e2031421a34e2568e304e35
- name: github.com/rcrowley/go-metrics
version: 1f30fe9094a513ce4c700b9a54458bbb0c96996c
- name: github.com/Shopify/sarama
- version: 15174039fd207656a0f97f52bc78ec7793deeada
+ version: 4704a3a8c95920361c47e9a2adec13c3d757c757
- name: github.com/sirupsen/logrus
version: 89742aefa4b206dcf400792f3bd35b542998eb3b
subpackages:
@@ -401,11 +401,11 @@ imports:
- name: github.com/spf13/viper
version: 25b30aa063fc18e48662b86996252eabdcf2f0c7
- name: github.com/ugorji/go
- version: 8c0409fcbb70099c748d71f714529204975f6c3f
+ version: 54210f4e076c57f351166f0ed60e67d3fca57a36
subpackages:
- codec
- name: golang.org/x/crypto
- version: 81e90905daefcd6fd217b62423c0908922eadb30
+ version: 7d9177d70076375b9a59c8fde23d52d9c4a7ecd5
subpackages:
- bcrypt
- blowfish
@@ -414,7 +414,7 @@ imports:
- pkcs12/internal/rc2
- ssh/terminal
- name: golang.org/x/net
- version: c8c74377599bd978aee1cf3b9b63a8634051cec2
+ version: 66aacef3dd8a676686c7ae3716979581e8b03c47
subpackages:
- context
- context/ctxhttp
@@ -425,7 +425,7 @@ imports:
- lex/httplex
- trace
- name: golang.org/x/sys
- version: 7ddbeae9ae08c6a06a59597f0c9edbc5ff2444ce
+ version: 07c182904dbd53199946ba614a412c61d3c548f5
subpackages:
- unix
- windows
diff --git a/glide.yaml b/glide.yaml
index a821fd792..3e4ebecf6 100644
--- a/glide.yaml
+++ b/glide.yaml
@@ -22,7 +22,7 @@ import:
- package: github.com/dghubble/oauth1
- package: github.com/dgrijalva/jwt-go
- package: github.com/docker/cli
- version: f5a192bcc4c2794e44eb9dd7d91c2be95c5c6342
+ version: 139fcd3ee95f37f3ac17b1200fb0a63908cb6781
subpackages:
- cli/config/configfile
- package: github.com/docker/distribution
@@ -44,6 +44,7 @@ import:
- package: github.com/go-openapi/swag
- package: github.com/go-openapi/validate
- package: github.com/go-sql-driver/mysql
+ version: 21d7e97c9f760ca685a01ecea202e1c84276daa1
- package: github.com/google/btree
- package: github.com/iron-io/iron_go3
subpackages:
@@ -67,7 +68,9 @@ import:
- package: github.com/opencontainers/runc
version: ae2948042b08ad3d6d13cd09f40a50ffff4fc688
- package: github.com/Azure/go-ansiterm
- version: fa152c58bc15761d0200cb75fe958b89a9d4888e
+ version: 19f72df4d05d31cbe1c56bfc8045c96babff6c7e
+- package: github.com/prometheus/common
+ version: 2f17f4a9d485bf34b4bfaccc273805040e4f86c8
testImport:
- package: github.com/patrickmn/go-cache
branch: master
diff --git a/vendor/github.com/Azure/go-ansiterm/parser.go b/vendor/github.com/Azure/go-ansiterm/parser.go
index 169f68dbe..3286a9cb5 100644
--- a/vendor/github.com/Azure/go-ansiterm/parser.go
+++ b/vendor/github.com/Azure/go-ansiterm/parser.go
@@ -5,7 +5,7 @@ import (
"io/ioutil"
"os"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
var logger *logrus.Logger
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
index 4d858ed61..48998bb05 100644
--- a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
@@ -9,7 +9,7 @@ import (
"strconv"
"github.com/Azure/go-ansiterm"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
var logger *logrus.Logger
diff --git a/vendor/github.com/PuerkitoBio/purell/purell.go b/vendor/github.com/PuerkitoBio/purell/purell.go
index 6d0fc190a..645e1b76f 100644
--- a/vendor/github.com/PuerkitoBio/purell/purell.go
+++ b/vendor/github.com/PuerkitoBio/purell/purell.go
@@ -299,7 +299,7 @@ func sortQuery(u *url.URL) {
if len(q) > 0 {
arKeys := make([]string, len(q))
i := 0
- for k := range q {
+ for k, _ := range q {
arKeys[i] = k
i++
}
diff --git a/vendor/github.com/PuerkitoBio/purell/purell_test.go b/vendor/github.com/PuerkitoBio/purell/purell_test.go
index bbd3c89fa..a3732e5a3 100644
--- a/vendor/github.com/PuerkitoBio/purell/purell_test.go
+++ b/vendor/github.com/PuerkitoBio/purell/purell_test.go
@@ -16,672 +16,672 @@ type testCase struct {
var (
cases = [...]*testCase{
- {
+ &testCase{
"LowerScheme",
"HTTP://www.SRC.ca",
FlagLowercaseScheme,
"http://www.SRC.ca",
false,
},
- {
+ &testCase{
"LowerScheme2",
"http://www.SRC.ca",
FlagLowercaseScheme,
"http://www.SRC.ca",
false,
},
- {
+ &testCase{
"LowerHost",
"HTTP://www.SRC.ca/",
FlagLowercaseHost,
"http://www.src.ca/", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"UpperEscapes",
`http://www.whatever.com/Some%aa%20Special%8Ecases/`,
FlagUppercaseEscapes,
"http://www.whatever.com/Some%AA%20Special%8Ecases/",
false,
},
- {
+ &testCase{
"UnnecessaryEscapes",
`http://www.toto.com/%41%42%2E%44/%32%33%52%2D/%5f%7E`,
FlagDecodeUnnecessaryEscapes,
"http://www.toto.com/AB.D/23R-/_~",
false,
},
- {
+ &testCase{
"RemoveDefaultPort",
"HTTP://www.SRC.ca:80/",
FlagRemoveDefaultPort,
"http://www.SRC.ca/", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveDefaultPort2",
"HTTP://www.SRC.ca:80",
FlagRemoveDefaultPort,
"http://www.SRC.ca", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveDefaultPort3",
"HTTP://www.SRC.ca:8080",
FlagRemoveDefaultPort,
"http://www.SRC.ca:8080", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"Safe",
"HTTP://www.SRC.ca:80/to%1ato%8b%ee/OKnow%41%42%43%7e",
FlagsSafe,
"http://www.src.ca/to%1Ato%8B%EE/OKnowABC~",
false,
},
- {
+ &testCase{
"BothLower",
"HTTP://www.SRC.ca:80/to%1ato%8b%ee/OKnow%41%42%43%7e",
FlagLowercaseHost | FlagLowercaseScheme,
"http://www.src.ca:80/to%1Ato%8B%EE/OKnowABC~",
false,
},
- {
+ &testCase{
"RemoveTrailingSlash",
"HTTP://www.SRC.ca:80/",
FlagRemoveTrailingSlash,
"http://www.SRC.ca:80", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveTrailingSlash2",
"HTTP://www.SRC.ca:80/toto/titi/",
FlagRemoveTrailingSlash,
"http://www.SRC.ca:80/toto/titi", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveTrailingSlash3",
"HTTP://www.SRC.ca:80/toto/titi/fin/?a=1",
FlagRemoveTrailingSlash,
"http://www.SRC.ca:80/toto/titi/fin?a=1", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"AddTrailingSlash",
"HTTP://www.SRC.ca:80",
FlagAddTrailingSlash,
"http://www.SRC.ca:80/", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"AddTrailingSlash2",
"HTTP://www.SRC.ca:80/toto/titi.html",
FlagAddTrailingSlash,
"http://www.SRC.ca:80/toto/titi.html/", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"AddTrailingSlash3",
"HTTP://www.SRC.ca:80/toto/titi/fin?a=1",
FlagAddTrailingSlash,
"http://www.SRC.ca:80/toto/titi/fin/?a=1", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveDotSegments",
"HTTP://root/a/b/./../../c/",
FlagRemoveDotSegments,
"http://root/c/", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveDotSegments2",
"HTTP://root/../a/b/./../c/../d",
FlagRemoveDotSegments,
"http://root/a/d", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"UsuallySafe",
"HTTP://www.SRC.ca:80/to%1ato%8b%ee/./c/d/../OKnow%41%42%43%7e/?a=b#test",
FlagsUsuallySafeGreedy,
"http://www.src.ca/to%1Ato%8B%EE/c/OKnowABC~?a=b#test",
false,
},
- {
+ &testCase{
"RemoveDirectoryIndex",
"HTTP://root/a/b/c/default.aspx",
FlagRemoveDirectoryIndex,
"http://root/a/b/c/", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveDirectoryIndex2",
"HTTP://root/a/b/c/default#a=b",
FlagRemoveDirectoryIndex,
"http://root/a/b/c/default#a=b", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"RemoveFragment",
"HTTP://root/a/b/c/default#toto=tata",
FlagRemoveFragment,
"http://root/a/b/c/default", // Since Go1.1, scheme is automatically lowercased
false,
},
- {
+ &testCase{
"ForceHTTP",
"https://root/a/b/c/default#toto=tata",
FlagForceHTTP,
"http://root/a/b/c/default#toto=tata",
false,
},
- {
+ &testCase{
"RemoveDuplicateSlashes",
"https://root/a//b///c////default#toto=tata",
FlagRemoveDuplicateSlashes,
"https://root/a/b/c/default#toto=tata",
false,
},
- {
+ &testCase{
"RemoveDuplicateSlashes2",
"https://root//a//b///c////default#toto=tata",
FlagRemoveDuplicateSlashes,
"https://root/a/b/c/default#toto=tata",
false,
},
- {
+ &testCase{
"RemoveWWW",
"https://www.root/a/b/c/",
FlagRemoveWWW,
"https://root/a/b/c/",
false,
},
- {
+ &testCase{
"RemoveWWW2",
"https://WwW.Root/a/b/c/",
FlagRemoveWWW,
"https://Root/a/b/c/",
false,
},
- {
+ &testCase{
"AddWWW",
"https://Root/a/b/c/",
FlagAddWWW,
"https://www.Root/a/b/c/",
false,
},
- {
+ &testCase{
"SortQuery",
"http://root/toto/?b=4&a=1&c=3&b=2&a=5",
FlagSortQuery,
"http://root/toto/?a=1&a=5&b=2&b=4&c=3",
false,
},
- {
+ &testCase{
"RemoveEmptyQuerySeparator",
"http://root/toto/?",
FlagRemoveEmptyQuerySeparator,
"http://root/toto/",
false,
},
- {
+ &testCase{
"Unsafe",
"HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid",
FlagsUnsafeGreedy,
"http://root.com/toto/tE%1F/a/c?a=4&w=1&w=2&z=3",
false,
},
- {
+ &testCase{
"Safe2",
"HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid",
FlagsSafe,
"https://www.root.com/toto/tE%1F///a/./b/../c/?z=3&w=2&a=4&w=1#invalid",
false,
},
- {
+ &testCase{
"UsuallySafe2",
"HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid",
FlagsUsuallySafeGreedy,
"https://www.root.com/toto/tE%1F///a/c?z=3&w=2&a=4&w=1#invalid",
false,
},
- {
+ &testCase{
"AddTrailingSlashBug",
"http://src.ca/",
FlagsAllNonGreedy,
"http://www.src.ca/",
false,
},
- {
+ &testCase{
"SourceModified",
"HTTPS://www.RooT.com/toto/t%45%1f///a/./b/../c/?z=3&w=2&a=4&w=1#invalid",
FlagsUnsafeGreedy,
"http://root.com/toto/tE%1F/a/c?a=4&w=1&w=2&z=3",
true,
},
- {
+ &testCase{
"IPv6-1",
"http://[2001:db8:1f70::999:de8:7648:6e8]/test",
FlagsSafe | FlagRemoveDotSegments,
"http://[2001:db8:1f70::999:de8:7648:6e8]/test",
false,
},
- {
+ &testCase{
"IPv6-2",
"http://[::ffff:192.168.1.1]/test",
FlagsSafe | FlagRemoveDotSegments,
"http://[::ffff:192.168.1.1]/test",
false,
},
- {
+ &testCase{
"IPv6-3",
"http://[::ffff:192.168.1.1]:80/test",
FlagsSafe | FlagRemoveDotSegments,
"http://[::ffff:192.168.1.1]/test",
false,
},
- {
+ &testCase{
"IPv6-4",
"htTps://[::fFff:192.168.1.1]:443/test",
FlagsSafe | FlagRemoveDotSegments,
"https://[::ffff:192.168.1.1]/test",
false,
},
- {
+ &testCase{
"FTP",
"ftp://user:pass@ftp.foo.net/foo/bar",
FlagsSafe | FlagRemoveDotSegments,
"ftp://user:pass@ftp.foo.net/foo/bar",
false,
},
- {
+ &testCase{
"Standard-1",
"http://www.foo.com:80/foo",
FlagsSafe | FlagRemoveDotSegments,
"http://www.foo.com/foo",
false,
},
- {
+ &testCase{
"Standard-2",
"http://www.foo.com:8000/foo",
FlagsSafe | FlagRemoveDotSegments,
"http://www.foo.com:8000/foo",
false,
},
- {
+ &testCase{
"Standard-3",
"http://www.foo.com/%7ebar",
FlagsSafe | FlagRemoveDotSegments,
"http://www.foo.com/~bar",
false,
},
- {
+ &testCase{
"Standard-4",
"http://www.foo.com/%7Ebar",
FlagsSafe | FlagRemoveDotSegments,
"http://www.foo.com/~bar",
false,
},
- {
+ &testCase{
"Standard-5",
"http://USER:pass@www.Example.COM/foo/bar",
FlagsSafe | FlagRemoveDotSegments,
"http://USER:pass@www.example.com/foo/bar",
false,
},
- {
+ &testCase{
"Standard-6",
"http://test.example/?a=%26&b=1",
FlagsSafe | FlagRemoveDotSegments,
"http://test.example/?a=%26&b=1",
false,
},
- {
+ &testCase{
"Standard-7",
"http://test.example/%25/?p=%20val%20%25",
FlagsSafe | FlagRemoveDotSegments,
"http://test.example/%25/?p=%20val%20%25",
false,
},
- {
+ &testCase{
"Standard-8",
"http://test.example/path/with a%20space+/",
FlagsSafe | FlagRemoveDotSegments,
"http://test.example/path/with%20a%20space+/",
false,
},
- {
+ &testCase{
"Standard-9",
"http://test.example/?",
FlagsSafe | FlagRemoveDotSegments,
"http://test.example/",
false,
},
- {
+ &testCase{
"Standard-10",
"http://a.COM/path/?b&a",
FlagsSafe | FlagRemoveDotSegments,
"http://a.com/path/?b&a",
false,
},
- {
+ &testCase{
"StandardCasesAddTrailingSlash",
"http://test.example?",
FlagsSafe | FlagAddTrailingSlash,
"http://test.example/",
false,
},
- {
+ &testCase{
"OctalIP-1",
"http://0123.011.0.4/",
FlagsSafe | FlagDecodeOctalHost,
"http://0123.011.0.4/",
false,
},
- {
+ &testCase{
"OctalIP-2",
"http://0102.0146.07.0223/",
FlagsSafe | FlagDecodeOctalHost,
"http://66.102.7.147/",
false,
},
- {
+ &testCase{
"OctalIP-3",
"http://0102.0146.07.0223.:23/",
FlagsSafe | FlagDecodeOctalHost,
"http://66.102.7.147.:23/",
false,
},
- {
+ &testCase{
"OctalIP-4",
"http://USER:pass@0102.0146.07.0223../",
FlagsSafe | FlagDecodeOctalHost,
"http://USER:pass@66.102.7.147../",
false,
},
- {
+ &testCase{
"DWORDIP-1",
"http://123.1113982867/",
FlagsSafe | FlagDecodeDWORDHost,
"http://123.1113982867/",
false,
},
- {
+ &testCase{
"DWORDIP-2",
"http://1113982867/",
FlagsSafe | FlagDecodeDWORDHost,
"http://66.102.7.147/",
false,
},
- {
+ &testCase{
"DWORDIP-3",
"http://1113982867.:23/",
FlagsSafe | FlagDecodeDWORDHost,
"http://66.102.7.147.:23/",
false,
},
- {
+ &testCase{
"DWORDIP-4",
"http://USER:pass@1113982867../",
FlagsSafe | FlagDecodeDWORDHost,
"http://USER:pass@66.102.7.147../",
false,
},
- {
+ &testCase{
"HexIP-1",
"http://0x123.1113982867/",
FlagsSafe | FlagDecodeHexHost,
"http://0x123.1113982867/",
false,
},
- {
+ &testCase{
"HexIP-2",
"http://0x42660793/",
FlagsSafe | FlagDecodeHexHost,
"http://66.102.7.147/",
false,
},
- {
+ &testCase{
"HexIP-3",
"http://0x42660793.:23/",
FlagsSafe | FlagDecodeHexHost,
"http://66.102.7.147.:23/",
false,
},
- {
+ &testCase{
"HexIP-4",
"http://USER:pass@0x42660793../",
FlagsSafe | FlagDecodeHexHost,
"http://USER:pass@66.102.7.147../",
false,
},
- {
+ &testCase{
"UnnecessaryHostDots-1",
"http://.www.foo.com../foo/bar.html",
FlagsSafe | FlagRemoveUnnecessaryHostDots,
"http://www.foo.com/foo/bar.html",
false,
},
- {
+ &testCase{
"UnnecessaryHostDots-2",
"http://www.foo.com./foo/bar.html",
FlagsSafe | FlagRemoveUnnecessaryHostDots,
"http://www.foo.com/foo/bar.html",
false,
},
- {
+ &testCase{
"UnnecessaryHostDots-3",
"http://www.foo.com.:81/foo",
FlagsSafe | FlagRemoveUnnecessaryHostDots,
"http://www.foo.com:81/foo",
false,
},
- {
+ &testCase{
"UnnecessaryHostDots-4",
"http://www.example.com./",
FlagsSafe | FlagRemoveUnnecessaryHostDots,
"http://www.example.com/",
false,
},
- {
+ &testCase{
"EmptyPort-1",
"http://www.thedraymin.co.uk:/main/?p=308",
FlagsSafe | FlagRemoveEmptyPortSeparator,
"http://www.thedraymin.co.uk/main/?p=308",
false,
},
- {
+ &testCase{
"EmptyPort-2",
"http://www.src.ca:",
FlagsSafe | FlagRemoveEmptyPortSeparator,
"http://www.src.ca",
false,
},
- {
+ &testCase{
"Slashes-1",
"http://test.example/foo/bar/.",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/bar/",
false,
},
- {
+ &testCase{
"Slashes-2",
"http://test.example/foo/bar/./",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/bar/",
false,
},
- {
+ &testCase{
"Slashes-3",
"http://test.example/foo/bar/..",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/",
false,
},
- {
+ &testCase{
"Slashes-4",
"http://test.example/foo/bar/../",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/",
false,
},
- {
+ &testCase{
"Slashes-5",
"http://test.example/foo/bar/../baz",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/baz",
false,
},
- {
+ &testCase{
"Slashes-6",
"http://test.example/foo/bar/../..",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/",
false,
},
- {
+ &testCase{
"Slashes-7",
"http://test.example/foo/bar/../../",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/",
false,
},
- {
+ &testCase{
"Slashes-8",
"http://test.example/foo/bar/../../baz",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/baz",
false,
},
- {
+ &testCase{
"Slashes-9",
"http://test.example/foo/bar/../../../baz",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/baz",
false,
},
- {
+ &testCase{
"Slashes-10",
"http://test.example/foo/bar/../../../../baz",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/baz",
false,
},
- {
+ &testCase{
"Slashes-11",
"http://test.example/./foo",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo",
false,
},
- {
+ &testCase{
"Slashes-12",
"http://test.example/../foo",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo",
false,
},
- {
+ &testCase{
"Slashes-13",
"http://test.example/foo.",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo.",
false,
},
- {
+ &testCase{
"Slashes-14",
"http://test.example/.foo",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/.foo",
false,
},
- {
+ &testCase{
"Slashes-15",
"http://test.example/foo..",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo..",
false,
},
- {
+ &testCase{
"Slashes-16",
"http://test.example/..foo",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/..foo",
false,
},
- {
+ &testCase{
"Slashes-17",
"http://test.example/./../foo",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo",
false,
},
- {
+ &testCase{
"Slashes-18",
"http://test.example/./foo/.",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/",
false,
},
- {
+ &testCase{
"Slashes-19",
"http://test.example/foo/./bar",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/bar",
false,
},
- {
+ &testCase{
"Slashes-20",
"http://test.example/foo/../bar",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/bar",
false,
},
- {
+ &testCase{
"Slashes-21",
"http://test.example/foo//",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/",
false,
},
- {
+ &testCase{
"Slashes-22",
"http://test.example/foo///bar//",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"http://test.example/foo/bar/",
false,
},
- {
+ &testCase{
"Relative",
"foo/bar",
FlagsAllGreedy,
"foo/bar",
false,
},
- {
+ &testCase{
"Relative-1",
"./../foo",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"foo",
false,
},
- {
+ &testCase{
"Relative-2",
"./foo/bar/../baz/../bang/..",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"foo/",
false,
},
- {
+ &testCase{
"Relative-3",
"foo///bar//",
FlagsSafe | FlagRemoveDotSegments | FlagRemoveDuplicateSlashes,
"foo/bar/",
false,
},
- {
+ &testCase{
"Relative-4",
"www.youtube.com",
FlagsUsuallySafeGreedy,
diff --git a/vendor/github.com/Shopify/sarama/client.go b/vendor/github.com/Shopify/sarama/client.go
index c6510d9d9..570f7f3f3 100644
--- a/vendor/github.com/Shopify/sarama/client.go
+++ b/vendor/github.com/Shopify/sarama/client.go
@@ -612,6 +612,9 @@ func (client *client) backgroundMetadataUpdater() {
if specificTopics, err := client.Topics(); err != nil {
Logger.Println("Client background metadata topic load:", err)
break
+ } else if len(specificTopics) == 0 {
+ Logger.Println("Client background metadata update: no specific topics to update")
+ break
} else {
topics = specificTopics
}
diff --git a/vendor/github.com/Shopify/sarama/config.go b/vendor/github.com/Shopify/sarama/config.go
index e0774c60e..e4ff680f2 100644
--- a/vendor/github.com/Shopify/sarama/config.go
+++ b/vendor/github.com/Shopify/sarama/config.go
@@ -196,11 +196,23 @@ type Config struct {
// Equivalent to the JVM's `fetch.wait.max.ms`.
MaxWaitTime time.Duration
- // The maximum amount of time the consumer expects a message takes to process
- // for the user. If writing to the Messages channel takes longer than this,
- // that partition will stop fetching more messages until it can proceed again.
+ // The maximum amount of time the consumer expects a message takes to
+ // process for the user. If writing to the Messages channel takes longer
+ // than this, that partition will stop fetching more messages until it
+ // can proceed again.
// Note that, since the Messages channel is buffered, the actual grace time is
// (MaxProcessingTime * ChanneBufferSize). Defaults to 100ms.
+ // If a message is not written to the Messages channel between two ticks
+ // of the expiryTicker then a timeout is detected.
+ // Using a ticker instead of a timer to detect timeouts should typically
+ // result in many fewer calls to Timer functions which may result in a
+ // significant performance improvement if many messages are being sent
+ // and timeouts are infrequent.
+ // The disadvantage of using a ticker instead of a timer is that
+ // timeouts will be less accurate. That is, the effective timeout could
+ // be between `MaxProcessingTime` and `2 * MaxProcessingTime`. For
+ // example, if `MaxProcessingTime` is 100ms then a delay of 180ms
+ // between two messages being sent may not be recognized as a timeout.
MaxProcessingTime time.Duration
// Return specifies what channels will be populated. If they are set to true,
diff --git a/vendor/github.com/Shopify/sarama/consumer.go b/vendor/github.com/Shopify/sarama/consumer.go
index 9a5650b77..2ce69b00b 100644
--- a/vendor/github.com/Shopify/sarama/consumer.go
+++ b/vendor/github.com/Shopify/sarama/consumer.go
@@ -440,35 +440,37 @@ func (child *partitionConsumer) HighWaterMarkOffset() int64 {
func (child *partitionConsumer) responseFeeder() {
var msgs []*ConsumerMessage
- expiryTimer := time.NewTimer(child.conf.Consumer.MaxProcessingTime)
- expireTimedOut := false
+ msgSent := false
feederLoop:
for response := range child.feeder {
msgs, child.responseResult = child.parseResponse(response)
+ expiryTicker := time.NewTicker(child.conf.Consumer.MaxProcessingTime)
for i, msg := range msgs {
- if !expiryTimer.Stop() && !expireTimedOut {
- // expiryTimer was expired; clear out the waiting msg
- <-expiryTimer.C
- }
- expiryTimer.Reset(child.conf.Consumer.MaxProcessingTime)
- expireTimedOut = false
-
+ messageSelect:
select {
case child.messages <- msg:
- case <-expiryTimer.C:
- expireTimedOut = true
- child.responseResult = errTimedOut
- child.broker.acks.Done()
- for _, msg = range msgs[i:] {
- child.messages <- msg
+ msgSent = true
+ case <-expiryTicker.C:
+ if !msgSent {
+ child.responseResult = errTimedOut
+ child.broker.acks.Done()
+ for _, msg = range msgs[i:] {
+ child.messages <- msg
+ }
+ child.broker.input <- child
+ continue feederLoop
+ } else {
+ // current message has not been sent, return to select
+ // statement
+ msgSent = false
+ goto messageSelect
}
- child.broker.input <- child
- continue feederLoop
}
}
+ expiryTicker.Stop()
child.broker.acks.Done()
}
diff --git a/vendor/github.com/Shopify/sarama/consumer_test.go b/vendor/github.com/Shopify/sarama/consumer_test.go
index 387ede314..48f309b6d 100644
--- a/vendor/github.com/Shopify/sarama/consumer_test.go
+++ b/vendor/github.com/Shopify/sarama/consumer_test.go
@@ -803,6 +803,48 @@ func TestConsumerOffsetOutOfRange(t *testing.T) {
broker0.Close()
}
+func TestConsumerExpiryTicker(t *testing.T) {
+ // Given
+ broker0 := NewMockBroker(t, 0)
+ fetchResponse1 := &FetchResponse{}
+ for i := 1; i <= 8; i++ {
+ fetchResponse1.AddMessage("my_topic", 0, nil, testMsg, int64(i))
+ }
+ broker0.SetHandlerByMap(map[string]MockResponse{
+ "MetadataRequest": NewMockMetadataResponse(t).
+ SetBroker(broker0.Addr(), broker0.BrokerID()).
+ SetLeader("my_topic", 0, broker0.BrokerID()),
+ "OffsetRequest": NewMockOffsetResponse(t).
+ SetOffset("my_topic", 0, OffsetNewest, 1234).
+ SetOffset("my_topic", 0, OffsetOldest, 1),
+ "FetchRequest": NewMockSequence(fetchResponse1),
+ })
+
+ config := NewConfig()
+ config.ChannelBufferSize = 0
+ config.Consumer.MaxProcessingTime = 10 * time.Millisecond
+ master, err := NewConsumer([]string{broker0.Addr()}, config)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ // When
+ consumer, err := master.ConsumePartition("my_topic", 0, 1)
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ // Then: messages with offsets 1 through 8 are read
+ for i := 1; i <= 8; i++ {
+ assertMessageOffset(t, <-consumer.Messages(), int64(i))
+ time.Sleep(2 * time.Millisecond)
+ }
+
+ safeClose(t, consumer)
+ safeClose(t, master)
+ broker0.Close()
+}
+
func assertMessageOffset(t *testing.T, msg *ConsumerMessage, expectedOffset int64) {
if msg.Offset != expectedOffset {
t.Errorf("Incorrect message offset: expected=%d, actual=%d", expectedOffset, msg.Offset)
diff --git a/vendor/github.com/Shopify/sarama/message_test.go b/vendor/github.com/Shopify/sarama/message_test.go
index 2afd88c74..03bb91044 100644
--- a/vendor/github.com/Shopify/sarama/message_test.go
+++ b/vendor/github.com/Shopify/sarama/message_test.go
@@ -2,6 +2,7 @@ package sarama
import (
"runtime"
+ "strings"
"testing"
"time"
)
@@ -106,7 +107,7 @@ func TestMessageEncoding(t *testing.T) {
message.Value = []byte{}
message.Codec = CompressionGZIP
- if runtime.Version() == "go1.8" {
+ if runtime.Version() == "go1.8" || strings.HasPrefix(runtime.Version(), "go1.8.") {
testEncodable(t, "empty gzip", &message, emptyGzipMessage18)
} else {
testEncodable(t, "empty gzip", &message, emptyGzipMessage)
diff --git a/vendor/github.com/Shopify/sarama/offset_manager.go b/vendor/github.com/Shopify/sarama/offset_manager.go
index 5e15cdafe..5b8539b58 100644
--- a/vendor/github.com/Shopify/sarama/offset_manager.go
+++ b/vendor/github.com/Shopify/sarama/offset_manager.go
@@ -151,6 +151,13 @@ type PartitionOffsetManager interface {
// message twice, and your processing should ideally be idempotent.
MarkOffset(offset int64, metadata string)
+ // ResetOffset resets to the provided offset, alongside a metadata string that
+ // represents the state of the partition consumer at that point in time. Reset
+ // acts as a counterpart to MarkOffset, the difference being that it allows to
+ // reset an offset to an earlier or smaller value, where MarkOffset only
+ // allows incrementing the offset. cf MarkOffset for more details.
+ ResetOffset(offset int64, metadata string)
+
// Errors returns a read channel of errors that occur during offset management, if
// enabled. By default, errors are logged and not returned over this channel. If
// you want to implement any custom error handling, set your config's
@@ -329,6 +336,17 @@ func (pom *partitionOffsetManager) MarkOffset(offset int64, metadata string) {
}
}
+func (pom *partitionOffsetManager) ResetOffset(offset int64, metadata string) {
+ pom.lock.Lock()
+ defer pom.lock.Unlock()
+
+ if offset < pom.offset {
+ pom.offset = offset
+ pom.metadata = metadata
+ pom.dirty = true
+ }
+}
+
func (pom *partitionOffsetManager) updateCommitted(offset int64, metadata string) {
pom.lock.Lock()
defer pom.lock.Unlock()
diff --git a/vendor/github.com/Shopify/sarama/offset_manager_test.go b/vendor/github.com/Shopify/sarama/offset_manager_test.go
index c111a5a63..21e4947c6 100644
--- a/vendor/github.com/Shopify/sarama/offset_manager_test.go
+++ b/vendor/github.com/Shopify/sarama/offset_manager_test.go
@@ -204,6 +204,70 @@ func TestPartitionOffsetManagerNextOffset(t *testing.T) {
safeClose(t, testClient)
}
+func TestPartitionOffsetManagerResetOffset(t *testing.T) {
+ om, testClient, broker, coordinator := initOffsetManager(t)
+ pom := initPartitionOffsetManager(t, om, coordinator, 5, "original_meta")
+
+ ocResponse := new(OffsetCommitResponse)
+ ocResponse.AddError("my_topic", 0, ErrNoError)
+ coordinator.Returns(ocResponse)
+
+ expected := int64(1)
+ pom.ResetOffset(expected, "modified_meta")
+ actual, meta := pom.NextOffset()
+
+ if actual != expected {
+ t.Errorf("Expected offset %v. Actual: %v", expected, actual)
+ }
+ if meta != "modified_meta" {
+ t.Errorf("Expected metadata \"modified_meta\". Actual: %q", meta)
+ }
+
+ safeClose(t, pom)
+ safeClose(t, om)
+ safeClose(t, testClient)
+ broker.Close()
+ coordinator.Close()
+}
+
+func TestPartitionOffsetManagerResetOffsetWithRetention(t *testing.T) {
+ om, testClient, broker, coordinator := initOffsetManager(t)
+ testClient.Config().Consumer.Offsets.Retention = time.Hour
+
+ pom := initPartitionOffsetManager(t, om, coordinator, 5, "original_meta")
+
+ ocResponse := new(OffsetCommitResponse)
+ ocResponse.AddError("my_topic", 0, ErrNoError)
+ handler := func(req *request) (res encoder) {
+ if req.body.version() != 2 {
+ t.Errorf("Expected to be using version 2. Actual: %v", req.body.version())
+ }
+ offsetCommitRequest := req.body.(*OffsetCommitRequest)
+ if offsetCommitRequest.RetentionTime != (60 * 60 * 1000) {
+ t.Errorf("Expected an hour retention time. Actual: %v", offsetCommitRequest.RetentionTime)
+ }
+ return ocResponse
+ }
+ coordinator.setHandler(handler)
+
+ expected := int64(1)
+ pom.ResetOffset(expected, "modified_meta")
+ actual, meta := pom.NextOffset()
+
+ if actual != expected {
+ t.Errorf("Expected offset %v. Actual: %v", expected, actual)
+ }
+ if meta != "modified_meta" {
+ t.Errorf("Expected metadata \"modified_meta\". Actual: %q", meta)
+ }
+
+ safeClose(t, pom)
+ safeClose(t, om)
+ safeClose(t, testClient)
+ broker.Close()
+ coordinator.Close()
+}
+
func TestPartitionOffsetManagerMarkOffset(t *testing.T) {
om, testClient, broker, coordinator := initOffsetManager(t)
pom := initPartitionOffsetManager(t, om, coordinator, 5, "original_meta")
diff --git a/vendor/github.com/Sirupsen/logrus/.gitignore b/vendor/github.com/Sirupsen/logrus/.gitignore
deleted file mode 100644
index 66be63a00..000000000
--- a/vendor/github.com/Sirupsen/logrus/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-logrus
diff --git a/vendor/github.com/Sirupsen/logrus/.travis.yml b/vendor/github.com/Sirupsen/logrus/.travis.yml
deleted file mode 100644
index a23296a53..000000000
--- a/vendor/github.com/Sirupsen/logrus/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-go:
- - 1.6.x
- - 1.7.x
- - 1.8.x
- - tip
-env:
- - GOMAXPROCS=4 GORACE=halt_on_error=1
-install:
- - go get github.com/stretchr/testify/assert
- - go get gopkg.in/gemnasium/logrus-airbrake-hook.v2
- - go get golang.org/x/sys/unix
- - go get golang.org/x/sys/windows
-script:
- - go test -race -v ./...
diff --git a/vendor/github.com/Sirupsen/logrus/CHANGELOG.md b/vendor/github.com/Sirupsen/logrus/CHANGELOG.md
deleted file mode 100644
index 8236d8b6e..000000000
--- a/vendor/github.com/Sirupsen/logrus/CHANGELOG.md
+++ /dev/null
@@ -1,113 +0,0 @@
-# 1.0.3
-
-* Replace example files with testable examples
-
-# 1.0.2
-
-* bug: quote non-string values in text formatter (#583)
-* Make (*Logger) SetLevel a public method
-
-# 1.0.1
-
-* bug: fix escaping in text formatter (#575)
-
-# 1.0.0
-
-* Officially changed name to lower-case
-* bug: colors on Windows 10 (#541)
-* bug: fix race in accessing level (#512)
-
-# 0.11.5
-
-* feature: add writer and writerlevel to entry (#372)
-
-# 0.11.4
-
-* bug: fix undefined variable on solaris (#493)
-
-# 0.11.3
-
-* formatter: configure quoting of empty values (#484)
-* formatter: configure quoting character (default is `"`) (#484)
-* bug: fix not importing io correctly in non-linux environments (#481)
-
-# 0.11.2
-
-* bug: fix windows terminal detection (#476)
-
-# 0.11.1
-
-* bug: fix tty detection with custom out (#471)
-
-# 0.11.0
-
-* performance: Use bufferpool to allocate (#370)
-* terminal: terminal detection for app-engine (#343)
-* feature: exit handler (#375)
-
-# 0.10.0
-
-* feature: Add a test hook (#180)
-* feature: `ParseLevel` is now case-insensitive (#326)
-* feature: `FieldLogger` interface that generalizes `Logger` and `Entry` (#308)
-* performance: avoid re-allocations on `WithFields` (#335)
-
-# 0.9.0
-
-* logrus/text_formatter: don't emit empty msg
-* logrus/hooks/airbrake: move out of main repository
-* logrus/hooks/sentry: move out of main repository
-* logrus/hooks/papertrail: move out of main repository
-* logrus/hooks/bugsnag: move out of main repository
-* logrus/core: run tests with `-race`
-* logrus/core: detect TTY based on `stderr`
-* logrus/core: support `WithError` on logger
-* logrus/core: Solaris support
-
-# 0.8.7
-
-* logrus/core: fix possible race (#216)
-* logrus/doc: small typo fixes and doc improvements
-
-
-# 0.8.6
-
-* hooks/raven: allow passing an initialized client
-
-# 0.8.5
-
-* logrus/core: revert #208
-
-# 0.8.4
-
-* formatter/text: fix data race (#218)
-
-# 0.8.3
-
-* logrus/core: fix entry log level (#208)
-* logrus/core: improve performance of text formatter by 40%
-* logrus/core: expose `LevelHooks` type
-* logrus/core: add support for DragonflyBSD and NetBSD
-* formatter/text: print structs more verbosely
-
-# 0.8.2
-
-* logrus: fix more Fatal family functions
-
-# 0.8.1
-
-* logrus: fix not exiting on `Fatalf` and `Fatalln`
-
-# 0.8.0
-
-* logrus: defaults to stderr instead of stdout
-* hooks/sentry: add special field for `*http.Request`
-* formatter/text: ignore Windows for colors
-
-# 0.7.3
-
-* formatter/\*: allow configuration of timestamp layout
-
-# 0.7.2
-
-* formatter/text: Add configuration option for time format (#158)
diff --git a/vendor/github.com/Sirupsen/logrus/LICENSE b/vendor/github.com/Sirupsen/logrus/LICENSE
deleted file mode 100644
index f090cb42f..000000000
--- a/vendor/github.com/Sirupsen/logrus/LICENSE
+++ /dev/null
@@ -1,21 +0,0 @@
-The MIT License (MIT)
-
-Copyright (c) 2014 Simon Eskildsen
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/vendor/github.com/Sirupsen/logrus/README.md b/vendor/github.com/Sirupsen/logrus/README.md
deleted file mode 100644
index 5f656c3e1..000000000
--- a/vendor/github.com/Sirupsen/logrus/README.md
+++ /dev/null
@@ -1,507 +0,0 @@
-# Logrus
[](https://travis-ci.org/sirupsen/logrus) [](https://godoc.org/github.com/sirupsen/logrus)
-
-Logrus is a structured logger for Go (golang), completely API compatible with
-the standard library logger.
-
-**Seeing weird case-sensitive problems?** It's in the past been possible to
-import Logrus as both upper- and lower-case. Due to the Go package environment,
-this caused issues in the community and we needed a standard. Some environments
-experienced problems with the upper-case variant, so the lower-case was decided.
-Everything using `logrus` will need to use the lower-case:
-`github.com/sirupsen/logrus`. Any package that isn't, should be changed.
-
-To fix Glide, see [these
-comments](https://github.com/sirupsen/logrus/issues/553#issuecomment-306591437).
-For an in-depth explanation of the casing issue, see [this
-comment](https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276).
-
-**Are you interested in assisting in maintaining Logrus?** Currently I have a
-lot of obligations, and I am unable to provide Logrus with the maintainership it
-needs. If you'd like to help, please reach out to me at `simon at author's
-username dot com`.
-
-Nicely color-coded in development (when a TTY is attached, otherwise just
-plain text):
-
-
-
-With `log.SetFormatter(&log.JSONFormatter{})`, for easy parsing by logstash
-or Splunk:
-
-```json
-{"animal":"walrus","level":"info","msg":"A group of walrus emerges from the
-ocean","size":10,"time":"2014-03-10 19:57:38.562264131 -0400 EDT"}
-
-{"level":"warning","msg":"The group's number increased tremendously!",
-"number":122,"omg":true,"time":"2014-03-10 19:57:38.562471297 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"A giant walrus appears!",
-"size":10,"time":"2014-03-10 19:57:38.562500591 -0400 EDT"}
-
-{"animal":"walrus","level":"info","msg":"Tremendously sized cow enters the ocean.",
-"size":9,"time":"2014-03-10 19:57:38.562527896 -0400 EDT"}
-
-{"level":"fatal","msg":"The ice breaks!","number":100,"omg":true,
-"time":"2014-03-10 19:57:38.562543128 -0400 EDT"}
-```
-
-With the default `log.SetFormatter(&log.TextFormatter{})` when a TTY is not
-attached, the output is compatible with the
-[logfmt](http://godoc.org/github.com/kr/logfmt) format:
-
-```text
-time="2015-03-26T01:27:38-04:00" level=debug msg="Started observing beach" animal=walrus number=8
-time="2015-03-26T01:27:38-04:00" level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
-time="2015-03-26T01:27:38-04:00" level=warning msg="The group's number increased tremendously!" number=122 omg=true
-time="2015-03-26T01:27:38-04:00" level=debug msg="Temperature changes" temperature=-4
-time="2015-03-26T01:27:38-04:00" level=panic msg="It's over 9000!" animal=orca size=9009
-time="2015-03-26T01:27:38-04:00" level=fatal msg="The ice breaks!" err=&{0x2082280c0 map[animal:orca size:9009] 2015-03-26 01:27:38.441574009 -0400 EDT panic It's over 9000!} number=100 omg=true
-exit status 1
-```
-
-#### Case-sensitivity
-
-The organization's name was changed to lower-case--and this will not be changed
-back. If you are getting import conflicts due to case sensitivity, please use
-the lower-case import: `github.com/sirupsen/logrus`.
-
-#### Example
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
-```go
-package main
-
-import (
- log "github.com/sirupsen/logrus"
-)
-
-func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- }).Info("A walrus appears")
-}
-```
-
-Note that it's completely api-compatible with the stdlib logger, so you can
-replace your `log` imports everywhere with `log "github.com/sirupsen/logrus"`
-and you'll now have the flexibility of Logrus. You can customize it all you
-want:
-
-```go
-package main
-
-import (
- "os"
- log "github.com/sirupsen/logrus"
-)
-
-func init() {
- // Log as JSON instead of the default ASCII formatter.
- log.SetFormatter(&log.JSONFormatter{})
-
- // Output to stdout instead of the default stderr
- // Can be any io.Writer, see below for File example
- log.SetOutput(os.Stdout)
-
- // Only log the warning severity or above.
- log.SetLevel(log.WarnLevel)
-}
-
-func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-
- log.WithFields(log.Fields{
- "omg": true,
- "number": 122,
- }).Warn("The group's number increased tremendously!")
-
- log.WithFields(log.Fields{
- "omg": true,
- "number": 100,
- }).Fatal("The ice breaks!")
-
- // A common pattern is to re-use fields between logging statements by re-using
- // the logrus.Entry returned from WithFields()
- contextLogger := log.WithFields(log.Fields{
- "common": "this is a common field",
- "other": "I also should be logged always",
- })
-
- contextLogger.Info("I'll be logged with common and other field")
- contextLogger.Info("Me too")
-}
-```
-
-For more advanced usage such as logging to multiple locations from the same
-application, you can also create an instance of the `logrus` Logger:
-
-```go
-package main
-
-import (
- "os"
- "github.com/sirupsen/logrus"
-)
-
-// Create a new instance of the logger. You can have any number of instances.
-var log = logrus.New()
-
-func main() {
- // The API for setting attributes is a little different than the package level
- // exported logger. See Godoc.
- log.Out = os.Stdout
-
- // You could set this to any `io.Writer` such as a file
- // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666)
- // if err == nil {
- // log.Out = file
- // } else {
- // log.Info("Failed to log to file, using default stderr")
- // }
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-}
-```
-
-#### Fields
-
-Logrus encourages careful, structured logging through logging fields instead of
-long, unparseable error messages. For example, instead of: `log.Fatalf("Failed
-to send event %s to topic %s with key %d")`, you should log the much more
-discoverable:
-
-```go
-log.WithFields(log.Fields{
- "event": event,
- "topic": topic,
- "key": key,
-}).Fatal("Failed to send event")
-```
-
-We've found this API forces you to think about logging in a way that produces
-much more useful logging messages. We've been in countless situations where just
-a single added field to a log statement that was already there would've saved us
-hours. The `WithFields` call is optional.
-
-In general, with Logrus using any of the `printf`-family functions should be
-seen as a hint you should add a field, however, you can still use the
-`printf`-family functions with Logrus.
-
-#### Default Fields
-
-Often it's helpful to have fields _always_ attached to log statements in an
-application or parts of one. For example, you may want to always log the
-`request_id` and `user_ip` in the context of a request. Instead of writing
-`log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})` on
-every line, you can create a `logrus.Entry` to pass around instead:
-
-```go
-requestLogger := log.WithFields(log.Fields{"request_id": request_id, "user_ip": user_ip})
-requestLogger.Info("something happened on that request") # will log request_id and user_ip
-requestLogger.Warn("something not great happened")
-```
-
-#### Hooks
-
-You can add hooks for logging levels. For example to send errors to an exception
-tracking service on `Error`, `Fatal` and `Panic`, info to StatsD or log to
-multiple places simultaneously, e.g. syslog.
-
-Logrus comes with [built-in hooks](hooks/). Add those, or your custom hook, in
-`init`:
-
-```go
-import (
- log "github.com/sirupsen/logrus"
- "gopkg.in/gemnasium/logrus-airbrake-hook.v2" // the package is named "aibrake"
- logrus_syslog "github.com/sirupsen/logrus/hooks/syslog"
- "log/syslog"
-)
-
-func init() {
-
- // Use the Airbrake hook to report errors that have Error severity or above to
- // an exception tracker. You can create custom hooks, see the Hooks section.
- log.AddHook(airbrake.NewHook(123, "xyz", "production"))
-
- hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
- if err != nil {
- log.Error("Unable to connect to local syslog daemon")
- } else {
- log.AddHook(hook)
- }
-}
-```
-Note: Syslog hook also support connecting to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). For the detail, please check the [syslog hook README](hooks/syslog/README.md).
-
-| Hook | Description |
-| ----- | ----------- |
-| [Airbrake "legacy"](https://github.com/gemnasium/logrus-airbrake-legacy-hook) | Send errors to an exception tracking service compatible with the Airbrake API V2. Uses [`airbrake-go`](https://github.com/tobi/airbrake-go) behind the scenes. |
-| [Airbrake](https://github.com/gemnasium/logrus-airbrake-hook) | Send errors to the Airbrake API V3. Uses the official [`gobrake`](https://github.com/airbrake/gobrake) behind the scenes. |
-| [Amazon Kinesis](https://github.com/evalphobia/logrus_kinesis) | Hook for logging to [Amazon Kinesis](https://aws.amazon.com/kinesis/) |
-| [Amqp-Hook](https://github.com/vladoatanasov/logrus_amqp) | Hook for logging to Amqp broker (Like RabbitMQ) |
-| [AzureTableHook](https://github.com/kpfaulkner/azuretablehook/) | Hook for logging to Azure Table Storage|
-| [Bugsnag](https://github.com/Shopify/logrus-bugsnag/blob/master/bugsnag.go) | Send errors to the Bugsnag exception tracking service. |
-| [DeferPanic](https://github.com/deferpanic/dp-logrus) | Hook for logging to DeferPanic |
-| [Discordrus](https://github.com/kz/discordrus) | Hook for logging to [Discord](https://discordapp.com/) |
-| [ElasticSearch](https://github.com/sohlich/elogrus) | Hook for logging to ElasticSearch|
-| [Firehose](https://github.com/beaubrewer/logrus_firehose) | Hook for logging to [Amazon Firehose](https://aws.amazon.com/kinesis/firehose/)
-| [Fluentd](https://github.com/evalphobia/logrus_fluent) | Hook for logging to fluentd |
-| [Go-Slack](https://github.com/multiplay/go-slack) | Hook for logging to [Slack](https://slack.com) |
-| [Graylog](https://github.com/gemnasium/logrus-graylog-hook) | Hook for logging to [Graylog](http://graylog2.org/) |
-| [Hiprus](https://github.com/nubo/hiprus) | Send errors to a channel in hipchat. |
-| [Honeybadger](https://github.com/agonzalezro/logrus_honeybadger) | Hook for sending exceptions to Honeybadger |
-| [InfluxDB](https://github.com/Abramovic/logrus_influxdb) | Hook for logging to influxdb |
-| [Influxus](http://github.com/vlad-doru/influxus) | Hook for concurrently logging to [InfluxDB](http://influxdata.com/) |
-| [Journalhook](https://github.com/wercker/journalhook) | Hook for logging to `systemd-journald` |
-| [KafkaLogrus](https://github.com/tracer0tong/kafkalogrus) | Hook for logging to Kafka |
-| [LFShook](https://github.com/rifflock/lfshook) | Hook for logging to the local filesystem |
-| [Logentries](https://github.com/jcftang/logentriesrus) | Hook for logging to [Logentries](https://logentries.com/) |
-| [Logentrus](https://github.com/puddingfactory/logentrus) | Hook for logging to [Logentries](https://logentries.com/) |
-| [Logmatic.io](https://github.com/logmatic/logmatic-go) | Hook for logging to [Logmatic.io](http://logmatic.io/) |
-| [Logrusly](https://github.com/sebest/logrusly) | Send logs to [Loggly](https://www.loggly.com/) |
-| [Logstash](https://github.com/bshuster-repo/logrus-logstash-hook) | Hook for logging to [Logstash](https://www.elastic.co/products/logstash) |
-| [Mail](https://github.com/zbindenren/logrus_mail) | Hook for sending exceptions via mail |
-| [Mattermost](https://github.com/shuLhan/mattermost-integration/tree/master/hooks/logrus) | Hook for logging to [Mattermost](https://mattermost.com/) |
-| [Mongodb](https://github.com/weekface/mgorus) | Hook for logging to mongodb |
-| [NATS-Hook](https://github.com/rybit/nats_logrus_hook) | Hook for logging to [NATS](https://nats.io) |
-| [Octokit](https://github.com/dorajistyle/logrus-octokit-hook) | Hook for logging to github via octokit |
-| [Papertrail](https://github.com/polds/logrus-papertrail-hook) | Send errors to the [Papertrail](https://papertrailapp.com) hosted logging service via UDP. |
-| [PostgreSQL](https://github.com/gemnasium/logrus-postgresql-hook) | Send logs to [PostgreSQL](http://postgresql.org) |
-| [Pushover](https://github.com/toorop/logrus_pushover) | Send error via [Pushover](https://pushover.net) |
-| [Raygun](https://github.com/squirkle/logrus-raygun-hook) | Hook for logging to [Raygun.io](http://raygun.io/) |
-| [Redis-Hook](https://github.com/rogierlommers/logrus-redis-hook) | Hook for logging to a ELK stack (through Redis) |
-| [Rollrus](https://github.com/heroku/rollrus) | Hook for sending errors to rollbar |
-| [Scribe](https://github.com/sagar8192/logrus-scribe-hook) | Hook for logging to [Scribe](https://github.com/facebookarchive/scribe)|
-| [Sentry](https://github.com/evalphobia/logrus_sentry) | Send errors to the Sentry error logging and aggregation service. |
-| [Slackrus](https://github.com/johntdyer/slackrus) | Hook for Slack chat. |
-| [Stackdriver](https://github.com/knq/sdhook) | Hook for logging to [Google Stackdriver](https://cloud.google.com/logging/) |
-| [Sumorus](https://github.com/doublefree/sumorus) | Hook for logging to [SumoLogic](https://www.sumologic.com/)|
-| [Syslog](https://github.com/sirupsen/logrus/blob/master/hooks/syslog/syslog.go) | Send errors to remote syslog server. Uses standard library `log/syslog` behind the scenes. |
-| [Syslog TLS](https://github.com/shinji62/logrus-syslog-ng) | Send errors to remote syslog server with TLS support. |
-| [Telegram](https://github.com/rossmcdonald/telegram_hook) | Hook for logging errors to [Telegram](https://telegram.org/) |
-| [TraceView](https://github.com/evalphobia/logrus_appneta) | Hook for logging to [AppNeta TraceView](https://www.appneta.com/products/traceview/) |
-| [Typetalk](https://github.com/dragon3/logrus-typetalk-hook) | Hook for logging to [Typetalk](https://www.typetalk.in/) |
-| [logz.io](https://github.com/ripcurld00d/logrus-logzio-hook) | Hook for logging to [logz.io](https://logz.io), a Log as a Service using Logstash |
-| [SQS-Hook](https://github.com/tsarpaul/logrus_sqs) | Hook for logging to [Amazon Simple Queue Service (SQS)](https://aws.amazon.com/sqs/) |
-
-#### Level logging
-
-Logrus has six logging levels: Debug, Info, Warning, Error, Fatal and Panic.
-
-```go
-log.Debug("Useful debugging information.")
-log.Info("Something noteworthy happened!")
-log.Warn("You should probably take a look at this.")
-log.Error("Something failed but I'm not quitting.")
-// Calls os.Exit(1) after logging
-log.Fatal("Bye.")
-// Calls panic() after logging
-log.Panic("I'm bailing.")
-```
-
-You can set the logging level on a `Logger`, then it will only log entries with
-that severity or anything above it:
-
-```go
-// Will log anything that is info or above (warn, error, fatal, panic). Default.
-log.SetLevel(log.InfoLevel)
-```
-
-It may be useful to set `log.Level = logrus.DebugLevel` in a debug or verbose
-environment if your application has that.
-
-#### Entries
-
-Besides the fields added with `WithField` or `WithFields` some fields are
-automatically added to all logging events:
-
-1. `time`. The timestamp when the entry was created.
-2. `msg`. The logging message passed to `{Info,Warn,Error,Fatal,Panic}` after
- the `AddFields` call. E.g. `Failed to send event.`
-3. `level`. The logging level. E.g. `info`.
-
-#### Environments
-
-Logrus has no notion of environment.
-
-If you wish for hooks and formatters to only be used in specific environments,
-you should handle that yourself. For example, if your application has a global
-variable `Environment`, which is a string representation of the environment you
-could do:
-
-```go
-import (
- log "github.com/sirupsen/logrus"
-)
-
-init() {
- // do something here to set environment depending on an environment variable
- // or command-line flag
- if Environment == "production" {
- log.SetFormatter(&log.JSONFormatter{})
- } else {
- // The TextFormatter is default, you don't actually have to do this.
- log.SetFormatter(&log.TextFormatter{})
- }
-}
-```
-
-This configuration is how `logrus` was intended to be used, but JSON in
-production is mostly only useful if you do log aggregation with tools like
-Splunk or Logstash.
-
-#### Formatters
-
-The built-in logging formatters are:
-
-* `logrus.TextFormatter`. Logs the event in colors if stdout is a tty, otherwise
- without colors.
- * *Note:* to force colored output when there is no TTY, set the `ForceColors`
- field to `true`. To force no colored output even if there is a TTY set the
- `DisableColors` field to `true`. For Windows, see
- [github.com/mattn/go-colorable](https://github.com/mattn/go-colorable).
- * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#TextFormatter).
-* `logrus.JSONFormatter`. Logs fields as JSON.
- * All options are listed in the [generated docs](https://godoc.org/github.com/sirupsen/logrus#JSONFormatter).
-
-Third party logging formatters:
-
-* [`FluentdFormatter`](https://github.com/joonix/log). Formats entries that can by parsed by Kubernetes and Google Container Engine.
-* [`logstash`](https://github.com/bshuster-repo/logrus-logstash-hook). Logs fields as [Logstash](http://logstash.net) Events.
-* [`prefixed`](https://github.com/x-cray/logrus-prefixed-formatter). Displays log entry source along with alternative layout.
-* [`zalgo`](https://github.com/aybabtme/logzalgo). Invoking the P͉̫o̳̼̊w̖͈̰͎e̬͔̭͂r͚̼̹̲ ̫͓͉̳͈ō̠͕͖̚f̝͍̠ ͕̲̞͖͑Z̖̫̤̫ͪa͉̬͈̗l͖͎g̳̥o̰̥̅!̣͔̲̻͊̄ ̙̘̦̹̦.
-
-You can define your formatter by implementing the `Formatter` interface,
-requiring a `Format` method. `Format` takes an `*Entry`. `entry.Data` is a
-`Fields` type (`map[string]interface{}`) with all your fields as well as the
-default ones (see Entries section above):
-
-```go
-type MyJSONFormatter struct {
-}
-
-log.SetFormatter(new(MyJSONFormatter))
-
-func (f *MyJSONFormatter) Format(entry *Entry) ([]byte, error) {
- // Note this doesn't include Time, Level and Message which are available on
- // the Entry. Consult `godoc` on information about those fields or read the
- // source of the official loggers.
- serialized, err := json.Marshal(entry.Data)
- if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
- }
- return append(serialized, '\n'), nil
-}
-```
-
-#### Logger as an `io.Writer`
-
-Logrus can be transformed into an `io.Writer`. That writer is the end of an `io.Pipe` and it is your responsibility to close it.
-
-```go
-w := logger.Writer()
-defer w.Close()
-
-srv := http.Server{
- // create a stdlib log.Logger that writes to
- // logrus.Logger.
- ErrorLog: log.New(w, "", 0),
-}
-```
-
-Each line written to that writer will be printed the usual way, using formatters
-and hooks. The level for those entries is `info`.
-
-This means that we can override the standard library logger easily:
-
-```go
-logger := logrus.New()
-logger.Formatter = &logrus.JSONFormatter{}
-
-// Use logrus for standard log output
-// Note that `log` here references stdlib's log
-// Not logrus imported under the name `log`.
-log.SetOutput(logger.Writer())
-```
-
-#### Rotation
-
-Log rotation is not provided with Logrus. Log rotation should be done by an
-external program (like `logrotate(8)`) that can compress and delete old log
-entries. It should not be a feature of the application-level logger.
-
-#### Tools
-
-| Tool | Description |
-| ---- | ----------- |
-|[Logrus Mate](https://github.com/gogap/logrus_mate)|Logrus mate is a tool for Logrus to manage loggers, you can initial logger's level, hook and formatter by config file, the logger will generated with different config at different environment.|
-|[Logrus Viper Helper](https://github.com/heirko/go-contrib/tree/master/logrusHelper)|An Helper around Logrus to wrap with spf13/Viper to load configuration with fangs! And to simplify Logrus configuration use some behavior of [Logrus Mate](https://github.com/gogap/logrus_mate). [sample](https://github.com/heirko/iris-contrib/blob/master/middleware/logrus-logger/example) |
-
-#### Testing
-
-Logrus has a built in facility for asserting the presence of log messages. This is implemented through the `test` hook and provides:
-
-* decorators for existing logger (`test.NewLocal` and `test.NewGlobal`) which basically just add the `test` hook
-* a test logger (`test.NewNullLogger`) that just records log messages (and does not output any):
-
-```go
-import(
- "github.com/sirupsen/logrus"
- "github.com/sirupsen/logrus/hooks/test"
- "github.com/stretchr/testify/assert"
- "testing"
-)
-
-func TestSomething(t*testing.T){
- logger, hook := test.NewNullLogger()
- logger.Error("Helloerror")
-
- assert.Equal(t, 1, len(hook.Entries))
- assert.Equal(t, logrus.ErrorLevel, hook.LastEntry().Level)
- assert.Equal(t, "Helloerror", hook.LastEntry().Message)
-
- hook.Reset()
- assert.Nil(t, hook.LastEntry())
-}
-```
-
-#### Fatal handlers
-
-Logrus can register one or more functions that will be called when any `fatal`
-level message is logged. The registered handlers will be executed before
-logrus performs a `os.Exit(1)`. This behavior may be helpful if callers need
-to gracefully shutdown. Unlike a `panic("Something went wrong...")` call which can be intercepted with a deferred `recover` a call to `os.Exit(1)` can not be intercepted.
-
-```
-...
-handler := func() {
- // gracefully shutdown something...
-}
-logrus.RegisterExitHandler(handler)
-...
-```
-
-#### Thread safety
-
-By default Logger is protected by mutex for concurrent writes, this mutex is invoked when calling hooks and writing logs.
-If you are sure such locking is not needed, you can call logger.SetNoLock() to disable the locking.
-
-Situation when locking is not needed includes:
-
-* You have no hooks registered, or hooks calling is already thread-safe.
-
-* Writing to logger.Out is already thread-safe, for example:
-
- 1) logger.Out is protected by locks.
-
- 2) logger.Out is a os.File handler opened with `O_APPEND` flag, and every write is smaller than 4k. (This allow multi-thread/multi-process writing)
-
- (Refer to http://www.notthewizard.com/2014/06/17/are-files-appends-really-atomic/)
diff --git a/vendor/github.com/Sirupsen/logrus/alt_exit.go b/vendor/github.com/Sirupsen/logrus/alt_exit.go
deleted file mode 100644
index 8af90637a..000000000
--- a/vendor/github.com/Sirupsen/logrus/alt_exit.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package logrus
-
-// The following code was sourced and modified from the
-// https://github.com/tebeka/atexit package governed by the following license:
-//
-// Copyright (c) 2012 Miki Tebeka .
-//
-// 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.
-
-import (
- "fmt"
- "os"
-)
-
-var handlers = []func(){}
-
-func runHandler(handler func()) {
- defer func() {
- if err := recover(); err != nil {
- fmt.Fprintln(os.Stderr, "Error: Logrus exit handler error:", err)
- }
- }()
-
- handler()
-}
-
-func runHandlers() {
- for _, handler := range handlers {
- runHandler(handler)
- }
-}
-
-// Exit runs all the Logrus atexit handlers and then terminates the program using os.Exit(code)
-func Exit(code int) {
- runHandlers()
- os.Exit(code)
-}
-
-// RegisterExitHandler adds a Logrus Exit handler, call logrus.Exit to invoke
-// all handlers. The handlers will also be invoked when any Fatal log entry is
-// made.
-//
-// This method is useful when a caller wishes to use logrus to log a fatal
-// message but also needs to gracefully shutdown. An example usecase could be
-// closing database connections, or sending a alert that the application is
-// closing.
-func RegisterExitHandler(handler func()) {
- handlers = append(handlers, handler)
-}
diff --git a/vendor/github.com/Sirupsen/logrus/alt_exit_test.go b/vendor/github.com/Sirupsen/logrus/alt_exit_test.go
deleted file mode 100644
index a08b1a898..000000000
--- a/vendor/github.com/Sirupsen/logrus/alt_exit_test.go
+++ /dev/null
@@ -1,83 +0,0 @@
-package logrus
-
-import (
- "io/ioutil"
- "log"
- "os"
- "os/exec"
- "path/filepath"
- "testing"
- "time"
-)
-
-func TestRegister(t *testing.T) {
- current := len(handlers)
- RegisterExitHandler(func() {})
- if len(handlers) != current+1 {
- t.Fatalf("expected %d handlers, got %d", current+1, len(handlers))
- }
-}
-
-func TestHandler(t *testing.T) {
- tempDir, err := ioutil.TempDir("", "test_handler")
- if err != nil {
- log.Fatalf("can't create temp dir. %q", err)
- }
- defer os.RemoveAll(tempDir)
-
- gofile := filepath.Join(tempDir, "gofile.go")
- if err := ioutil.WriteFile(gofile, testprog, 0666); err != nil {
- t.Fatalf("can't create go file. %q", err)
- }
-
- outfile := filepath.Join(tempDir, "outfile.out")
- arg := time.Now().UTC().String()
- err = exec.Command("go", "run", gofile, outfile, arg).Run()
- if err == nil {
- t.Fatalf("completed normally, should have failed")
- }
-
- data, err := ioutil.ReadFile(outfile)
- if err != nil {
- t.Fatalf("can't read output file %s. %q", outfile, err)
- }
-
- if string(data) != arg {
- t.Fatalf("bad data. Expected %q, got %q", data, arg)
- }
-}
-
-var testprog = []byte(`
-// Test program for atexit, gets output file and data as arguments and writes
-// data to output file in atexit handler.
-package main
-
-import (
- "github.com/sirupsen/logrus"
- "flag"
- "fmt"
- "io/ioutil"
-)
-
-var outfile = ""
-var data = ""
-
-func handler() {
- ioutil.WriteFile(outfile, []byte(data), 0666)
-}
-
-func badHandler() {
- n := 0
- fmt.Println(1/n)
-}
-
-func main() {
- flag.Parse()
- outfile = flag.Arg(0)
- data = flag.Arg(1)
-
- logrus.RegisterExitHandler(handler)
- logrus.RegisterExitHandler(badHandler)
- logrus.Fatal("Bye bye")
-}
-`)
diff --git a/vendor/github.com/Sirupsen/logrus/appveyor.yml b/vendor/github.com/Sirupsen/logrus/appveyor.yml
deleted file mode 100644
index 96c2ce15f..000000000
--- a/vendor/github.com/Sirupsen/logrus/appveyor.yml
+++ /dev/null
@@ -1,14 +0,0 @@
-version: "{build}"
-platform: x64
-clone_folder: c:\gopath\src\github.com\sirupsen\logrus
-environment:
- GOPATH: c:\gopath
-branches:
- only:
- - master
-install:
- - set PATH=%GOPATH%\bin;c:\go\bin;%PATH%
- - go version
-build_script:
- - go get -t
- - go test
diff --git a/vendor/github.com/Sirupsen/logrus/doc.go b/vendor/github.com/Sirupsen/logrus/doc.go
deleted file mode 100644
index da67aba06..000000000
--- a/vendor/github.com/Sirupsen/logrus/doc.go
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
-Package logrus is a structured logger for Go, completely API compatible with the standard library logger.
-
-
-The simplest way to use Logrus is simply the package-level exported logger:
-
- package main
-
- import (
- log "github.com/sirupsen/logrus"
- )
-
- func main() {
- log.WithFields(log.Fields{
- "animal": "walrus",
- "number": 1,
- "size": 10,
- }).Info("A walrus appears")
- }
-
-Output:
- time="2015-09-07T08:48:33Z" level=info msg="A walrus appears" animal=walrus number=1 size=10
-
-For a full guide visit https://github.com/sirupsen/logrus
-*/
-package logrus
diff --git a/vendor/github.com/Sirupsen/logrus/entry.go b/vendor/github.com/Sirupsen/logrus/entry.go
deleted file mode 100644
index 1fad45e08..000000000
--- a/vendor/github.com/Sirupsen/logrus/entry.go
+++ /dev/null
@@ -1,279 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "fmt"
- "os"
- "sync"
- "time"
-)
-
-var bufferPool *sync.Pool
-
-func init() {
- bufferPool = &sync.Pool{
- New: func() interface{} {
- return new(bytes.Buffer)
- },
- }
-}
-
-// Defines the key when adding errors using WithError.
-var ErrorKey = "error"
-
-// An entry is the final or intermediate Logrus logging entry. It contains all
-// the fields passed with WithField{,s}. It's finally logged when Debug, Info,
-// Warn, Error, Fatal or Panic is called on it. These objects can be reused and
-// passed around as much as you wish to avoid field duplication.
-type Entry struct {
- Logger *Logger
-
- // Contains all the fields set by the user.
- Data Fields
-
- // Time at which the log entry was created
- Time time.Time
-
- // Level the log entry was logged at: Debug, Info, Warn, Error, Fatal or Panic
- // This field will be set on entry firing and the value will be equal to the one in Logger struct field.
- Level Level
-
- // Message passed to Debug, Info, Warn, Error, Fatal or Panic
- Message string
-
- // When formatter is called in entry.log(), an Buffer may be set to entry
- Buffer *bytes.Buffer
-}
-
-func NewEntry(logger *Logger) *Entry {
- return &Entry{
- Logger: logger,
- // Default is three fields, give a little extra room
- Data: make(Fields, 5),
- }
-}
-
-// Returns the string representation from the reader and ultimately the
-// formatter.
-func (entry *Entry) String() (string, error) {
- serialized, err := entry.Logger.Formatter.Format(entry)
- if err != nil {
- return "", err
- }
- str := string(serialized)
- return str, nil
-}
-
-// Add an error as single field (using the key defined in ErrorKey) to the Entry.
-func (entry *Entry) WithError(err error) *Entry {
- return entry.WithField(ErrorKey, err)
-}
-
-// Add a single field to the Entry.
-func (entry *Entry) WithField(key string, value interface{}) *Entry {
- return entry.WithFields(Fields{key: value})
-}
-
-// Add a map of fields to the Entry.
-func (entry *Entry) WithFields(fields Fields) *Entry {
- data := make(Fields, len(entry.Data)+len(fields))
- for k, v := range entry.Data {
- data[k] = v
- }
- for k, v := range fields {
- data[k] = v
- }
- return &Entry{Logger: entry.Logger, Data: data}
-}
-
-// This function is not declared with a pointer value because otherwise
-// race conditions will occur when using multiple goroutines
-func (entry Entry) log(level Level, msg string) {
- var buffer *bytes.Buffer
- entry.Time = time.Now()
- entry.Level = level
- entry.Message = msg
-
- entry.Logger.mu.Lock()
- err := entry.Logger.Hooks.Fire(level, &entry)
- entry.Logger.mu.Unlock()
- if err != nil {
- entry.Logger.mu.Lock()
- fmt.Fprintf(os.Stderr, "Failed to fire hook: %v\n", err)
- entry.Logger.mu.Unlock()
- }
- buffer = bufferPool.Get().(*bytes.Buffer)
- buffer.Reset()
- defer bufferPool.Put(buffer)
- entry.Buffer = buffer
- serialized, err := entry.Logger.Formatter.Format(&entry)
- entry.Buffer = nil
- if err != nil {
- entry.Logger.mu.Lock()
- fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err)
- entry.Logger.mu.Unlock()
- } else {
- entry.Logger.mu.Lock()
- _, err = entry.Logger.Out.Write(serialized)
- if err != nil {
- fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err)
- }
- entry.Logger.mu.Unlock()
- }
-
- // To avoid Entry#log() returning a value that only would make sense for
- // panic() to use in Entry#Panic(), we avoid the allocation by checking
- // directly here.
- if level <= PanicLevel {
- panic(&entry)
- }
-}
-
-func (entry *Entry) Debug(args ...interface{}) {
- if entry.Logger.level() >= DebugLevel {
- entry.log(DebugLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Print(args ...interface{}) {
- entry.Info(args...)
-}
-
-func (entry *Entry) Info(args ...interface{}) {
- if entry.Logger.level() >= InfoLevel {
- entry.log(InfoLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Warn(args ...interface{}) {
- if entry.Logger.level() >= WarnLevel {
- entry.log(WarnLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Warning(args ...interface{}) {
- entry.Warn(args...)
-}
-
-func (entry *Entry) Error(args ...interface{}) {
- if entry.Logger.level() >= ErrorLevel {
- entry.log(ErrorLevel, fmt.Sprint(args...))
- }
-}
-
-func (entry *Entry) Fatal(args ...interface{}) {
- if entry.Logger.level() >= FatalLevel {
- entry.log(FatalLevel, fmt.Sprint(args...))
- }
- Exit(1)
-}
-
-func (entry *Entry) Panic(args ...interface{}) {
- if entry.Logger.level() >= PanicLevel {
- entry.log(PanicLevel, fmt.Sprint(args...))
- }
- panic(fmt.Sprint(args...))
-}
-
-// Entry Printf family functions
-
-func (entry *Entry) Debugf(format string, args ...interface{}) {
- if entry.Logger.level() >= DebugLevel {
- entry.Debug(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Infof(format string, args ...interface{}) {
- if entry.Logger.level() >= InfoLevel {
- entry.Info(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Printf(format string, args ...interface{}) {
- entry.Infof(format, args...)
-}
-
-func (entry *Entry) Warnf(format string, args ...interface{}) {
- if entry.Logger.level() >= WarnLevel {
- entry.Warn(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Warningf(format string, args ...interface{}) {
- entry.Warnf(format, args...)
-}
-
-func (entry *Entry) Errorf(format string, args ...interface{}) {
- if entry.Logger.level() >= ErrorLevel {
- entry.Error(fmt.Sprintf(format, args...))
- }
-}
-
-func (entry *Entry) Fatalf(format string, args ...interface{}) {
- if entry.Logger.level() >= FatalLevel {
- entry.Fatal(fmt.Sprintf(format, args...))
- }
- Exit(1)
-}
-
-func (entry *Entry) Panicf(format string, args ...interface{}) {
- if entry.Logger.level() >= PanicLevel {
- entry.Panic(fmt.Sprintf(format, args...))
- }
-}
-
-// Entry Println family functions
-
-func (entry *Entry) Debugln(args ...interface{}) {
- if entry.Logger.level() >= DebugLevel {
- entry.Debug(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Infoln(args ...interface{}) {
- if entry.Logger.level() >= InfoLevel {
- entry.Info(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Println(args ...interface{}) {
- entry.Infoln(args...)
-}
-
-func (entry *Entry) Warnln(args ...interface{}) {
- if entry.Logger.level() >= WarnLevel {
- entry.Warn(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Warningln(args ...interface{}) {
- entry.Warnln(args...)
-}
-
-func (entry *Entry) Errorln(args ...interface{}) {
- if entry.Logger.level() >= ErrorLevel {
- entry.Error(entry.sprintlnn(args...))
- }
-}
-
-func (entry *Entry) Fatalln(args ...interface{}) {
- if entry.Logger.level() >= FatalLevel {
- entry.Fatal(entry.sprintlnn(args...))
- }
- Exit(1)
-}
-
-func (entry *Entry) Panicln(args ...interface{}) {
- if entry.Logger.level() >= PanicLevel {
- entry.Panic(entry.sprintlnn(args...))
- }
-}
-
-// Sprintlnn => Sprint no newline. This is to get the behavior of how
-// fmt.Sprintln where spaces are always added between operands, regardless of
-// their type. Instead of vendoring the Sprintln implementation to spare a
-// string allocation, we do the simplest thing.
-func (entry *Entry) sprintlnn(args ...interface{}) string {
- msg := fmt.Sprintln(args...)
- return msg[:len(msg)-1]
-}
diff --git a/vendor/github.com/Sirupsen/logrus/entry_test.go b/vendor/github.com/Sirupsen/logrus/entry_test.go
deleted file mode 100644
index 99c3b41d5..000000000
--- a/vendor/github.com/Sirupsen/logrus/entry_test.go
+++ /dev/null
@@ -1,77 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "fmt"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestEntryWithError(t *testing.T) {
-
- assert := assert.New(t)
-
- defer func() {
- ErrorKey = "error"
- }()
-
- err := fmt.Errorf("kaboom at layer %d", 4711)
-
- assert.Equal(err, WithError(err).Data["error"])
-
- logger := New()
- logger.Out = &bytes.Buffer{}
- entry := NewEntry(logger)
-
- assert.Equal(err, entry.WithError(err).Data["error"])
-
- ErrorKey = "err"
-
- assert.Equal(err, entry.WithError(err).Data["err"])
-
-}
-
-func TestEntryPanicln(t *testing.T) {
- errBoom := fmt.Errorf("boom time")
-
- defer func() {
- p := recover()
- assert.NotNil(t, p)
-
- switch pVal := p.(type) {
- case *Entry:
- assert.Equal(t, "kaboom", pVal.Message)
- assert.Equal(t, errBoom, pVal.Data["err"])
- default:
- t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal)
- }
- }()
-
- logger := New()
- logger.Out = &bytes.Buffer{}
- entry := NewEntry(logger)
- entry.WithField("err", errBoom).Panicln("kaboom")
-}
-
-func TestEntryPanicf(t *testing.T) {
- errBoom := fmt.Errorf("boom again")
-
- defer func() {
- p := recover()
- assert.NotNil(t, p)
-
- switch pVal := p.(type) {
- case *Entry:
- assert.Equal(t, "kaboom true", pVal.Message)
- assert.Equal(t, errBoom, pVal.Data["err"])
- default:
- t.Fatalf("want type *Entry, got %T: %#v", pVal, pVal)
- }
- }()
-
- logger := New()
- logger.Out = &bytes.Buffer{}
- entry := NewEntry(logger)
- entry.WithField("err", errBoom).Panicf("kaboom %v", true)
-}
diff --git a/vendor/github.com/Sirupsen/logrus/example_basic_test.go b/vendor/github.com/Sirupsen/logrus/example_basic_test.go
deleted file mode 100644
index a2acf550c..000000000
--- a/vendor/github.com/Sirupsen/logrus/example_basic_test.go
+++ /dev/null
@@ -1,69 +0,0 @@
-package logrus_test
-
-import (
- "github.com/sirupsen/logrus"
- "os"
-)
-
-func Example_basic() {
- var log = logrus.New()
- log.Formatter = new(logrus.JSONFormatter)
- log.Formatter = new(logrus.TextFormatter) //default
- log.Formatter.(*logrus.TextFormatter).DisableTimestamp = true // remove timestamp from test output
- log.Level = logrus.DebugLevel
- log.Out = os.Stdout
-
- // file, err := os.OpenFile("logrus.log", os.O_CREATE|os.O_WRONLY, 0666)
- // if err == nil {
- // log.Out = file
- // } else {
- // log.Info("Failed to log to file, using default stderr")
- // }
-
- defer func() {
- err := recover()
- if err != nil {
- entry := err.(*logrus.Entry)
- log.WithFields(logrus.Fields{
- "omg": true,
- "err_animal": entry.Data["animal"],
- "err_size": entry.Data["size"],
- "err_level": entry.Level,
- "err_message": entry.Message,
- "number": 100,
- }).Error("The ice breaks!") // or use Fatal() to force the process to exit with a nonzero code
- }
- }()
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "number": 8,
- }).Debug("Started observing beach")
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-
- log.WithFields(logrus.Fields{
- "omg": true,
- "number": 122,
- }).Warn("The group's number increased tremendously!")
-
- log.WithFields(logrus.Fields{
- "temperature": -4,
- }).Debug("Temperature changes")
-
- log.WithFields(logrus.Fields{
- "animal": "orca",
- "size": 9009,
- }).Panic("It's over 9000!")
-
- // Output:
- // level=debug msg="Started observing beach" animal=walrus number=8
- // level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
- // level=warning msg="The group's number increased tremendously!" number=122 omg=true
- // level=debug msg="Temperature changes" temperature=-4
- // level=panic msg="It's over 9000!" animal=orca size=9009
- // level=error msg="The ice breaks!" err_animal=orca err_level=panic err_message="It's over 9000!" err_size=9009 number=100 omg=true
-}
diff --git a/vendor/github.com/Sirupsen/logrus/example_hook_test.go b/vendor/github.com/Sirupsen/logrus/example_hook_test.go
deleted file mode 100644
index d4ddffca3..000000000
--- a/vendor/github.com/Sirupsen/logrus/example_hook_test.go
+++ /dev/null
@@ -1,35 +0,0 @@
-package logrus_test
-
-import (
- "github.com/sirupsen/logrus"
- "gopkg.in/gemnasium/logrus-airbrake-hook.v2"
- "os"
-)
-
-func Example_hook() {
- var log = logrus.New()
- log.Formatter = new(logrus.TextFormatter) // default
- log.Formatter.(*logrus.TextFormatter).DisableTimestamp = true // remove timestamp from test output
- log.Hooks.Add(airbrake.NewHook(123, "xyz", "development"))
- log.Out = os.Stdout
-
- log.WithFields(logrus.Fields{
- "animal": "walrus",
- "size": 10,
- }).Info("A group of walrus emerges from the ocean")
-
- log.WithFields(logrus.Fields{
- "omg": true,
- "number": 122,
- }).Warn("The group's number increased tremendously!")
-
- log.WithFields(logrus.Fields{
- "omg": true,
- "number": 100,
- }).Error("The ice breaks!")
-
- // Output:
- // level=info msg="A group of walrus emerges from the ocean" animal=walrus size=10
- // level=warning msg="The group's number increased tremendously!" number=122 omg=true
- // level=error msg="The ice breaks!" number=100 omg=true
-}
diff --git a/vendor/github.com/Sirupsen/logrus/exported.go b/vendor/github.com/Sirupsen/logrus/exported.go
deleted file mode 100644
index 013183eda..000000000
--- a/vendor/github.com/Sirupsen/logrus/exported.go
+++ /dev/null
@@ -1,193 +0,0 @@
-package logrus
-
-import (
- "io"
-)
-
-var (
- // std is the name of the standard logger in stdlib `log`
- std = New()
-)
-
-func StandardLogger() *Logger {
- return std
-}
-
-// SetOutput sets the standard logger output.
-func SetOutput(out io.Writer) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Out = out
-}
-
-// SetFormatter sets the standard logger formatter.
-func SetFormatter(formatter Formatter) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Formatter = formatter
-}
-
-// SetLevel sets the standard logger level.
-func SetLevel(level Level) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.SetLevel(level)
-}
-
-// GetLevel returns the standard logger level.
-func GetLevel() Level {
- std.mu.Lock()
- defer std.mu.Unlock()
- return std.level()
-}
-
-// AddHook adds a hook to the standard logger hooks.
-func AddHook(hook Hook) {
- std.mu.Lock()
- defer std.mu.Unlock()
- std.Hooks.Add(hook)
-}
-
-// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.
-func WithError(err error) *Entry {
- return std.WithField(ErrorKey, err)
-}
-
-// WithField creates an entry from the standard logger and adds a field to
-// it. If you want multiple fields, use `WithFields`.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithField(key string, value interface{}) *Entry {
- return std.WithField(key, value)
-}
-
-// WithFields creates an entry from the standard logger and adds multiple
-// fields to it. This is simply a helper for `WithField`, invoking it
-// once for each field.
-//
-// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal
-// or Panic on the Entry it returns.
-func WithFields(fields Fields) *Entry {
- return std.WithFields(fields)
-}
-
-// Debug logs a message at level Debug on the standard logger.
-func Debug(args ...interface{}) {
- std.Debug(args...)
-}
-
-// Print logs a message at level Info on the standard logger.
-func Print(args ...interface{}) {
- std.Print(args...)
-}
-
-// Info logs a message at level Info on the standard logger.
-func Info(args ...interface{}) {
- std.Info(args...)
-}
-
-// Warn logs a message at level Warn on the standard logger.
-func Warn(args ...interface{}) {
- std.Warn(args...)
-}
-
-// Warning logs a message at level Warn on the standard logger.
-func Warning(args ...interface{}) {
- std.Warning(args...)
-}
-
-// Error logs a message at level Error on the standard logger.
-func Error(args ...interface{}) {
- std.Error(args...)
-}
-
-// Panic logs a message at level Panic on the standard logger.
-func Panic(args ...interface{}) {
- std.Panic(args...)
-}
-
-// Fatal logs a message at level Fatal on the standard logger.
-func Fatal(args ...interface{}) {
- std.Fatal(args...)
-}
-
-// Debugf logs a message at level Debug on the standard logger.
-func Debugf(format string, args ...interface{}) {
- std.Debugf(format, args...)
-}
-
-// Printf logs a message at level Info on the standard logger.
-func Printf(format string, args ...interface{}) {
- std.Printf(format, args...)
-}
-
-// Infof logs a message at level Info on the standard logger.
-func Infof(format string, args ...interface{}) {
- std.Infof(format, args...)
-}
-
-// Warnf logs a message at level Warn on the standard logger.
-func Warnf(format string, args ...interface{}) {
- std.Warnf(format, args...)
-}
-
-// Warningf logs a message at level Warn on the standard logger.
-func Warningf(format string, args ...interface{}) {
- std.Warningf(format, args...)
-}
-
-// Errorf logs a message at level Error on the standard logger.
-func Errorf(format string, args ...interface{}) {
- std.Errorf(format, args...)
-}
-
-// Panicf logs a message at level Panic on the standard logger.
-func Panicf(format string, args ...interface{}) {
- std.Panicf(format, args...)
-}
-
-// Fatalf logs a message at level Fatal on the standard logger.
-func Fatalf(format string, args ...interface{}) {
- std.Fatalf(format, args...)
-}
-
-// Debugln logs a message at level Debug on the standard logger.
-func Debugln(args ...interface{}) {
- std.Debugln(args...)
-}
-
-// Println logs a message at level Info on the standard logger.
-func Println(args ...interface{}) {
- std.Println(args...)
-}
-
-// Infoln logs a message at level Info on the standard logger.
-func Infoln(args ...interface{}) {
- std.Infoln(args...)
-}
-
-// Warnln logs a message at level Warn on the standard logger.
-func Warnln(args ...interface{}) {
- std.Warnln(args...)
-}
-
-// Warningln logs a message at level Warn on the standard logger.
-func Warningln(args ...interface{}) {
- std.Warningln(args...)
-}
-
-// Errorln logs a message at level Error on the standard logger.
-func Errorln(args ...interface{}) {
- std.Errorln(args...)
-}
-
-// Panicln logs a message at level Panic on the standard logger.
-func Panicln(args ...interface{}) {
- std.Panicln(args...)
-}
-
-// Fatalln logs a message at level Fatal on the standard logger.
-func Fatalln(args ...interface{}) {
- std.Fatalln(args...)
-}
diff --git a/vendor/github.com/Sirupsen/logrus/formatter.go b/vendor/github.com/Sirupsen/logrus/formatter.go
deleted file mode 100644
index b183ff5b1..000000000
--- a/vendor/github.com/Sirupsen/logrus/formatter.go
+++ /dev/null
@@ -1,45 +0,0 @@
-package logrus
-
-import "time"
-
-const defaultTimestampFormat = time.RFC3339
-
-// The Formatter interface is used to implement a custom Formatter. It takes an
-// `Entry`. It exposes all the fields, including the default ones:
-//
-// * `entry.Data["msg"]`. The message passed from Info, Warn, Error ..
-// * `entry.Data["time"]`. The timestamp.
-// * `entry.Data["level"]. The level the entry was logged at.
-//
-// Any additional fields added with `WithField` or `WithFields` are also in
-// `entry.Data`. Format is expected to return an array of bytes which are then
-// logged to `logger.Out`.
-type Formatter interface {
- Format(*Entry) ([]byte, error)
-}
-
-// This is to not silently overwrite `time`, `msg` and `level` fields when
-// dumping it. If this code wasn't there doing:
-//
-// logrus.WithField("level", 1).Info("hello")
-//
-// Would just silently drop the user provided level. Instead with this code
-// it'll logged as:
-//
-// {"level": "info", "fields.level": 1, "msg": "hello", "time": "..."}
-//
-// It's not exported because it's still using Data in an opinionated way. It's to
-// avoid code duplication between the two default formatters.
-func prefixFieldClashes(data Fields) {
- if t, ok := data["time"]; ok {
- data["fields.time"] = t
- }
-
- if m, ok := data["msg"]; ok {
- data["fields.msg"] = m
- }
-
- if l, ok := data["level"]; ok {
- data["fields.level"] = l
- }
-}
diff --git a/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go b/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go
deleted file mode 100644
index d9481589f..000000000
--- a/vendor/github.com/Sirupsen/logrus/formatter_bench_test.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package logrus
-
-import (
- "fmt"
- "testing"
- "time"
-)
-
-// smallFields is a small size data set for benchmarking
-var smallFields = Fields{
- "foo": "bar",
- "baz": "qux",
- "one": "two",
- "three": "four",
-}
-
-// largeFields is a large size data set for benchmarking
-var largeFields = Fields{
- "foo": "bar",
- "baz": "qux",
- "one": "two",
- "three": "four",
- "five": "six",
- "seven": "eight",
- "nine": "ten",
- "eleven": "twelve",
- "thirteen": "fourteen",
- "fifteen": "sixteen",
- "seventeen": "eighteen",
- "nineteen": "twenty",
- "a": "b",
- "c": "d",
- "e": "f",
- "g": "h",
- "i": "j",
- "k": "l",
- "m": "n",
- "o": "p",
- "q": "r",
- "s": "t",
- "u": "v",
- "w": "x",
- "y": "z",
- "this": "will",
- "make": "thirty",
- "entries": "yeah",
-}
-
-var errorFields = Fields{
- "foo": fmt.Errorf("bar"),
- "baz": fmt.Errorf("qux"),
-}
-
-func BenchmarkErrorTextFormatter(b *testing.B) {
- doBenchmark(b, &TextFormatter{DisableColors: true}, errorFields)
-}
-
-func BenchmarkSmallTextFormatter(b *testing.B) {
- doBenchmark(b, &TextFormatter{DisableColors: true}, smallFields)
-}
-
-func BenchmarkLargeTextFormatter(b *testing.B) {
- doBenchmark(b, &TextFormatter{DisableColors: true}, largeFields)
-}
-
-func BenchmarkSmallColoredTextFormatter(b *testing.B) {
- doBenchmark(b, &TextFormatter{ForceColors: true}, smallFields)
-}
-
-func BenchmarkLargeColoredTextFormatter(b *testing.B) {
- doBenchmark(b, &TextFormatter{ForceColors: true}, largeFields)
-}
-
-func BenchmarkSmallJSONFormatter(b *testing.B) {
- doBenchmark(b, &JSONFormatter{}, smallFields)
-}
-
-func BenchmarkLargeJSONFormatter(b *testing.B) {
- doBenchmark(b, &JSONFormatter{}, largeFields)
-}
-
-func doBenchmark(b *testing.B, formatter Formatter, fields Fields) {
- logger := New()
-
- entry := &Entry{
- Time: time.Time{},
- Level: InfoLevel,
- Message: "message",
- Data: fields,
- Logger: logger,
- }
- var d []byte
- var err error
- for i := 0; i < b.N; i++ {
- d, err = formatter.Format(entry)
- if err != nil {
- b.Fatal(err)
- }
- b.SetBytes(int64(len(d)))
- }
-}
diff --git a/vendor/github.com/Sirupsen/logrus/hook_test.go b/vendor/github.com/Sirupsen/logrus/hook_test.go
deleted file mode 100644
index 4fea7514e..000000000
--- a/vendor/github.com/Sirupsen/logrus/hook_test.go
+++ /dev/null
@@ -1,144 +0,0 @@
-package logrus
-
-import (
- "sync"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-type TestHook struct {
- Fired bool
-}
-
-func (hook *TestHook) Fire(entry *Entry) error {
- hook.Fired = true
- return nil
-}
-
-func (hook *TestHook) Levels() []Level {
- return []Level{
- DebugLevel,
- InfoLevel,
- WarnLevel,
- ErrorLevel,
- FatalLevel,
- PanicLevel,
- }
-}
-
-func TestHookFires(t *testing.T) {
- hook := new(TestHook)
-
- LogAndAssertJSON(t, func(log *Logger) {
- log.Hooks.Add(hook)
- assert.Equal(t, hook.Fired, false)
-
- log.Print("test")
- }, func(fields Fields) {
- assert.Equal(t, hook.Fired, true)
- })
-}
-
-type ModifyHook struct {
-}
-
-func (hook *ModifyHook) Fire(entry *Entry) error {
- entry.Data["wow"] = "whale"
- return nil
-}
-
-func (hook *ModifyHook) Levels() []Level {
- return []Level{
- DebugLevel,
- InfoLevel,
- WarnLevel,
- ErrorLevel,
- FatalLevel,
- PanicLevel,
- }
-}
-
-func TestHookCanModifyEntry(t *testing.T) {
- hook := new(ModifyHook)
-
- LogAndAssertJSON(t, func(log *Logger) {
- log.Hooks.Add(hook)
- log.WithField("wow", "elephant").Print("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["wow"], "whale")
- })
-}
-
-func TestCanFireMultipleHooks(t *testing.T) {
- hook1 := new(ModifyHook)
- hook2 := new(TestHook)
-
- LogAndAssertJSON(t, func(log *Logger) {
- log.Hooks.Add(hook1)
- log.Hooks.Add(hook2)
-
- log.WithField("wow", "elephant").Print("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["wow"], "whale")
- assert.Equal(t, hook2.Fired, true)
- })
-}
-
-type ErrorHook struct {
- Fired bool
-}
-
-func (hook *ErrorHook) Fire(entry *Entry) error {
- hook.Fired = true
- return nil
-}
-
-func (hook *ErrorHook) Levels() []Level {
- return []Level{
- ErrorLevel,
- }
-}
-
-func TestErrorHookShouldntFireOnInfo(t *testing.T) {
- hook := new(ErrorHook)
-
- LogAndAssertJSON(t, func(log *Logger) {
- log.Hooks.Add(hook)
- log.Info("test")
- }, func(fields Fields) {
- assert.Equal(t, hook.Fired, false)
- })
-}
-
-func TestErrorHookShouldFireOnError(t *testing.T) {
- hook := new(ErrorHook)
-
- LogAndAssertJSON(t, func(log *Logger) {
- log.Hooks.Add(hook)
- log.Error("test")
- }, func(fields Fields) {
- assert.Equal(t, hook.Fired, true)
- })
-}
-
-func TestAddHookRace(t *testing.T) {
- var wg sync.WaitGroup
- wg.Add(2)
- hook := new(ErrorHook)
- LogAndAssertJSON(t, func(log *Logger) {
- go func() {
- defer wg.Done()
- log.AddHook(hook)
- }()
- go func() {
- defer wg.Done()
- log.Error("test")
- }()
- wg.Wait()
- }, func(fields Fields) {
- // the line may have been logged
- // before the hook was added, so we can't
- // actually assert on the hook
- })
-}
diff --git a/vendor/github.com/Sirupsen/logrus/hooks.go b/vendor/github.com/Sirupsen/logrus/hooks.go
deleted file mode 100644
index 3f151cdc3..000000000
--- a/vendor/github.com/Sirupsen/logrus/hooks.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package logrus
-
-// A hook to be fired when logging on the logging levels returned from
-// `Levels()` on your implementation of the interface. Note that this is not
-// fired in a goroutine or a channel with workers, you should handle such
-// functionality yourself if your call is non-blocking and you don't wish for
-// the logging calls for levels returned from `Levels()` to block.
-type Hook interface {
- Levels() []Level
- Fire(*Entry) error
-}
-
-// Internal type for storing the hooks on a logger instance.
-type LevelHooks map[Level][]Hook
-
-// Add a hook to an instance of logger. This is called with
-// `log.Hooks.Add(new(MyHook))` where `MyHook` implements the `Hook` interface.
-func (hooks LevelHooks) Add(hook Hook) {
- for _, level := range hook.Levels() {
- hooks[level] = append(hooks[level], hook)
- }
-}
-
-// Fire all the hooks for the passed level. Used by `entry.log` to fire
-// appropriate hooks for a log entry.
-func (hooks LevelHooks) Fire(level Level, entry *Entry) error {
- for _, hook := range hooks[level] {
- if err := hook.Fire(entry); err != nil {
- return err
- }
- }
-
- return nil
-}
diff --git a/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md b/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md
deleted file mode 100644
index 1bbc0f72d..000000000
--- a/vendor/github.com/Sirupsen/logrus/hooks/syslog/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# Syslog Hooks for Logrus
-
-## Usage
-
-```go
-import (
- "log/syslog"
- "github.com/sirupsen/logrus"
- lSyslog "github.com/sirupsen/logrus/hooks/syslog"
-)
-
-func main() {
- log := logrus.New()
- hook, err := lSyslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
-
- if err == nil {
- log.Hooks.Add(hook)
- }
-}
-```
-
-If you want to connect to local syslog (Ex. "/dev/log" or "/var/run/syslog" or "/var/run/log"). Just assign empty string to the first two parameters of `NewSyslogHook`. It should look like the following.
-
-```go
-import (
- "log/syslog"
- "github.com/sirupsen/logrus"
- lSyslog "github.com/sirupsen/logrus/hooks/syslog"
-)
-
-func main() {
- log := logrus.New()
- hook, err := lSyslog.NewSyslogHook("", "", syslog.LOG_INFO, "")
-
- if err == nil {
- log.Hooks.Add(hook)
- }
-}
-```
diff --git a/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go b/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go
deleted file mode 100644
index 329ce0d60..000000000
--- a/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog.go
+++ /dev/null
@@ -1,55 +0,0 @@
-// +build !windows,!nacl,!plan9
-
-package syslog
-
-import (
- "fmt"
- "log/syslog"
- "os"
-
- "github.com/sirupsen/logrus"
-)
-
-// SyslogHook to send logs via syslog.
-type SyslogHook struct {
- Writer *syslog.Writer
- SyslogNetwork string
- SyslogRaddr string
-}
-
-// Creates a hook to be added to an instance of logger. This is called with
-// `hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_DEBUG, "")`
-// `if err == nil { log.Hooks.Add(hook) }`
-func NewSyslogHook(network, raddr string, priority syslog.Priority, tag string) (*SyslogHook, error) {
- w, err := syslog.Dial(network, raddr, priority, tag)
- return &SyslogHook{w, network, raddr}, err
-}
-
-func (hook *SyslogHook) Fire(entry *logrus.Entry) error {
- line, err := entry.String()
- if err != nil {
- fmt.Fprintf(os.Stderr, "Unable to read entry, %v", err)
- return err
- }
-
- switch entry.Level {
- case logrus.PanicLevel:
- return hook.Writer.Crit(line)
- case logrus.FatalLevel:
- return hook.Writer.Crit(line)
- case logrus.ErrorLevel:
- return hook.Writer.Err(line)
- case logrus.WarnLevel:
- return hook.Writer.Warning(line)
- case logrus.InfoLevel:
- return hook.Writer.Info(line)
- case logrus.DebugLevel:
- return hook.Writer.Debug(line)
- default:
- return nil
- }
-}
-
-func (hook *SyslogHook) Levels() []logrus.Level {
- return logrus.AllLevels
-}
diff --git a/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go b/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go
deleted file mode 100644
index 5ec3a4445..000000000
--- a/vendor/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go
+++ /dev/null
@@ -1,27 +0,0 @@
-package syslog
-
-import (
- "log/syslog"
- "testing"
-
- "github.com/sirupsen/logrus"
-)
-
-func TestLocalhostAddAndPrint(t *testing.T) {
- log := logrus.New()
- hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "")
-
- if err != nil {
- t.Errorf("Unable to connect to local syslog.")
- }
-
- log.Hooks.Add(hook)
-
- for _, level := range hook.Levels() {
- if len(log.Hooks[level]) != 1 {
- t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level]))
- }
- }
-
- log.Info("Congratulations!")
-}
diff --git a/vendor/github.com/Sirupsen/logrus/hooks/test/test.go b/vendor/github.com/Sirupsen/logrus/hooks/test/test.go
deleted file mode 100644
index 62c4845df..000000000
--- a/vendor/github.com/Sirupsen/logrus/hooks/test/test.go
+++ /dev/null
@@ -1,95 +0,0 @@
-// The Test package is used for testing logrus. It is here for backwards
-// compatibility from when logrus' organization was upper-case. Please use
-// lower-case logrus and the `null` package instead of this one.
-package test
-
-import (
- "io/ioutil"
- "sync"
-
- "github.com/sirupsen/logrus"
-)
-
-// Hook is a hook designed for dealing with logs in test scenarios.
-type Hook struct {
- // Entries is an array of all entries that have been received by this hook.
- // For safe access, use the AllEntries() method, rather than reading this
- // value directly.
- Entries []*logrus.Entry
- mu sync.RWMutex
-}
-
-// NewGlobal installs a test hook for the global logger.
-func NewGlobal() *Hook {
-
- hook := new(Hook)
- logrus.AddHook(hook)
-
- return hook
-
-}
-
-// NewLocal installs a test hook for a given local logger.
-func NewLocal(logger *logrus.Logger) *Hook {
-
- hook := new(Hook)
- logger.Hooks.Add(hook)
-
- return hook
-
-}
-
-// NewNullLogger creates a discarding logger and installs the test hook.
-func NewNullLogger() (*logrus.Logger, *Hook) {
-
- logger := logrus.New()
- logger.Out = ioutil.Discard
-
- return logger, NewLocal(logger)
-
-}
-
-func (t *Hook) Fire(e *logrus.Entry) error {
- t.mu.Lock()
- defer t.mu.Unlock()
- t.Entries = append(t.Entries, e)
- return nil
-}
-
-func (t *Hook) Levels() []logrus.Level {
- return logrus.AllLevels
-}
-
-// LastEntry returns the last entry that was logged or nil.
-func (t *Hook) LastEntry() *logrus.Entry {
- t.mu.RLock()
- defer t.mu.RUnlock()
- i := len(t.Entries) - 1
- if i < 0 {
- return nil
- }
- // Make a copy, for safety
- e := *t.Entries[i]
- return &e
-}
-
-// AllEntries returns all entries that were logged.
-func (t *Hook) AllEntries() []*logrus.Entry {
- t.mu.RLock()
- defer t.mu.RUnlock()
- // Make a copy so the returned value won't race with future log requests
- entries := make([]*logrus.Entry, len(t.Entries))
- for i, entry := range t.Entries {
- // Make a copy, for safety
- e := *entry
- entries[i] = &e
- }
- return entries
-}
-
-// Reset removes all Entries from this test hook.
-func (t *Hook) Reset() {
- t.mu.Lock()
- defer t.mu.Unlock()
- t.Entries = make([]*logrus.Entry, 0)
-}
diff --git a/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go b/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go
deleted file mode 100644
index 3f55cfe31..000000000
--- a/vendor/github.com/Sirupsen/logrus/hooks/test/test_test.go
+++ /dev/null
@@ -1,39 +0,0 @@
-package test
-
-import (
- "testing"
-
- "github.com/sirupsen/logrus"
- "github.com/stretchr/testify/assert"
-)
-
-func TestAllHooks(t *testing.T) {
-
- assert := assert.New(t)
-
- logger, hook := NewNullLogger()
- assert.Nil(hook.LastEntry())
- assert.Equal(0, len(hook.Entries))
-
- logger.Error("Hello error")
- assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
- assert.Equal("Hello error", hook.LastEntry().Message)
- assert.Equal(1, len(hook.Entries))
-
- logger.Warn("Hello warning")
- assert.Equal(logrus.WarnLevel, hook.LastEntry().Level)
- assert.Equal("Hello warning", hook.LastEntry().Message)
- assert.Equal(2, len(hook.Entries))
-
- hook.Reset()
- assert.Nil(hook.LastEntry())
- assert.Equal(0, len(hook.Entries))
-
- hook = NewGlobal()
-
- logrus.Error("Hello error")
- assert.Equal(logrus.ErrorLevel, hook.LastEntry().Level)
- assert.Equal("Hello error", hook.LastEntry().Message)
- assert.Equal(1, len(hook.Entries))
-
-}
diff --git a/vendor/github.com/Sirupsen/logrus/json_formatter.go b/vendor/github.com/Sirupsen/logrus/json_formatter.go
deleted file mode 100644
index fb01c1b10..000000000
--- a/vendor/github.com/Sirupsen/logrus/json_formatter.go
+++ /dev/null
@@ -1,79 +0,0 @@
-package logrus
-
-import (
- "encoding/json"
- "fmt"
-)
-
-type fieldKey string
-
-// FieldMap allows customization of the key names for default fields.
-type FieldMap map[fieldKey]string
-
-// Default key names for the default fields
-const (
- FieldKeyMsg = "msg"
- FieldKeyLevel = "level"
- FieldKeyTime = "time"
-)
-
-func (f FieldMap) resolve(key fieldKey) string {
- if k, ok := f[key]; ok {
- return k
- }
-
- return string(key)
-}
-
-// JSONFormatter formats logs into parsable json
-type JSONFormatter struct {
- // TimestampFormat sets the format used for marshaling timestamps.
- TimestampFormat string
-
- // DisableTimestamp allows disabling automatic timestamps in output
- DisableTimestamp bool
-
- // FieldMap allows users to customize the names of keys for default fields.
- // As an example:
- // formatter := &JSONFormatter{
- // FieldMap: FieldMap{
- // FieldKeyTime: "@timestamp",
- // FieldKeyLevel: "@level",
- // FieldKeyMsg: "@message",
- // },
- // }
- FieldMap FieldMap
-}
-
-// Format renders a single log entry
-func (f *JSONFormatter) Format(entry *Entry) ([]byte, error) {
- data := make(Fields, len(entry.Data)+3)
- for k, v := range entry.Data {
- switch v := v.(type) {
- case error:
- // Otherwise errors are ignored by `encoding/json`
- // https://github.com/sirupsen/logrus/issues/137
- data[k] = v.Error()
- default:
- data[k] = v
- }
- }
- prefixFieldClashes(data)
-
- timestampFormat := f.TimestampFormat
- if timestampFormat == "" {
- timestampFormat = defaultTimestampFormat
- }
-
- if !f.DisableTimestamp {
- data[f.FieldMap.resolve(FieldKeyTime)] = entry.Time.Format(timestampFormat)
- }
- data[f.FieldMap.resolve(FieldKeyMsg)] = entry.Message
- data[f.FieldMap.resolve(FieldKeyLevel)] = entry.Level.String()
-
- serialized, err := json.Marshal(data)
- if err != nil {
- return nil, fmt.Errorf("Failed to marshal fields to JSON, %v", err)
- }
- return append(serialized, '\n'), nil
-}
diff --git a/vendor/github.com/Sirupsen/logrus/json_formatter_test.go b/vendor/github.com/Sirupsen/logrus/json_formatter_test.go
deleted file mode 100644
index 51093a79b..000000000
--- a/vendor/github.com/Sirupsen/logrus/json_formatter_test.go
+++ /dev/null
@@ -1,199 +0,0 @@
-package logrus
-
-import (
- "encoding/json"
- "errors"
- "strings"
- "testing"
-)
-
-func TestErrorNotLost(t *testing.T) {
- formatter := &JSONFormatter{}
-
- b, err := formatter.Format(WithField("error", errors.New("wild walrus")))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
-
- entry := make(map[string]interface{})
- err = json.Unmarshal(b, &entry)
- if err != nil {
- t.Fatal("Unable to unmarshal formatted entry: ", err)
- }
-
- if entry["error"] != "wild walrus" {
- t.Fatal("Error field not set")
- }
-}
-
-func TestErrorNotLostOnFieldNotNamedError(t *testing.T) {
- formatter := &JSONFormatter{}
-
- b, err := formatter.Format(WithField("omg", errors.New("wild walrus")))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
-
- entry := make(map[string]interface{})
- err = json.Unmarshal(b, &entry)
- if err != nil {
- t.Fatal("Unable to unmarshal formatted entry: ", err)
- }
-
- if entry["omg"] != "wild walrus" {
- t.Fatal("Error field not set")
- }
-}
-
-func TestFieldClashWithTime(t *testing.T) {
- formatter := &JSONFormatter{}
-
- b, err := formatter.Format(WithField("time", "right now!"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
-
- entry := make(map[string]interface{})
- err = json.Unmarshal(b, &entry)
- if err != nil {
- t.Fatal("Unable to unmarshal formatted entry: ", err)
- }
-
- if entry["fields.time"] != "right now!" {
- t.Fatal("fields.time not set to original time field")
- }
-
- if entry["time"] != "0001-01-01T00:00:00Z" {
- t.Fatal("time field not set to current time, was: ", entry["time"])
- }
-}
-
-func TestFieldClashWithMsg(t *testing.T) {
- formatter := &JSONFormatter{}
-
- b, err := formatter.Format(WithField("msg", "something"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
-
- entry := make(map[string]interface{})
- err = json.Unmarshal(b, &entry)
- if err != nil {
- t.Fatal("Unable to unmarshal formatted entry: ", err)
- }
-
- if entry["fields.msg"] != "something" {
- t.Fatal("fields.msg not set to original msg field")
- }
-}
-
-func TestFieldClashWithLevel(t *testing.T) {
- formatter := &JSONFormatter{}
-
- b, err := formatter.Format(WithField("level", "something"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
-
- entry := make(map[string]interface{})
- err = json.Unmarshal(b, &entry)
- if err != nil {
- t.Fatal("Unable to unmarshal formatted entry: ", err)
- }
-
- if entry["fields.level"] != "something" {
- t.Fatal("fields.level not set to original level field")
- }
-}
-
-func TestJSONEntryEndsWithNewline(t *testing.T) {
- formatter := &JSONFormatter{}
-
- b, err := formatter.Format(WithField("level", "something"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
-
- if b[len(b)-1] != '\n' {
- t.Fatal("Expected JSON log entry to end with a newline")
- }
-}
-
-func TestJSONMessageKey(t *testing.T) {
- formatter := &JSONFormatter{
- FieldMap: FieldMap{
- FieldKeyMsg: "message",
- },
- }
-
- b, err := formatter.Format(&Entry{Message: "oh hai"})
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
- s := string(b)
- if !(strings.Contains(s, "message") && strings.Contains(s, "oh hai")) {
- t.Fatal("Expected JSON to format message key")
- }
-}
-
-func TestJSONLevelKey(t *testing.T) {
- formatter := &JSONFormatter{
- FieldMap: FieldMap{
- FieldKeyLevel: "somelevel",
- },
- }
-
- b, err := formatter.Format(WithField("level", "something"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
- s := string(b)
- if !strings.Contains(s, "somelevel") {
- t.Fatal("Expected JSON to format level key")
- }
-}
-
-func TestJSONTimeKey(t *testing.T) {
- formatter := &JSONFormatter{
- FieldMap: FieldMap{
- FieldKeyTime: "timeywimey",
- },
- }
-
- b, err := formatter.Format(WithField("level", "something"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
- s := string(b)
- if !strings.Contains(s, "timeywimey") {
- t.Fatal("Expected JSON to format time key")
- }
-}
-
-func TestJSONDisableTimestamp(t *testing.T) {
- formatter := &JSONFormatter{
- DisableTimestamp: true,
- }
-
- b, err := formatter.Format(WithField("level", "something"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
- s := string(b)
- if strings.Contains(s, FieldKeyTime) {
- t.Error("Did not prevent timestamp", s)
- }
-}
-
-func TestJSONEnableTimestamp(t *testing.T) {
- formatter := &JSONFormatter{}
-
- b, err := formatter.Format(WithField("level", "something"))
- if err != nil {
- t.Fatal("Unable to format entry: ", err)
- }
- s := string(b)
- if !strings.Contains(s, FieldKeyTime) {
- t.Error("Timestamp not present", s)
- }
-}
diff --git a/vendor/github.com/Sirupsen/logrus/logger.go b/vendor/github.com/Sirupsen/logrus/logger.go
deleted file mode 100644
index fdaf8a653..000000000
--- a/vendor/github.com/Sirupsen/logrus/logger.go
+++ /dev/null
@@ -1,323 +0,0 @@
-package logrus
-
-import (
- "io"
- "os"
- "sync"
- "sync/atomic"
-)
-
-type Logger struct {
- // The logs are `io.Copy`'d to this in a mutex. It's common to set this to a
- // file, or leave it default which is `os.Stderr`. You can also set this to
- // something more adventorous, such as logging to Kafka.
- Out io.Writer
- // Hooks for the logger instance. These allow firing events based on logging
- // levels and log entries. For example, to send errors to an error tracking
- // service, log to StatsD or dump the core on fatal errors.
- Hooks LevelHooks
- // All log entries pass through the formatter before logged to Out. The
- // included formatters are `TextFormatter` and `JSONFormatter` for which
- // TextFormatter is the default. In development (when a TTY is attached) it
- // logs with colors, but to a file it wouldn't. You can easily implement your
- // own that implements the `Formatter` interface, see the `README` or included
- // formatters for examples.
- Formatter Formatter
- // The logging level the logger should log at. This is typically (and defaults
- // to) `logrus.Info`, which allows Info(), Warn(), Error() and Fatal() to be
- // logged.
- Level Level
- // Used to sync writing to the log. Locking is enabled by Default
- mu MutexWrap
- // Reusable empty entry
- entryPool sync.Pool
-}
-
-type MutexWrap struct {
- lock sync.Mutex
- disabled bool
-}
-
-func (mw *MutexWrap) Lock() {
- if !mw.disabled {
- mw.lock.Lock()
- }
-}
-
-func (mw *MutexWrap) Unlock() {
- if !mw.disabled {
- mw.lock.Unlock()
- }
-}
-
-func (mw *MutexWrap) Disable() {
- mw.disabled = true
-}
-
-// Creates a new logger. Configuration should be set by changing `Formatter`,
-// `Out` and `Hooks` directly on the default logger instance. You can also just
-// instantiate your own:
-//
-// var log = &Logger{
-// Out: os.Stderr,
-// Formatter: new(JSONFormatter),
-// Hooks: make(LevelHooks),
-// Level: logrus.DebugLevel,
-// }
-//
-// It's recommended to make this a global instance called `log`.
-func New() *Logger {
- return &Logger{
- Out: os.Stderr,
- Formatter: new(TextFormatter),
- Hooks: make(LevelHooks),
- Level: InfoLevel,
- }
-}
-
-func (logger *Logger) newEntry() *Entry {
- entry, ok := logger.entryPool.Get().(*Entry)
- if ok {
- return entry
- }
- return NewEntry(logger)
-}
-
-func (logger *Logger) releaseEntry(entry *Entry) {
- logger.entryPool.Put(entry)
-}
-
-// Adds a field to the log entry, note that it doesn't log until you call
-// Debug, Print, Info, Warn, Fatal or Panic. It only creates a log entry.
-// If you want multiple fields, use `WithFields`.
-func (logger *Logger) WithField(key string, value interface{}) *Entry {
- entry := logger.newEntry()
- defer logger.releaseEntry(entry)
- return entry.WithField(key, value)
-}
-
-// Adds a struct of fields to the log entry. All it does is call `WithField` for
-// each `Field`.
-func (logger *Logger) WithFields(fields Fields) *Entry {
- entry := logger.newEntry()
- defer logger.releaseEntry(entry)
- return entry.WithFields(fields)
-}
-
-// Add an error as single field to the log entry. All it does is call
-// `WithError` for the given `error`.
-func (logger *Logger) WithError(err error) *Entry {
- entry := logger.newEntry()
- defer logger.releaseEntry(entry)
- return entry.WithError(err)
-}
-
-func (logger *Logger) Debugf(format string, args ...interface{}) {
- if logger.level() >= DebugLevel {
- entry := logger.newEntry()
- entry.Debugf(format, args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Infof(format string, args ...interface{}) {
- if logger.level() >= InfoLevel {
- entry := logger.newEntry()
- entry.Infof(format, args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Printf(format string, args ...interface{}) {
- entry := logger.newEntry()
- entry.Printf(format, args...)
- logger.releaseEntry(entry)
-}
-
-func (logger *Logger) Warnf(format string, args ...interface{}) {
- if logger.level() >= WarnLevel {
- entry := logger.newEntry()
- entry.Warnf(format, args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Warningf(format string, args ...interface{}) {
- if logger.level() >= WarnLevel {
- entry := logger.newEntry()
- entry.Warnf(format, args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Errorf(format string, args ...interface{}) {
- if logger.level() >= ErrorLevel {
- entry := logger.newEntry()
- entry.Errorf(format, args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Fatalf(format string, args ...interface{}) {
- if logger.level() >= FatalLevel {
- entry := logger.newEntry()
- entry.Fatalf(format, args...)
- logger.releaseEntry(entry)
- }
- Exit(1)
-}
-
-func (logger *Logger) Panicf(format string, args ...interface{}) {
- if logger.level() >= PanicLevel {
- entry := logger.newEntry()
- entry.Panicf(format, args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Debug(args ...interface{}) {
- if logger.level() >= DebugLevel {
- entry := logger.newEntry()
- entry.Debug(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Info(args ...interface{}) {
- if logger.level() >= InfoLevel {
- entry := logger.newEntry()
- entry.Info(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Print(args ...interface{}) {
- entry := logger.newEntry()
- entry.Info(args...)
- logger.releaseEntry(entry)
-}
-
-func (logger *Logger) Warn(args ...interface{}) {
- if logger.level() >= WarnLevel {
- entry := logger.newEntry()
- entry.Warn(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Warning(args ...interface{}) {
- if logger.level() >= WarnLevel {
- entry := logger.newEntry()
- entry.Warn(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Error(args ...interface{}) {
- if logger.level() >= ErrorLevel {
- entry := logger.newEntry()
- entry.Error(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Fatal(args ...interface{}) {
- if logger.level() >= FatalLevel {
- entry := logger.newEntry()
- entry.Fatal(args...)
- logger.releaseEntry(entry)
- }
- Exit(1)
-}
-
-func (logger *Logger) Panic(args ...interface{}) {
- if logger.level() >= PanicLevel {
- entry := logger.newEntry()
- entry.Panic(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Debugln(args ...interface{}) {
- if logger.level() >= DebugLevel {
- entry := logger.newEntry()
- entry.Debugln(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Infoln(args ...interface{}) {
- if logger.level() >= InfoLevel {
- entry := logger.newEntry()
- entry.Infoln(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Println(args ...interface{}) {
- entry := logger.newEntry()
- entry.Println(args...)
- logger.releaseEntry(entry)
-}
-
-func (logger *Logger) Warnln(args ...interface{}) {
- if logger.level() >= WarnLevel {
- entry := logger.newEntry()
- entry.Warnln(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Warningln(args ...interface{}) {
- if logger.level() >= WarnLevel {
- entry := logger.newEntry()
- entry.Warnln(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Errorln(args ...interface{}) {
- if logger.level() >= ErrorLevel {
- entry := logger.newEntry()
- entry.Errorln(args...)
- logger.releaseEntry(entry)
- }
-}
-
-func (logger *Logger) Fatalln(args ...interface{}) {
- if logger.level() >= FatalLevel {
- entry := logger.newEntry()
- entry.Fatalln(args...)
- logger.releaseEntry(entry)
- }
- Exit(1)
-}
-
-func (logger *Logger) Panicln(args ...interface{}) {
- if logger.level() >= PanicLevel {
- entry := logger.newEntry()
- entry.Panicln(args...)
- logger.releaseEntry(entry)
- }
-}
-
-//When file is opened with appending mode, it's safe to
-//write concurrently to a file (within 4k message on Linux).
-//In these cases user can choose to disable the lock.
-func (logger *Logger) SetNoLock() {
- logger.mu.Disable()
-}
-
-func (logger *Logger) level() Level {
- return Level(atomic.LoadUint32((*uint32)(&logger.Level)))
-}
-
-func (logger *Logger) SetLevel(level Level) {
- atomic.StoreUint32((*uint32)(&logger.Level), uint32(level))
-}
-
-func (logger *Logger) AddHook(hook Hook) {
- logger.mu.Lock()
- defer logger.mu.Unlock()
- logger.Hooks.Add(hook)
-}
diff --git a/vendor/github.com/Sirupsen/logrus/logger_bench_test.go b/vendor/github.com/Sirupsen/logrus/logger_bench_test.go
deleted file mode 100644
index dd23a3535..000000000
--- a/vendor/github.com/Sirupsen/logrus/logger_bench_test.go
+++ /dev/null
@@ -1,61 +0,0 @@
-package logrus
-
-import (
- "os"
- "testing"
-)
-
-// smallFields is a small size data set for benchmarking
-var loggerFields = Fields{
- "foo": "bar",
- "baz": "qux",
- "one": "two",
- "three": "four",
-}
-
-func BenchmarkDummyLogger(b *testing.B) {
- nullf, err := os.OpenFile("/dev/null", os.O_WRONLY, 0666)
- if err != nil {
- b.Fatalf("%v", err)
- }
- defer nullf.Close()
- doLoggerBenchmark(b, nullf, &TextFormatter{DisableColors: true}, smallFields)
-}
-
-func BenchmarkDummyLoggerNoLock(b *testing.B) {
- nullf, err := os.OpenFile("/dev/null", os.O_WRONLY|os.O_APPEND, 0666)
- if err != nil {
- b.Fatalf("%v", err)
- }
- defer nullf.Close()
- doLoggerBenchmarkNoLock(b, nullf, &TextFormatter{DisableColors: true}, smallFields)
-}
-
-func doLoggerBenchmark(b *testing.B, out *os.File, formatter Formatter, fields Fields) {
- logger := Logger{
- Out: out,
- Level: InfoLevel,
- Formatter: formatter,
- }
- entry := logger.WithFields(fields)
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- entry.Info("aaa")
- }
- })
-}
-
-func doLoggerBenchmarkNoLock(b *testing.B, out *os.File, formatter Formatter, fields Fields) {
- logger := Logger{
- Out: out,
- Level: InfoLevel,
- Formatter: formatter,
- }
- logger.SetNoLock()
- entry := logger.WithFields(fields)
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- entry.Info("aaa")
- }
- })
-}
diff --git a/vendor/github.com/Sirupsen/logrus/logrus.go b/vendor/github.com/Sirupsen/logrus/logrus.go
deleted file mode 100644
index dd3899974..000000000
--- a/vendor/github.com/Sirupsen/logrus/logrus.go
+++ /dev/null
@@ -1,143 +0,0 @@
-package logrus
-
-import (
- "fmt"
- "log"
- "strings"
-)
-
-// Fields type, used to pass to `WithFields`.
-type Fields map[string]interface{}
-
-// Level type
-type Level uint32
-
-// Convert the Level to a string. E.g. PanicLevel becomes "panic".
-func (level Level) String() string {
- switch level {
- case DebugLevel:
- return "debug"
- case InfoLevel:
- return "info"
- case WarnLevel:
- return "warning"
- case ErrorLevel:
- return "error"
- case FatalLevel:
- return "fatal"
- case PanicLevel:
- return "panic"
- }
-
- return "unknown"
-}
-
-// ParseLevel takes a string level and returns the Logrus log level constant.
-func ParseLevel(lvl string) (Level, error) {
- switch strings.ToLower(lvl) {
- case "panic":
- return PanicLevel, nil
- case "fatal":
- return FatalLevel, nil
- case "error":
- return ErrorLevel, nil
- case "warn", "warning":
- return WarnLevel, nil
- case "info":
- return InfoLevel, nil
- case "debug":
- return DebugLevel, nil
- }
-
- var l Level
- return l, fmt.Errorf("not a valid logrus Level: %q", lvl)
-}
-
-// A constant exposing all logging levels
-var AllLevels = []Level{
- PanicLevel,
- FatalLevel,
- ErrorLevel,
- WarnLevel,
- InfoLevel,
- DebugLevel,
-}
-
-// These are the different logging levels. You can set the logging level to log
-// on your instance of logger, obtained with `logrus.New()`.
-const (
- // PanicLevel level, highest level of severity. Logs and then calls panic with the
- // message passed to Debug, Info, ...
- PanicLevel Level = iota
- // FatalLevel level. Logs and then calls `os.Exit(1)`. It will exit even if the
- // logging level is set to Panic.
- FatalLevel
- // ErrorLevel level. Logs. Used for errors that should definitely be noted.
- // Commonly used for hooks to send errors to an error tracking service.
- ErrorLevel
- // WarnLevel level. Non-critical entries that deserve eyes.
- WarnLevel
- // InfoLevel level. General operational entries about what's going on inside the
- // application.
- InfoLevel
- // DebugLevel level. Usually only enabled when debugging. Very verbose logging.
- DebugLevel
-)
-
-// Won't compile if StdLogger can't be realized by a log.Logger
-var (
- _ StdLogger = &log.Logger{}
- _ StdLogger = &Entry{}
- _ StdLogger = &Logger{}
-)
-
-// StdLogger is what your logrus-enabled library should take, that way
-// it'll accept a stdlib logger and a logrus logger. There's no standard
-// interface, this is the closest we get, unfortunately.
-type StdLogger interface {
- Print(...interface{})
- Printf(string, ...interface{})
- Println(...interface{})
-
- Fatal(...interface{})
- Fatalf(string, ...interface{})
- Fatalln(...interface{})
-
- Panic(...interface{})
- Panicf(string, ...interface{})
- Panicln(...interface{})
-}
-
-// The FieldLogger interface generalizes the Entry and Logger types
-type FieldLogger interface {
- WithField(key string, value interface{}) *Entry
- WithFields(fields Fields) *Entry
- WithError(err error) *Entry
-
- Debugf(format string, args ...interface{})
- Infof(format string, args ...interface{})
- Printf(format string, args ...interface{})
- Warnf(format string, args ...interface{})
- Warningf(format string, args ...interface{})
- Errorf(format string, args ...interface{})
- Fatalf(format string, args ...interface{})
- Panicf(format string, args ...interface{})
-
- Debug(args ...interface{})
- Info(args ...interface{})
- Print(args ...interface{})
- Warn(args ...interface{})
- Warning(args ...interface{})
- Error(args ...interface{})
- Fatal(args ...interface{})
- Panic(args ...interface{})
-
- Debugln(args ...interface{})
- Infoln(args ...interface{})
- Println(args ...interface{})
- Warnln(args ...interface{})
- Warningln(args ...interface{})
- Errorln(args ...interface{})
- Fatalln(args ...interface{})
- Panicln(args ...interface{})
-}
diff --git a/vendor/github.com/Sirupsen/logrus/logrus_test.go b/vendor/github.com/Sirupsen/logrus/logrus_test.go
deleted file mode 100644
index 78cbc2825..000000000
--- a/vendor/github.com/Sirupsen/logrus/logrus_test.go
+++ /dev/null
@@ -1,386 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "encoding/json"
- "strconv"
- "strings"
- "sync"
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func LogAndAssertJSON(t *testing.T, log func(*Logger), assertions func(fields Fields)) {
- var buffer bytes.Buffer
- var fields Fields
-
- logger := New()
- logger.Out = &buffer
- logger.Formatter = new(JSONFormatter)
-
- log(logger)
-
- err := json.Unmarshal(buffer.Bytes(), &fields)
- assert.Nil(t, err)
-
- assertions(fields)
-}
-
-func LogAndAssertText(t *testing.T, log func(*Logger), assertions func(fields map[string]string)) {
- var buffer bytes.Buffer
-
- logger := New()
- logger.Out = &buffer
- logger.Formatter = &TextFormatter{
- DisableColors: true,
- }
-
- log(logger)
-
- fields := make(map[string]string)
- for _, kv := range strings.Split(buffer.String(), " ") {
- if !strings.Contains(kv, "=") {
- continue
- }
- kvArr := strings.Split(kv, "=")
- key := strings.TrimSpace(kvArr[0])
- val := kvArr[1]
- if kvArr[1][0] == '"' {
- var err error
- val, err = strconv.Unquote(val)
- assert.NoError(t, err)
- }
- fields[key] = val
- }
- assertions(fields)
-}
-
-func TestPrint(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Print("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test")
- assert.Equal(t, fields["level"], "info")
- })
-}
-
-func TestInfo(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Info("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test")
- assert.Equal(t, fields["level"], "info")
- })
-}
-
-func TestWarn(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Warn("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test")
- assert.Equal(t, fields["level"], "warning")
- })
-}
-
-func TestInfolnShouldAddSpacesBetweenStrings(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Infoln("test", "test")
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test test")
- })
-}
-
-func TestInfolnShouldAddSpacesBetweenStringAndNonstring(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Infoln("test", 10)
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test 10")
- })
-}
-
-func TestInfolnShouldAddSpacesBetweenTwoNonStrings(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Infoln(10, 10)
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "10 10")
- })
-}
-
-func TestInfoShouldAddSpacesBetweenTwoNonStrings(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Infoln(10, 10)
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "10 10")
- })
-}
-
-func TestInfoShouldNotAddSpacesBetweenStringAndNonstring(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Info("test", 10)
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test10")
- })
-}
-
-func TestInfoShouldNotAddSpacesBetweenStrings(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.Info("test", "test")
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "testtest")
- })
-}
-
-func TestWithFieldsShouldAllowAssignments(t *testing.T) {
- var buffer bytes.Buffer
- var fields Fields
-
- logger := New()
- logger.Out = &buffer
- logger.Formatter = new(JSONFormatter)
-
- localLog := logger.WithFields(Fields{
- "key1": "value1",
- })
-
- localLog.WithField("key2", "value2").Info("test")
- err := json.Unmarshal(buffer.Bytes(), &fields)
- assert.Nil(t, err)
-
- assert.Equal(t, "value2", fields["key2"])
- assert.Equal(t, "value1", fields["key1"])
-
- buffer = bytes.Buffer{}
- fields = Fields{}
- localLog.Info("test")
- err = json.Unmarshal(buffer.Bytes(), &fields)
- assert.Nil(t, err)
-
- _, ok := fields["key2"]
- assert.Equal(t, false, ok)
- assert.Equal(t, "value1", fields["key1"])
-}
-
-func TestUserSuppliedFieldDoesNotOverwriteDefaults(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.WithField("msg", "hello").Info("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test")
- })
-}
-
-func TestUserSuppliedMsgFieldHasPrefix(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.WithField("msg", "hello").Info("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["msg"], "test")
- assert.Equal(t, fields["fields.msg"], "hello")
- })
-}
-
-func TestUserSuppliedTimeFieldHasPrefix(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.WithField("time", "hello").Info("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["fields.time"], "hello")
- })
-}
-
-func TestUserSuppliedLevelFieldHasPrefix(t *testing.T) {
- LogAndAssertJSON(t, func(log *Logger) {
- log.WithField("level", 1).Info("test")
- }, func(fields Fields) {
- assert.Equal(t, fields["level"], "info")
- assert.Equal(t, fields["fields.level"], 1.0) // JSON has floats only
- })
-}
-
-func TestDefaultFieldsAreNotPrefixed(t *testing.T) {
- LogAndAssertText(t, func(log *Logger) {
- ll := log.WithField("herp", "derp")
- ll.Info("hello")
- ll.Info("bye")
- }, func(fields map[string]string) {
- for _, fieldName := range []string{"fields.level", "fields.time", "fields.msg"} {
- if _, ok := fields[fieldName]; ok {
- t.Fatalf("should not have prefixed %q: %v", fieldName, fields)
- }
- }
- })
-}
-
-func TestDoubleLoggingDoesntPrefixPreviousFields(t *testing.T) {
-
- var buffer bytes.Buffer
- var fields Fields
-
- logger := New()
- logger.Out = &buffer
- logger.Formatter = new(JSONFormatter)
-
- llog := logger.WithField("context", "eating raw fish")
-
- llog.Info("looks delicious")
-
- err := json.Unmarshal(buffer.Bytes(), &fields)
- assert.NoError(t, err, "should have decoded first message")
- assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields")
- assert.Equal(t, fields["msg"], "looks delicious")
- assert.Equal(t, fields["context"], "eating raw fish")
-
- buffer.Reset()
-
- llog.Warn("omg it is!")
-
- err = json.Unmarshal(buffer.Bytes(), &fields)
- assert.NoError(t, err, "should have decoded second message")
- assert.Equal(t, len(fields), 4, "should only have msg/time/level/context fields")
- assert.Equal(t, fields["msg"], "omg it is!")
- assert.Equal(t, fields["context"], "eating raw fish")
- assert.Nil(t, fields["fields.msg"], "should not have prefixed previous `msg` entry")
-
-}
-
-func TestConvertLevelToString(t *testing.T) {
- assert.Equal(t, "debug", DebugLevel.String())
- assert.Equal(t, "info", InfoLevel.String())
- assert.Equal(t, "warning", WarnLevel.String())
- assert.Equal(t, "error", ErrorLevel.String())
- assert.Equal(t, "fatal", FatalLevel.String())
- assert.Equal(t, "panic", PanicLevel.String())
-}
-
-func TestParseLevel(t *testing.T) {
- l, err := ParseLevel("panic")
- assert.Nil(t, err)
- assert.Equal(t, PanicLevel, l)
-
- l, err = ParseLevel("PANIC")
- assert.Nil(t, err)
- assert.Equal(t, PanicLevel, l)
-
- l, err = ParseLevel("fatal")
- assert.Nil(t, err)
- assert.Equal(t, FatalLevel, l)
-
- l, err = ParseLevel("FATAL")
- assert.Nil(t, err)
- assert.Equal(t, FatalLevel, l)
-
- l, err = ParseLevel("error")
- assert.Nil(t, err)
- assert.Equal(t, ErrorLevel, l)
-
- l, err = ParseLevel("ERROR")
- assert.Nil(t, err)
- assert.Equal(t, ErrorLevel, l)
-
- l, err = ParseLevel("warn")
- assert.Nil(t, err)
- assert.Equal(t, WarnLevel, l)
-
- l, err = ParseLevel("WARN")
- assert.Nil(t, err)
- assert.Equal(t, WarnLevel, l)
-
- l, err = ParseLevel("warning")
- assert.Nil(t, err)
- assert.Equal(t, WarnLevel, l)
-
- l, err = ParseLevel("WARNING")
- assert.Nil(t, err)
- assert.Equal(t, WarnLevel, l)
-
- l, err = ParseLevel("info")
- assert.Nil(t, err)
- assert.Equal(t, InfoLevel, l)
-
- l, err = ParseLevel("INFO")
- assert.Nil(t, err)
- assert.Equal(t, InfoLevel, l)
-
- l, err = ParseLevel("debug")
- assert.Nil(t, err)
- assert.Equal(t, DebugLevel, l)
-
- l, err = ParseLevel("DEBUG")
- assert.Nil(t, err)
- assert.Equal(t, DebugLevel, l)
-
- l, err = ParseLevel("invalid")
- assert.Equal(t, "not a valid logrus Level: \"invalid\"", err.Error())
-}
-
-func TestGetSetLevelRace(t *testing.T) {
- wg := sync.WaitGroup{}
- for i := 0; i < 100; i++ {
- wg.Add(1)
- go func(i int) {
- defer wg.Done()
- if i%2 == 0 {
- SetLevel(InfoLevel)
- } else {
- GetLevel()
- }
- }(i)
-
- }
- wg.Wait()
-}
-
-func TestLoggingRace(t *testing.T) {
- logger := New()
-
- var wg sync.WaitGroup
- wg.Add(100)
-
- for i := 0; i < 100; i++ {
- go func() {
- logger.Info("info")
- wg.Done()
- }()
- }
- wg.Wait()
-}
-
-// Compile test
-func TestLogrusInterface(t *testing.T) {
- var buffer bytes.Buffer
- fn := func(l FieldLogger) {
- b := l.WithField("key", "value")
- b.Debug("Test")
- }
- // test logger
- logger := New()
- logger.Out = &buffer
- fn(logger)
-
- // test Entry
- e := logger.WithField("another", "value")
- fn(e)
-}
-
-// Implements io.Writer using channels for synchronization, so we can wait on
-// the Entry.Writer goroutine to write in a non-racey way. This does assume that
-// there is a single call to Logger.Out for each message.
-type channelWriter chan []byte
-
-func (cw channelWriter) Write(p []byte) (int, error) {
- cw <- p
- return len(p), nil
-}
-
-func TestEntryWriter(t *testing.T) {
- cw := channelWriter(make(chan []byte, 1))
- log := New()
- log.Out = cw
- log.Formatter = new(JSONFormatter)
- log.WithField("foo", "bar").WriterLevel(WarnLevel).Write([]byte("hello\n"))
-
- bs := <-cw
- var fields Fields
- err := json.Unmarshal(bs, &fields)
- assert.Nil(t, err)
- assert.Equal(t, fields["foo"], "bar")
- assert.Equal(t, fields["level"], "warning")
-}
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_bsd.go b/vendor/github.com/Sirupsen/logrus/terminal_bsd.go
deleted file mode 100644
index d7b3893f3..000000000
--- a/vendor/github.com/Sirupsen/logrus/terminal_bsd.go
+++ /dev/null
@@ -1,10 +0,0 @@
-// +build darwin freebsd openbsd netbsd dragonfly
-// +build !appengine
-
-package logrus
-
-import "golang.org/x/sys/unix"
-
-const ioctlReadTermios = unix.TIOCGETA
-
-type Termios unix.Termios
diff --git a/vendor/github.com/Sirupsen/logrus/terminal_linux.go b/vendor/github.com/Sirupsen/logrus/terminal_linux.go
deleted file mode 100644
index 88d7298e2..000000000
--- a/vendor/github.com/Sirupsen/logrus/terminal_linux.go
+++ /dev/null
@@ -1,14 +0,0 @@
-// Based on ssh/terminal:
-// 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.
-
-// +build !appengine
-
-package logrus
-
-import "golang.org/x/sys/unix"
-
-const ioctlReadTermios = unix.TCGETS
-
-type Termios unix.Termios
diff --git a/vendor/github.com/Sirupsen/logrus/text_formatter.go b/vendor/github.com/Sirupsen/logrus/text_formatter.go
deleted file mode 100644
index be412aa94..000000000
--- a/vendor/github.com/Sirupsen/logrus/text_formatter.go
+++ /dev/null
@@ -1,191 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "fmt"
- "io"
- "os"
- "sort"
- "strings"
- "sync"
- "time"
-
- "golang.org/x/crypto/ssh/terminal"
-)
-
-const (
- nocolor = 0
- red = 31
- green = 32
- yellow = 33
- blue = 36
- gray = 37
-)
-
-var (
- baseTimestamp time.Time
-)
-
-func init() {
- baseTimestamp = time.Now()
-}
-
-// TextFormatter formats logs into text
-type TextFormatter struct {
- // Set to true to bypass checking for a TTY before outputting colors.
- ForceColors bool
-
- // Force disabling colors.
- DisableColors bool
-
- // Disable timestamp logging. useful when output is redirected to logging
- // system that already adds timestamps.
- DisableTimestamp bool
-
- // Enable logging the full timestamp when a TTY is attached instead of just
- // the time passed since beginning of execution.
- FullTimestamp bool
-
- // TimestampFormat to use for display when a full timestamp is printed
- TimestampFormat string
-
- // The fields are sorted by default for a consistent output. For applications
- // that log extremely frequently and don't use the JSON formatter this may not
- // be desired.
- DisableSorting bool
-
- // QuoteEmptyFields will wrap empty fields in quotes if true
- QuoteEmptyFields bool
-
- // Whether the logger's out is to a terminal
- isTerminal bool
-
- sync.Once
-}
-
-func (f *TextFormatter) init(entry *Entry) {
- if entry.Logger != nil {
- f.isTerminal = f.checkIfTerminal(entry.Logger.Out)
- }
-}
-
-func (f *TextFormatter) checkIfTerminal(w io.Writer) bool {
- switch v := w.(type) {
- case *os.File:
- return terminal.IsTerminal(int(v.Fd()))
- default:
- return false
- }
-}
-
-// Format renders a single log entry
-func (f *TextFormatter) Format(entry *Entry) ([]byte, error) {
- var b *bytes.Buffer
- keys := make([]string, 0, len(entry.Data))
- for k := range entry.Data {
- keys = append(keys, k)
- }
-
- if !f.DisableSorting {
- sort.Strings(keys)
- }
- if entry.Buffer != nil {
- b = entry.Buffer
- } else {
- b = &bytes.Buffer{}
- }
-
- prefixFieldClashes(entry.Data)
-
- f.Do(func() { f.init(entry) })
-
- isColored := (f.ForceColors || f.isTerminal) && !f.DisableColors
-
- timestampFormat := f.TimestampFormat
- if timestampFormat == "" {
- timestampFormat = defaultTimestampFormat
- }
- if isColored {
- f.printColored(b, entry, keys, timestampFormat)
- } else {
- if !f.DisableTimestamp {
- f.appendKeyValue(b, "time", entry.Time.Format(timestampFormat))
- }
- f.appendKeyValue(b, "level", entry.Level.String())
- if entry.Message != "" {
- f.appendKeyValue(b, "msg", entry.Message)
- }
- for _, key := range keys {
- f.appendKeyValue(b, key, entry.Data[key])
- }
- }
-
- b.WriteByte('\n')
- return b.Bytes(), nil
-}
-
-func (f *TextFormatter) printColored(b *bytes.Buffer, entry *Entry, keys []string, timestampFormat string) {
- var levelColor int
- switch entry.Level {
- case DebugLevel:
- levelColor = gray
- case WarnLevel:
- levelColor = yellow
- case ErrorLevel, FatalLevel, PanicLevel:
- levelColor = red
- default:
- levelColor = blue
- }
-
- levelText := strings.ToUpper(entry.Level.String())[0:4]
-
- if f.DisableTimestamp {
- fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m %-44s ", levelColor, levelText, entry.Message)
- } else if !f.FullTimestamp {
- fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%04d] %-44s ", levelColor, levelText, int(entry.Time.Sub(baseTimestamp)/time.Second), entry.Message)
- } else {
- fmt.Fprintf(b, "\x1b[%dm%s\x1b[0m[%s] %-44s ", levelColor, levelText, entry.Time.Format(timestampFormat), entry.Message)
- }
- for _, k := range keys {
- v := entry.Data[k]
- fmt.Fprintf(b, " \x1b[%dm%s\x1b[0m=", levelColor, k)
- f.appendValue(b, v)
- }
-}
-
-func (f *TextFormatter) needsQuoting(text string) bool {
- if f.QuoteEmptyFields && len(text) == 0 {
- return true
- }
- for _, ch := range text {
- if !((ch >= 'a' && ch <= 'z') ||
- (ch >= 'A' && ch <= 'Z') ||
- (ch >= '0' && ch <= '9') ||
- ch == '-' || ch == '.' || ch == '_' || ch == '/' || ch == '@' || ch == '^' || ch == '+') {
- return true
- }
- }
- return false
-}
-
-func (f *TextFormatter) appendKeyValue(b *bytes.Buffer, key string, value interface{}) {
- if b.Len() > 0 {
- b.WriteByte(' ')
- }
- b.WriteString(key)
- b.WriteByte('=')
- f.appendValue(b, value)
-}
-
-func (f *TextFormatter) appendValue(b *bytes.Buffer, value interface{}) {
- stringVal, ok := value.(string)
- if !ok {
- stringVal = fmt.Sprint(value)
- }
-
- if !f.needsQuoting(stringVal) {
- b.WriteString(stringVal)
- } else {
- b.WriteString(fmt.Sprintf("%q", stringVal))
- }
-}
diff --git a/vendor/github.com/Sirupsen/logrus/text_formatter_test.go b/vendor/github.com/Sirupsen/logrus/text_formatter_test.go
deleted file mode 100644
index d93b931e5..000000000
--- a/vendor/github.com/Sirupsen/logrus/text_formatter_test.go
+++ /dev/null
@@ -1,141 +0,0 @@
-package logrus
-
-import (
- "bytes"
- "errors"
- "fmt"
- "strings"
- "testing"
- "time"
-)
-
-func TestFormatting(t *testing.T) {
- tf := &TextFormatter{DisableColors: true}
-
- testCases := []struct {
- value string
- expected string
- }{
- {`foo`, "time=\"0001-01-01T00:00:00Z\" level=panic test=foo\n"},
- }
-
- for _, tc := range testCases {
- b, _ := tf.Format(WithField("test", tc.value))
-
- if string(b) != tc.expected {
- t.Errorf("formatting expected for %q (result was %q instead of %q)", tc.value, string(b), tc.expected)
- }
- }
-}
-
-func TestQuoting(t *testing.T) {
- tf := &TextFormatter{DisableColors: true}
-
- checkQuoting := func(q bool, value interface{}) {
- b, _ := tf.Format(WithField("test", value))
- idx := bytes.Index(b, ([]byte)("test="))
- cont := bytes.Contains(b[idx+5:], []byte("\""))
- if cont != q {
- if q {
- t.Errorf("quoting expected for: %#v", value)
- } else {
- t.Errorf("quoting not expected for: %#v", value)
- }
- }
- }
-
- checkQuoting(false, "")
- checkQuoting(false, "abcd")
- checkQuoting(false, "v1.0")
- checkQuoting(false, "1234567890")
- checkQuoting(false, "/foobar")
- checkQuoting(false, "foo_bar")
- checkQuoting(false, "foo@bar")
- checkQuoting(false, "foobar^")
- checkQuoting(false, "+/-_^@f.oobar")
- checkQuoting(true, "foobar$")
- checkQuoting(true, "&foobar")
- checkQuoting(true, "x y")
- checkQuoting(true, "x,y")
- checkQuoting(false, errors.New("invalid"))
- checkQuoting(true, errors.New("invalid argument"))
-
- // Test for quoting empty fields.
- tf.QuoteEmptyFields = true
- checkQuoting(true, "")
- checkQuoting(false, "abcd")
- checkQuoting(true, errors.New("invalid argument"))
-}
-
-func TestEscaping(t *testing.T) {
- tf := &TextFormatter{DisableColors: true}
-
- testCases := []struct {
- value string
- expected string
- }{
- {`ba"r`, `ba\"r`},
- {`ba'r`, `ba'r`},
- }
-
- for _, tc := range testCases {
- b, _ := tf.Format(WithField("test", tc.value))
- if !bytes.Contains(b, []byte(tc.expected)) {
- t.Errorf("escaping expected for %q (result was %q instead of %q)", tc.value, string(b), tc.expected)
- }
- }
-}
-
-func TestEscaping_Interface(t *testing.T) {
- tf := &TextFormatter{DisableColors: true}
-
- ts := time.Now()
-
- testCases := []struct {
- value interface{}
- expected string
- }{
- {ts, fmt.Sprintf("\"%s\"", ts.String())},
- {errors.New("error: something went wrong"), "\"error: something went wrong\""},
- }
-
- for _, tc := range testCases {
- b, _ := tf.Format(WithField("test", tc.value))
- if !bytes.Contains(b, []byte(tc.expected)) {
- t.Errorf("escaping expected for %q (result was %q instead of %q)", tc.value, string(b), tc.expected)
- }
- }
-}
-
-func TestTimestampFormat(t *testing.T) {
- checkTimeStr := func(format string) {
- customFormatter := &TextFormatter{DisableColors: true, TimestampFormat: format}
- customStr, _ := customFormatter.Format(WithField("test", "test"))
- timeStart := bytes.Index(customStr, ([]byte)("time="))
- timeEnd := bytes.Index(customStr, ([]byte)("level="))
- timeStr := customStr[timeStart+5+len("\"") : timeEnd-1-len("\"")]
- if format == "" {
- format = time.RFC3339
- }
- _, e := time.Parse(format, (string)(timeStr))
- if e != nil {
- t.Errorf("time string \"%s\" did not match provided time format \"%s\": %s", timeStr, format, e)
- }
- }
-
- checkTimeStr("2006-01-02T15:04:05.000000000Z07:00")
- checkTimeStr("Mon Jan _2 15:04:05 2006")
- checkTimeStr("")
-}
-
-func TestDisableTimestampWithColoredOutput(t *testing.T) {
- tf := &TextFormatter{DisableTimestamp: true, ForceColors: true}
-
- b, _ := tf.Format(WithField("test", "test"))
- if strings.Contains(string(b), "[0000]") {
- t.Error("timestamp not expected when DisableTimestamp is true")
- }
-}
-
-// TODO add tests for sorting etc., this requires a parser for the text
-// formatter output.
diff --git a/vendor/github.com/Sirupsen/logrus/writer.go b/vendor/github.com/Sirupsen/logrus/writer.go
deleted file mode 100644
index 7bdebedc6..000000000
--- a/vendor/github.com/Sirupsen/logrus/writer.go
+++ /dev/null
@@ -1,62 +0,0 @@
-package logrus
-
-import (
- "bufio"
- "io"
- "runtime"
-)
-
-func (logger *Logger) Writer() *io.PipeWriter {
- return logger.WriterLevel(InfoLevel)
-}
-
-func (logger *Logger) WriterLevel(level Level) *io.PipeWriter {
- return NewEntry(logger).WriterLevel(level)
-}
-
-func (entry *Entry) Writer() *io.PipeWriter {
- return entry.WriterLevel(InfoLevel)
-}
-
-func (entry *Entry) WriterLevel(level Level) *io.PipeWriter {
- reader, writer := io.Pipe()
-
- var printFunc func(args ...interface{})
-
- switch level {
- case DebugLevel:
- printFunc = entry.Debug
- case InfoLevel:
- printFunc = entry.Info
- case WarnLevel:
- printFunc = entry.Warn
- case ErrorLevel:
- printFunc = entry.Error
- case FatalLevel:
- printFunc = entry.Fatal
- case PanicLevel:
- printFunc = entry.Panic
- default:
- printFunc = entry.Print
- }
-
- go entry.writerScanner(reader, printFunc)
- runtime.SetFinalizer(writer, writerFinalizer)
-
- return writer
-}
-
-func (entry *Entry) writerScanner(reader *io.PipeReader, printFunc func(args ...interface{})) {
- scanner := bufio.NewScanner(reader)
- for scanner.Scan() {
- printFunc(scanner.Text())
- }
- if err := scanner.Err(); err != nil {
- entry.Errorf("Error while reading from Writer: %s", err)
- }
- reader.Close()
-}
-
-func writerFinalizer(writer *io.PipeWriter) {
- writer.Close()
-}
diff --git a/vendor/github.com/apache/thrift/.travis.yml b/vendor/github.com/apache/thrift/.travis.yml
index 443960bee..e372e1383 100644
--- a/vendor/github.com/apache/thrift/.travis.yml
+++ b/vendor/github.com/apache/thrift/.travis.yml
@@ -42,9 +42,14 @@ env:
- BUILD_LIBS="CPP C_GLIB HASKELL JAVA PYTHON TESTING TUTORIALS" # only meaningful for CMake builds
matrix:
- - TEST_NAME="Cross Language Tests (Binary, Header, JSON Protocols)"
+ - TEST_NAME="Cross Language Tests (Binary Protocol)"
SCRIPT="cross-test.sh"
- BUILD_ARG="-'(binary|header|json)'"
+ BUILD_ARG="-'(binary)'"
+ BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
+
+ - TEST_NAME="Cross Language Tests (Header, JSON Protocols)"
+ SCRIPT="cross-test.sh"
+ BUILD_ARG="-'(header|json)'"
BUILD_ENV="-e CC=clang -e CXX=clang++ -e THRIFT_CROSSTEST_CONCURRENCY=4"
- TEST_NAME="Cross Language Tests (Compact and Multiplexed Protocols)"
@@ -54,20 +59,22 @@ env:
# Autotools builds
# TODO: Remove them once migrated to CMake
- - TEST_NAME="Autotools (CentOS 7.3)"
- DISTRO=centos-7.3
- SCRIPT="autotools.sh"
- BUILD_ENV="-e CC=gcc -e CXX=g++"
- BUILD_ARG="--without-cpp --without-csharp --without-c_glib --without-d -without-dart --without-erlang --without-go --without-haskell --without-haxe"
+ # centos-7.3 build jobs appear to be unstable/hang...
+ # TEST_NAME="Autotools (CentOS 7.3)"
+ # DISTRO=centos-7.3
+ # SCRIPT="autotools.sh"
+ # BUILD_ENV="-e CC=gcc -e CXX=g++"
+ # BUILD_ARG="--without-cpp --without-csharp --without-c_glib --without-d -without-dart --without-erlang --without-go --without-haskell --without-haxe"
- TEST_NAME="Autotools (Ubuntu Xenial)"
SCRIPT="autotools.sh"
BUILD_ENV="-e CC=gcc -e CXX=g++"
- BUILD_ARG="--enable-plugin --without-java --without-lua --without-nodejs --without-perl --without-php --without-php_extension --without-python --without-py3 --without-ruby --without-rust"
+ BUILD_ARG="--enable-plugin" # --without-java --without-lua --without-nodejs --without-perl --without-php --without-php_extension --without-python --without-py3 --without-ruby --without-rust"
# CMake builds
- - TEST_NAME="CMake (CentOS 7.3)"
- DISTRO=centos-7.3
+ # centos-7.3 build jobs appear to be unstable/hang...
+ # TEST_NAME="CMake (CentOS 7.3)"
+ # DISTRO=centos-7.3
- TEST_NAME="CMake (Ubuntu Xenial)"
@@ -76,7 +83,7 @@ env:
BUILD_LIBS="CPP TESTING TUTORIALS"
BUILD_ARG="-DWITH_BOOSTTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
- - TEST_NAME="C++ Plugin (Std Thread)"
+ - TEST_NAME="C++ (Std Thread) and Plugin"
BUILD_LIBS="CPP TESTING TUTORIALS"
BUILD_ARG="-DWITH_PLUGIN=ON -DWITH_STDTHREADS=ON -DWITH_PYTHON=OFF -DWITH_C_GLIB=OFF -DWITH_JAVA=OFF -DWITH_HASKELL=OFF"
@@ -89,11 +96,15 @@ env:
# C and C++ undefined behavior. This wraps autotools.sh, but each binary crashes if
# undefined behavior occurs. Skips the known flaky tests.
+ # Unstable: THRIFT-4064 needs to be fixed perhaps?
- TEST_NAME="UBSan"
SCRIPT="ubsan.sh"
BUILD_ARG="--without-haskell --without-nodejs --without-perl --without-python"
+ UNSTABLE=true
matrix:
+ allow_failures:
+ - env: UNSTABLE=true
include:
# QA jobs for code analytics and metrics
#
diff --git a/vendor/github.com/apache/thrift/appveyor.yml b/vendor/github.com/apache/thrift/appveyor.yml
index fc09f87f9..4c2e36496 100755
--- a/vendor/github.com/apache/thrift/appveyor.yml
+++ b/vendor/github.com/apache/thrift/appveyor.yml
@@ -40,7 +40,7 @@ environment:
LIBEVENT_VERSION: 2.0.22
QT_VERSION: 5.6
ZLIB_VERSION: 1.2.8
- DISABLED_TESTS: StressTestNonBlocking|concurrency_test
+ DISABLED_TESTS: StressTestNonBlocking
- PROFILE: MSVC2015
PLATFORM: x64
diff --git a/vendor/github.com/apache/thrift/build/docker/centos-7.3/Dockerfile b/vendor/github.com/apache/thrift/build/docker/centos-7.3/Dockerfile
index f79939c72..096bbaa45 100644
--- a/vendor/github.com/apache/thrift/build/docker/centos-7.3/Dockerfile
+++ b/vendor/github.com/apache/thrift/build/docker/centos-7.3/Dockerfile
@@ -10,11 +10,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-# Apache Thrift Docker build environment for Centos
+# Apache Thrift Docker build environment for CentOS
#
# Known missing client libraries:
# - dotnet (will update to 2.0.0 separately)
-# - haxe (not in debian stretch)
+# - haxe (not in centos)
FROM centos:7.3.1611
MAINTAINER Apache Thrift
@@ -33,12 +33,14 @@ RUN yum install -y \
flex \
gcc \
gcc-c++ \
+ gdb \
git \
libtool \
m4 \
make \
tar \
unzip \
+ valgrind \
wget && \
ln -s /usr/bin/cmake3 /usr/bin/cmake && \
ln -s /usr/bin/cpack3 /usr/bin/cpack && \
diff --git a/vendor/github.com/apache/thrift/build/docker/debian-stretch/Dockerfile b/vendor/github.com/apache/thrift/build/docker/debian-stretch/Dockerfile
index 70309fbe0..503eecd42 100644
--- a/vendor/github.com/apache/thrift/build/docker/debian-stretch/Dockerfile
+++ b/vendor/github.com/apache/thrift/build/docker/debian-stretch/Dockerfile
@@ -56,6 +56,7 @@ RUN apt-get install -y --no-install-recommends \
gdb \
ninja-build \
pkg-config \
+ valgrind \
vim
diff --git a/vendor/github.com/apache/thrift/build/docker/ubuntu-xenial/Dockerfile b/vendor/github.com/apache/thrift/build/docker/ubuntu-xenial/Dockerfile
index 6bad6a94c..61ba5ffc3 100644
--- a/vendor/github.com/apache/thrift/build/docker/ubuntu-xenial/Dockerfile
+++ b/vendor/github.com/apache/thrift/build/docker/ubuntu-xenial/Dockerfile
@@ -60,6 +60,7 @@ RUN apt-get install -y --no-install-recommends \
llvm \
ninja-build \
pkg-config \
+ valgrind \
vim
ENV PATH /usr/lib/llvm-3.8/bin:$PATH
@@ -140,7 +141,8 @@ RUN apt-get install -y --no-install-recommends \
neko-dev \
libneko0
RUN haxelib setup --always /usr/share/haxe/lib && \
- haxelib install --always hxcpp
+ haxelib install --always hxcpp 3.4.64
+# note: hxcpp 3.4.185 (latest) no longer ships static libraries, and caused a build failure
RUN apt-get install -y --no-install-recommends \
`# Java dependencies` \
diff --git a/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_csharp_generator.cc b/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
index 62a3e573d..10d28b213 100644
--- a/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
+++ b/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_csharp_generator.cc
@@ -2820,6 +2820,8 @@ void t_csharp_generator::generate_csharp_property(ofstream& out,
}
if (ttype->is_base_type()) {
use_nullable = ((t_base_type*)ttype)->get_base() != t_base_type::TYPE_STRING;
+ } else if (ttype->is_enum()) {
+ use_nullable = true;
}
}
indent(out) << "return " << fieldPrefix + tfield->get_name() << ";" << endl;
diff --git a/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_delphi_generator.cc b/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
index d2385668b..1894fe83b 100644
--- a/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
+++ b/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_delphi_generator.cc
@@ -2023,13 +2023,13 @@ void t_delphi_generator::generate_service_client(t_service* tservice) {
indent_impl(s_service_impl) << "var" << endl;
indent_up_impl();
indent_impl(s_service_impl) << argsvar << " : " << args_intfnm << ";" << endl;
- indent_impl(s_service_impl) << msgvar << " : Thrift.Protocol.IMessage;" << endl;
+ indent_impl(s_service_impl) << msgvar << " : Thrift.Protocol.TThriftMessage;" << endl;
indent_down_impl();
indent_impl(s_service_impl) << "begin" << endl;
indent_up_impl();
indent_impl(s_service_impl) << "seqid_ := seqid_ + 1;" << endl;
- indent_impl(s_service_impl) << msgvar << " := Thrift.Protocol.TMessageImpl.Create('" << funname
+ indent_impl(s_service_impl) << "Thrift.Protocol.Init( " << msgvar << ", '" << funname
<< "', " << ((*f_iter)->is_oneway() ? "TMessageType.Oneway"
: "TMessageType.Call")
<< ", seqid_);" << endl;
@@ -2076,7 +2076,7 @@ void t_delphi_generator::generate_service_client(t_service* tservice) {
indent_impl(s_service_impl) << function_signature(&recv_function, full_cls) << endl;
indent_impl(s_service_impl) << "var" << endl;
indent_up_impl();
- indent_impl(s_service_impl) << msgvar << " : Thrift.Protocol.IMessage;" << endl;
+ indent_impl(s_service_impl) << msgvar << " : Thrift.Protocol.TThriftMessage;" << endl;
if (xceptions.size() > 0) {
indent_impl(s_service_impl) << exceptvar << " : Exception;" << endl;
}
@@ -2234,7 +2234,7 @@ void t_delphi_generator::generate_service_server(t_service* tservice) {
;
indent_impl(s_service_impl) << "var" << endl;
indent_up_impl();
- indent_impl(s_service_impl) << "msg : Thrift.Protocol.IMessage;" << endl;
+ indent_impl(s_service_impl) << "msg : Thrift.Protocol.TThriftMessage;" << endl;
indent_impl(s_service_impl) << "fn : TProcessFunction;" << endl;
indent_impl(s_service_impl) << "x : TApplicationException;" << endl;
if (events_) {
@@ -2257,7 +2257,7 @@ void t_delphi_generator::generate_service_server(t_service* tservice) {
"TApplicationExceptionUnknownMethod.Create("
"'Invalid method name: ''' + msg.Name + '''');" << endl;
indent_impl(s_service_impl)
- << "msg := Thrift.Protocol.TMessageImpl.Create(msg.Name, TMessageType.Exception, msg.SeqID);"
+ << "Thrift.Protocol.Init( msg, msg.Name, TMessageType.Exception, msg.SeqID);"
<< endl;
indent_impl(s_service_impl) << "oprot.WriteMessageBegin( msg);" << endl;
indent_impl(s_service_impl) << "x.Write(oprot);" << endl;
@@ -2373,7 +2373,7 @@ void t_delphi_generator::generate_process_function(t_service* tservice, t_functi
indent_up_impl();
indent_impl(s_service_impl) << "args: " << args_intfnm << ";" << endl;
if (!tfunction->is_oneway()) {
- indent_impl(s_service_impl) << "msg: Thrift.Protocol.IMessage;" << endl;
+ indent_impl(s_service_impl) << "msg: Thrift.Protocol.TThriftMessage;" << endl;
indent_impl(s_service_impl) << "ret: " << result_intfnm << ";" << endl;
indent_impl(s_service_impl) << "appx : TApplicationException;" << endl;
}
@@ -2459,7 +2459,7 @@ void t_delphi_generator::generate_process_function(t_service* tservice, t_functi
if(events_) {
indent_impl(s_service_impl) << "if events <> nil then events.PreWrite;" << endl;
}
- indent_impl(s_service_impl) << "msg := Thrift.Protocol.TMessageImpl.Create('"
+ indent_impl(s_service_impl) << "Thrift.Protocol.Init( msg, '"
<< tfunction->get_name() << "', TMessageType.Exception, seqid);"
<< endl;
indent_impl(s_service_impl) << "oprot.WriteMessageBegin( msg);" << endl;
@@ -2487,7 +2487,7 @@ void t_delphi_generator::generate_process_function(t_service* tservice, t_functi
if (events_) {
indent_impl(s_service_impl) << "if events <> nil then events.PreWrite;" << endl;
}
- indent_impl(s_service_impl) << "msg := Thrift.Protocol.TMessageImpl.Create('"
+ indent_impl(s_service_impl) << "Thrift.Protocol.Init( msg, '"
<< tfunction->get_name() << "', TMessageType.Reply, seqid); "
<< endl;
indent_impl(s_service_impl) << "oprot.WriteMessageBegin( msg); " << endl;
@@ -2619,11 +2619,11 @@ void t_delphi_generator::generate_deserialize_container(ostream& out,
}
if (ttype->is_map()) {
- local_var = obj + ": IMap;";
+ local_var = obj + ": TThriftMap;";
} else if (ttype->is_set()) {
- local_var = obj + ": ISet;";
+ local_var = obj + ": TThriftSet;";
} else if (ttype->is_list()) {
- local_var = obj + ": IList;";
+ local_var = obj + ": TThriftList;";
}
local_vars << " " << local_var << endl;
counter = tmp("_i");
@@ -2803,23 +2803,23 @@ void t_delphi_generator::generate_serialize_container(ostream& out,
string obj;
if (ttype->is_map()) {
obj = tmp("map");
- local_vars << " " << obj << " : IMap;" << endl;
- indent_impl(out) << obj << " := TMapImpl.Create( "
+ local_vars << " " << obj << " : TThriftMap;" << endl;
+ indent_impl(out) << "Thrift.Protocol.Init( " << obj << ", "
<< type_to_enum(((t_map*)ttype)->get_key_type()) << ", "
<< type_to_enum(((t_map*)ttype)->get_val_type()) << ", " << prefix
<< ".Count);" << endl;
indent_impl(out) << "oprot.WriteMapBegin( " << obj << ");" << endl;
} else if (ttype->is_set()) {
obj = tmp("set_");
- local_vars << " " << obj << " : ISet;" << endl;
- indent_impl(out) << obj << " := TSetImpl.Create("
+ local_vars << " " << obj << " : TThriftSet;" << endl;
+ indent_impl(out) << "Thrift.Protocol.Init( " << obj << ", "
<< type_to_enum(((t_set*)ttype)->get_elem_type()) << ", " << prefix
<< ".Count);" << endl;
indent_impl(out) << "oprot.WriteSetBegin( " << obj << ");" << endl;
} else if (ttype->is_list()) {
obj = tmp("list_");
- local_vars << " " << obj << " : IList;" << endl;
- indent_impl(out) << obj << " := TListImpl.Create("
+ local_vars << " " << obj << " : TThriftList;" << endl;
+ indent_impl(out) << "Thrift.Protocol.Init( " << obj << ", "
<< type_to_enum(((t_list*)ttype)->get_elem_type()) << ", " << prefix
<< ".Count);" << endl;
indent_impl(out) << "oprot.WriteListBegin( " << obj << ");" << endl;
@@ -3548,7 +3548,7 @@ void t_delphi_generator::generate_delphi_struct_reader_impl(ostream& out,
<< ") then begin" << endl;
indent_up_impl();
- generate_deserialize_field(code_block, is_exception, *f_iter, "", local_vars);
+ generate_deserialize_field(code_block, is_exception, *f_iter, "Self.", local_vars);
// required field?
if ((*f_iter)->get_req() == t_field::T_REQUIRED) {
@@ -3617,8 +3617,8 @@ void t_delphi_generator::generate_delphi_struct_reader_impl(ostream& out,
<< endl;
indent_impl(out) << "var" << endl;
indent_up_impl();
- indent_impl(out) << "field_ : IField;" << endl;
- indent_impl(out) << "struc : IStruct;" << endl;
+ indent_impl(out) << "field_ : TThriftField;" << endl;
+ indent_impl(out) << "struc : TThriftStruct;" << endl;
indent_down_impl();
out << local_vars.str() << endl;
out << code_block.str();
@@ -3642,11 +3642,11 @@ void t_delphi_generator::generate_delphi_struct_result_writer_impl(ostream& out,
indent_impl(local_vars) << "tracker : IProtocolRecursionTracker;" << endl;
indent_impl(code_block) << "tracker := oprot.NextRecursionLevel;" << endl;
- indent_impl(code_block) << "struc := TStructImpl.Create('" << name << "');" << endl;
+ indent_impl(code_block) << "Thrift.Protocol.Init( struc, '" << name << "');" << endl;
indent_impl(code_block) << "oprot.WriteStructBegin(struc);" << endl;
if (fields.size() > 0) {
- indent_impl(code_block) << "field_ := TFieldImpl.Create;" << endl;
+ indent_impl(code_block) << "Thrift.Protocol.Init( field_);" << endl;
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
indent_impl(code_block) << "if (__isset_" << prop_name(*f_iter, is_exception) << ") then"
<< endl;
@@ -3657,7 +3657,7 @@ void t_delphi_generator::generate_delphi_struct_result_writer_impl(ostream& out,
<< endl;
indent_impl(code_block) << "field_.ID := " << (*f_iter)->get_key() << ";" << endl;
indent_impl(code_block) << "oprot.WriteFieldBegin(field_);" << endl;
- generate_serialize_field(code_block, is_exception, *f_iter, "", local_vars);
+ generate_serialize_field(code_block, is_exception, *f_iter, "Self.", local_vars);
indent_impl(code_block) << "oprot.WriteFieldEnd();" << endl;
indent_down_impl();
}
@@ -3677,10 +3677,10 @@ void t_delphi_generator::generate_delphi_struct_result_writer_impl(ostream& out,
<< endl;
indent_impl(out) << "var" << endl;
indent_up_impl();
- indent_impl(out) << "struc : IStruct;" << endl;
+ indent_impl(out) << "struc : TThriftStruct;" << endl;
if (fields.size() > 0) {
- indent_impl(out) << "field_ : IField;" << endl;
+ indent_impl(out) << "field_ : TThriftField;" << endl;
}
out << local_vars.str();
@@ -3706,11 +3706,11 @@ void t_delphi_generator::generate_delphi_struct_writer_impl(ostream& out,
indent_impl(local_vars) << "tracker : IProtocolRecursionTracker;" << endl;
indent_impl(code_block) << "tracker := oprot.NextRecursionLevel;" << endl;
- indent_impl(code_block) << "struc := TStructImpl.Create('" << name << "');" << endl;
+ indent_impl(code_block) << "Thrift.Protocol.Init( struc, '" << name << "');" << endl;
indent_impl(code_block) << "oprot.WriteStructBegin(struc);" << endl;
if (fields.size() > 0) {
- indent_impl(code_block) << "field_ := TFieldImpl.Create;" << endl;
+ indent_impl(code_block) << "Thrift.Protocol.Init( field_);" << endl;
}
for (f_iter = fields.begin(); f_iter != fields.end(); ++f_iter) {
@@ -3720,13 +3720,13 @@ void t_delphi_generator::generate_delphi_struct_writer_impl(ostream& out,
bool has_isset = (!is_required);
if (is_required && null_allowed) {
null_allowed = false;
- indent_impl(code_block) << "if (" << fieldname << " = nil)" << endl;
+ indent_impl(code_block) << "if (Self." << fieldname << " = nil)" << endl;
indent_impl(code_block) << "then raise TProtocolExceptionInvalidData.Create("
<< "'required field " << fieldname << " not set');"
<< endl;
}
if (null_allowed) {
- indent_impl(code_block) << "if (" << fieldname << " <> nil)";
+ indent_impl(code_block) << "if (Self." << fieldname << " <> nil)";
if (has_isset) {
code_block << " and __isset_" << fieldname;
}
@@ -3743,7 +3743,7 @@ void t_delphi_generator::generate_delphi_struct_writer_impl(ostream& out,
<< endl;
indent_impl(code_block) << "field_.ID := " << (*f_iter)->get_key() << ";" << endl;
indent_impl(code_block) << "oprot.WriteFieldBegin(field_);" << endl;
- generate_serialize_field(code_block, is_exception, *f_iter, "", local_vars);
+ generate_serialize_field(code_block, is_exception, *f_iter, "Self.", local_vars);
indent_impl(code_block) << "oprot.WriteFieldEnd();" << endl;
if (null_allowed || has_isset) {
indent_down_impl();
@@ -3765,9 +3765,9 @@ void t_delphi_generator::generate_delphi_struct_writer_impl(ostream& out,
<< endl;
indent_impl(out) << "var" << endl;
indent_up_impl();
- indent_impl(out) << "struc : IStruct;" << endl;
+ indent_impl(out) << "struc : TThriftStruct;" << endl;
if (fields.size() > 0) {
- indent_impl(out) << "field_ : IField;" << endl;
+ indent_impl(out) << "field_ : TThriftField;" << endl;
}
out << local_vars.str();
indent_down_impl();
@@ -3825,7 +3825,7 @@ void t_delphi_generator::generate_delphi_struct_tostring_impl(ostream& out,
bool null_allowed = type_can_be_null((*f_iter)->get_type());
bool is_optional = ((*f_iter)->get_req() != t_field::T_REQUIRED);
if (null_allowed) {
- indent_impl(out) << "if (" << prop_name((*f_iter), is_exception) << " <> nil)";
+ indent_impl(out) << "if (Self." << prop_name((*f_iter), is_exception) << " <> nil)";
if (is_optional) {
out << " and __isset_" << prop_name(*f_iter, is_exception);
}
@@ -3857,14 +3857,14 @@ void t_delphi_generator::generate_delphi_struct_tostring_impl(ostream& out,
}
if (ttype->is_xception() || ttype->is_struct()) {
- indent_impl(out) << "if (" << prop_name((*f_iter), is_exception) << " = nil) then " << tmp_sb
- << ".Append('') else " << tmp_sb << ".Append("
+ indent_impl(out) << "if (Self." << prop_name((*f_iter), is_exception) << " = nil) then " << tmp_sb
+ << ".Append('') else " << tmp_sb << ".Append( Self."
<< prop_name((*f_iter), is_exception) << ".ToString());" << endl;
} else if (ttype->is_enum()) {
- indent_impl(out) << tmp_sb << ".Append(Integer(" << prop_name((*f_iter), is_exception)
+ indent_impl(out) << tmp_sb << ".Append(Integer( Self." << prop_name((*f_iter), is_exception)
<< "));" << endl;
} else {
- indent_impl(out) << tmp_sb << ".Append(" << prop_name((*f_iter), is_exception) << ");"
+ indent_impl(out) << tmp_sb << ".Append( Self." << prop_name((*f_iter), is_exception) << ");"
<< endl;
}
diff --git a/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_py_generator.cc b/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_py_generator.cc
index 9d50aaf49..23d4b7065 100644
--- a/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_py_generator.cc
+++ b/vendor/github.com/apache/thrift/compiler/cpp/src/thrift/generate/t_py_generator.cc
@@ -58,6 +58,7 @@ public:
gen_dynbase_ = false;
gen_slots_ = false;
gen_tornado_ = false;
+ gen_zope_interface_ = false;
gen_twisted_ = false;
gen_dynamic_ = false;
coding_ = "";
@@ -105,8 +106,11 @@ public:
} else if( iter->first.compare("dynimport") == 0) {
gen_dynbase_ = true;
import_dynbase_ = (iter->second);
+ } else if( iter->first.compare("zope.interface") == 0) {
+ gen_zope_interface_ = true;
} else if( iter->first.compare("twisted") == 0) {
gen_twisted_ = true;
+ gen_zope_interface_ = true;
} else if( iter->first.compare("tornado") == 0) {
gen_tornado_ = true;
} else if( iter->first.compare("coding") == 0) {
@@ -290,6 +294,11 @@ private:
std::string copy_options_;
+ /**
+ * True if we should generate code for use with zope.interface.
+ */
+ bool gen_zope_interface_;
+
/**
* True if we should generate Twisted-friendly RPC services.
*/
@@ -425,7 +434,7 @@ string t_py_generator::py_imports() {
<< endl
<< "from thrift.protocol.TProtocol import TProtocolException"
<< endl
- << "from thrift.TRecursive import fix_spec"
+ << "from thrift.TRecursive import fix_spec"
<< endl;
if (gen_utf8strings_) {
@@ -623,10 +632,10 @@ string t_py_generator::render_const_value(t_type* type, t_const_value* value) {
return out.str();
}
-/**
+/**
* Generates the "forward declarations" for python structs.
* These are actually full class definitions so that calls to generate_struct
- * can add the thrift_spec field. This is needed so that all thrift_spec
+ * can add the thrift_spec field. This is needed so that all thrift_spec
* definitions are grouped at the end of the file to enable co-recursive structs.
*/
void t_py_generator::generate_forward_declaration(t_struct* tstruct) {
@@ -1091,10 +1100,12 @@ void t_py_generator::generate_service(t_service* tservice) {
<< "from thrift.Thrift import TProcessor" << endl
<< "from thrift.transport import TTransport" << endl
<< import_dynbase_;
+ if (gen_zope_interface_) {
+ f_service_ << "from zope.interface import Interface, implementer" << endl;
+ }
if (gen_twisted_) {
- f_service_ << "from zope.interface import Interface, implementer" << endl
- << "from twisted.internet import defer" << endl
+ f_service_ << "from twisted.internet import defer" << endl
<< "from thrift.transport import TTwisted" << endl;
} else if (gen_tornado_) {
f_service_ << "from tornado import gen" << endl;
@@ -1171,7 +1182,7 @@ void t_py_generator::generate_service_interface(t_service* tservice) {
extends = type_name(tservice->get_extends());
extends_if = "(" + extends + ".Iface)";
} else {
- if (gen_twisted_) {
+ if (gen_zope_interface_) {
extends_if = "(Interface)";
} else if (gen_newstyle_ || gen_dynamic_ || gen_tornado_) {
extends_if = "(object)";
@@ -1214,20 +1225,20 @@ void t_py_generator::generate_service_client(t_service* tservice) {
string extends_client = "";
if (tservice->get_extends() != NULL) {
extends = type_name(tservice->get_extends());
- if (gen_twisted_) {
+ if (gen_zope_interface_) {
extends_client = "(" + extends + ".Client)";
} else {
extends_client = extends + ".Client, ";
}
} else {
- if (gen_twisted_ && (gen_newstyle_ || gen_dynamic_)) {
+ if (gen_zope_interface_ && (gen_newstyle_ || gen_dynamic_)) {
extends_client = "(object)";
}
}
f_service_ << endl << endl;
- if (gen_twisted_) {
+ if (gen_zope_interface_) {
f_service_ << "@implementer(Iface)" << endl
<< "class Client" << extends_client << ":" << endl
<< endl;
@@ -1767,7 +1778,7 @@ void t_py_generator::generate_service_server(t_service* tservice) {
f_service_ << endl << endl;
// Generate the header portion
- if (gen_twisted_) {
+ if (gen_zope_interface_) {
f_service_ << "@implementer(Iface)" << endl
<< "class Processor(" << extends_processor << "TProcessor):" << endl;
} else {
@@ -1779,7 +1790,7 @@ void t_py_generator::generate_service_server(t_service* tservice) {
indent(f_service_) << "def __init__(self, handler):" << endl;
indent_up();
if (extends.empty()) {
- if (gen_twisted_) {
+ if (gen_zope_interface_) {
f_service_ << indent() << "self._handler = Iface(handler)" << endl;
} else {
f_service_ << indent() << "self._handler = handler" << endl;
@@ -1787,7 +1798,7 @@ void t_py_generator::generate_service_server(t_service* tservice) {
f_service_ << indent() << "self._processMap = {}" << endl;
} else {
- if (gen_twisted_) {
+ if (gen_zope_interface_) {
f_service_ << indent() << extends << ".Processor.__init__(self, Iface(handler))" << endl;
} else {
f_service_ << indent() << extends << ".Processor.__init__(self, handler)" << endl;
@@ -2536,7 +2547,7 @@ string t_py_generator::function_signature(t_function* tfunction, bool interface)
vector post;
string signature = tfunction->get_name() + "(";
- if (!(gen_twisted_ && interface)) {
+ if (!(gen_zope_interface_ && interface)) {
pre.push_back("self");
}
@@ -2680,6 +2691,7 @@ string t_py_generator::type_to_spec_args(t_type* ttype) {
THRIFT_REGISTER_GENERATOR(
py,
"Python",
+ " zope.interface: Generate code for use with zope.interface.\n"
" twisted: Generate Twisted-friendly RPC services.\n"
" tornado: Generate code for use with Tornado.\n"
" no_utf8strings: Do not Encode/decode strings using utf8 in the generated code. Basically no effect for Python 3.\n"
diff --git a/vendor/github.com/apache/thrift/configure.ac b/vendor/github.com/apache/thrift/configure.ac
index df716bd0b..17d40603d 100755
--- a/vendor/github.com/apache/thrift/configure.ac
+++ b/vendor/github.com/apache/thrift/configure.ac
@@ -83,6 +83,9 @@ AS_IF([test "x$D_IMPORT_PREFIX" = x], [D_IMPORT_PREFIX="${includedir}/d2"])
AC_ARG_VAR([DMD_LIBEVENT_FLAGS], [DMD flags for linking libevent (auto-detected if not set).])
AC_ARG_VAR([DMD_OPENSSL_FLAGS], [DMD flags for linking OpenSSL (auto-detected if not set).])
+AC_ARG_VAR([THRIFT], [Path to the thrift tool (needed for cross-compilation).])
+AS_IF([test "x$THRIFT" = x], [THRIFT=`pwd`/compiler/cpp/thrift])
+
AC_PROG_CC
AC_PROG_CPP
AC_PROG_CXX
diff --git a/vendor/github.com/apache/thrift/lib/c_glib/test/Makefile.am b/vendor/github.com/apache/thrift/lib/c_glib/test/Makefile.am
index 8c6c48ddc..5e9d2ea41 100755
--- a/vendor/github.com/apache/thrift/lib/c_glib/test/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/c_glib/test/Makefile.am
@@ -237,8 +237,6 @@ nodist_libtestgencpp_la_SOURCES = \
gen-cpp/ThriftTest_types.h
libtestgencpp_la_CPPFLAGS = -I../../cpp/src $(BOOST_CPPFLAGS) -I./gen-cpp
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-c_glib/t_test_container_test_types.c gen-c_glib/t_test_container_test_types.h gen-c_glib/t_test_container_service.c gen-c_glib/t_test_container_service.h: ContainerTest.thrift $(THRIFT)
$(THRIFT) --gen c_glib $<
diff --git a/vendor/github.com/apache/thrift/lib/cpp/Makefile.am b/vendor/github.com/apache/thrift/lib/cpp/Makefile.am
index 4441fba4c..cd1d92346 100755
--- a/vendor/github.com/apache/thrift/lib/cpp/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/cpp/Makefile.am
@@ -265,8 +265,6 @@ include_qt_HEADERS = \
src/thrift/qt/TQIODeviceTransport.h \
src/thrift/qt/TQTcpServer.h
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
WINDOWS_DIST = \
src/thrift/windows \
thrift.sln \
diff --git a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
index 3661275e8..d7d8d54e9 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
+++ b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.cpp
@@ -51,6 +51,7 @@ public:
private:
scoped_ptr thread_;
+ Monitor monitor_;
STATE state_;
weak_ptr self_;
bool detached_;
@@ -71,25 +72,46 @@ public:
}
}
- void start() {
- if (state_ != uninitialized) {
- return;
- }
+ STATE getState() const
+ {
+ Synchronized sync(monitor_);
+ return state_;
+ }
+ void setState(STATE newState)
+ {
+ Synchronized sync(monitor_);
+ state_ = newState;
+
+ // unblock start() with the knowledge that the thread has actually
+ // started running, which avoids a race in detached threads.
+ if (newState == started) {
+ monitor_.notify();
+ }
+ }
+
+ void start() {
// Create reference
shared_ptr* selfRef = new shared_ptr();
*selfRef = self_.lock();
- state_ = starting;
+ setState(starting);
+ Synchronized sync(monitor_);
+
thread_.reset(new boost::thread(bind(threadMain, (void*)selfRef)));
if (detached_)
thread_->detach();
+
+ // Wait for the thread to start and get far enough to grab everything
+ // that it needs from the calling context, thus absolving the caller
+ // from being required to hold on to runnable indefinitely.
+ monitor_.wait();
}
void join() {
- if (!detached_ && state_ != uninitialized) {
+ if (!detached_ && getState() != uninitialized) {
thread_->join();
}
}
@@ -110,19 +132,11 @@ void* BoostThread::threadMain(void* arg) {
shared_ptr thread = *(shared_ptr*)arg;
delete reinterpret_cast*>(arg);
- if (!thread) {
- return (void*)0;
- }
-
- if (thread->state_ != starting) {
- return (void*)0;
- }
-
- thread->state_ = started;
+ thread->setState(started);
thread->runnable()->run();
- if (thread->state_ != stopping && thread->state_ != stopped) {
- thread->state_ = stopping;
+ if (thread->getState() != stopping && thread->getState() != stopped) {
+ thread->setState(stopping);
}
return (void*)0;
}
diff --git a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
index 4c7a45abb..bf11a708b 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
+++ b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/BoostThreadFactory.h
@@ -20,8 +20,8 @@
#ifndef _THRIFT_CONCURRENCY_BOOSTTHREADFACTORY_H_
#define _THRIFT_CONCURRENCY_BOOSTTHREADFACTORY_H_ 1
+#include
#include
-
#include
namespace apache {
diff --git a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp
index d829d6905..2e35446b5 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp
+++ b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/PosixThreadFactory.cpp
@@ -20,7 +20,7 @@
#include
#include
-#include
+#include
#include
#if GOOGLE_PERFTOOLS_REGISTER_THREAD
@@ -53,8 +53,8 @@ public:
private:
pthread_t pthread_;
- Mutex state_mutex_;
- STATE state_;
+ Monitor monitor_; // guard to protect state_ and also notification
+ STATE state_; // to protect proper thread start behavior
int policy_;
int priority_;
int stackSize_;
@@ -96,14 +96,20 @@ public:
STATE getState() const
{
- Guard g(state_mutex_);
+ Synchronized sync(monitor_);
return state_;
}
void setState(STATE newState)
{
- Guard g(state_mutex_);
+ Synchronized sync(monitor_);
state_ = newState;
+
+ // unblock start() with the knowledge that the thread has actually
+ // started running, which avoids a race in detached threads.
+ if (newState == started) {
+ monitor_.notify();
+ }
}
void start() {
@@ -154,9 +160,18 @@ public:
setState(starting);
+ Synchronized sync(monitor_);
+
if (pthread_create(&pthread_, &thread_attr, threadMain, (void*)selfRef) != 0) {
throw SystemResourceException("pthread_create failed");
}
+
+ // The caller may not choose to guarantee the scope of the Runnable
+ // being used in the thread, so we must actually wait until the thread
+ // starts before we return. If we do not wait, it would be possible
+ // for the caller to start destructing the Runnable and the Thread,
+ // and we would end up in a race. This was identified with valgrind.
+ monitor_.wait();
}
void join() {
@@ -174,8 +189,6 @@ public:
if (res != 0) {
GlobalOutput.printf("PthreadThread::join(): fail with code %d", res);
}
- } else {
- GlobalOutput.printf("PthreadThread::join(): detached thread");
}
}
@@ -202,14 +215,6 @@ void* PthreadThread::threadMain(void* arg) {
stdcxx::shared_ptr thread = *(stdcxx::shared_ptr*)arg;
delete reinterpret_cast*>(arg);
- if (thread == NULL) {
- return (void*)0;
- }
-
- if (thread->getState() != starting) {
- return (void*)0;
- }
-
#if GOOGLE_PERFTOOLS_REGISTER_THREAD
ProfilerRegisterThread();
#endif
diff --git a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
index 4067f2418..da0c5e373 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
+++ b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/StdThreadFactory.cpp
@@ -21,8 +21,9 @@
#if USE_STD_THREAD
-#include
#include
+#include
+#include
#include
#include
@@ -49,6 +50,7 @@ public:
private:
std::unique_ptr thread_;
+ Monitor monitor_;
STATE state_;
bool detached_;
@@ -68,18 +70,42 @@ public:
}
}
+ STATE getState() const
+ {
+ Synchronized sync(monitor_);
+ return state_;
+ }
+
+ void setState(STATE newState)
+ {
+ Synchronized sync(monitor_);
+ state_ = newState;
+
+ // unblock start() with the knowledge that the thread has actually
+ // started running, which avoids a race in detached threads.
+ if (newState == started) {
+ monitor_.notify();
+ }
+ }
+
void start() {
- if (state_ != uninitialized) {
+ if (getState() != uninitialized) {
return;
}
stdcxx::shared_ptr selfRef = shared_from_this();
- state_ = starting;
+ setState(starting);
+ Synchronized sync(monitor_);
thread_ = std::unique_ptr(new std::thread(threadMain, selfRef));
if (detached_)
thread_->detach();
+
+ // Wait for the thread to start and get far enough to grab everything
+ // that it needs from the calling context, thus absolving the caller
+ // from being required to hold on to runnable indefinitely.
+ monitor_.wait();
}
void join() {
@@ -96,22 +122,16 @@ public:
};
void StdThread::threadMain(stdcxx::shared_ptr thread) {
- if (thread == NULL) {
- return;
- }
+#if GOOGLE_PERFTOOLS_REGISTER_THREAD
+ ProfilerRegisterThread();
+#endif
- if (thread->state_ != starting) {
- return;
- }
-
- thread->state_ = started;
+ thread->setState(started);
thread->runnable()->run();
- if (thread->state_ != stopping && thread->state_ != stopped) {
- thread->state_ = stopping;
+ if (thread->getState() != stopping && thread->getState() != stopped) {
+ thread->setState(stopping);
}
-
- return;
}
StdThreadFactory::StdThreadFactory(bool detached) : ThreadFactory(detached) {
diff --git a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/TimerManager.cpp b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/TimerManager.cpp
index b03ff42af..9ae1f9419 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/TimerManager.cpp
+++ b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/concurrency/TimerManager.cpp
@@ -52,6 +52,8 @@ public:
}
}
+ bool operator==(const shared_ptr & runnable) const { return runnable_ == runnable; }
+
private:
shared_ptr runnable_;
friend class TimerManager::Dispatcher;
@@ -290,11 +292,23 @@ void TimerManager::add(shared_ptr task, const struct timeval& value) {
}
void TimerManager::remove(shared_ptr task) {
- (void)task;
Synchronized s(monitor_);
if (state_ != TimerManager::STARTED) {
throw IllegalStateException();
}
+ bool found = false;
+ for (task_iterator ix = taskMap_.begin(); ix != taskMap_.end();) {
+ if (*ix->second == task) {
+ found = true;
+ taskCount_--;
+ taskMap_.erase(ix++);
+ } else {
+ ++ix;
+ }
+ }
+ if (!found) {
+ throw NoSuchTaskException();
+ }
}
TimerManager::STATE TimerManager::state() const {
diff --git a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.cpp b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.cpp
index a704b068c..3179b1aec 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.cpp
+++ b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.cpp
@@ -658,14 +658,21 @@ void TServerSocket::notify(THRIFT_SOCKET notifySocket) {
}
void TServerSocket::interrupt() {
- notify(interruptSockWriter_);
+ concurrency::Guard g(rwMutex_);
+ if (interruptSockWriter_ != THRIFT_INVALID_SOCKET) {
+ notify(interruptSockWriter_);
+ }
}
void TServerSocket::interruptChildren() {
- notify(childInterruptSockWriter_);
+ concurrency::Guard g(rwMutex_);
+ if (childInterruptSockWriter_ != THRIFT_INVALID_SOCKET) {
+ notify(childInterruptSockWriter_);
+ }
}
void TServerSocket::close() {
+ concurrency::Guard g(rwMutex_);
if (serverSocket_ != THRIFT_INVALID_SOCKET) {
shutdown(serverSocket_, THRIFT_SHUT_RDWR);
::THRIFT_CLOSESOCKET(serverSocket_);
diff --git a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.h b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.h
index cb11dc49a..1daaa8299 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.h
+++ b/vendor/github.com/apache/thrift/lib/cpp/src/thrift/transport/TServerSocket.h
@@ -20,6 +20,7 @@
#ifndef _THRIFT_TRANSPORT_TSERVERSOCKET_H_
#define _THRIFT_TRANSPORT_TSERVERSOCKET_H_ 1
+#include
#include
#include
#include
@@ -169,6 +170,7 @@ private:
bool keepAlive_;
bool listening_;
+ concurrency::Mutex rwMutex_; // thread-safe interrupt
THRIFT_SOCKET interruptSockWriter_; // is notified on interrupt()
THRIFT_SOCKET interruptSockReader_; // is used in select/poll with serverSocket_ for interruptability
THRIFT_SOCKET childInterruptSockWriter_; // is notified on interruptChildren()
diff --git a/vendor/github.com/apache/thrift/lib/cpp/test/Makefile.am b/vendor/github.com/apache/thrift/lib/cpp/test/Makefile.am
index 95d9889ee..c298e26f8 100755
--- a/vendor/github.com/apache/thrift/lib/cpp/test/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/cpp/test/Makefile.am
@@ -360,7 +360,6 @@ OpenSSLManualInitTest_LDADD = \
#
# Common thrift code generation rules
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
gen-cpp/AnnotationTest_constants.cpp gen-cpp/AnnotationTest_constants.h gen-cpp/AnnotationTest_types.cpp gen-cpp/AnnotationTest_types.h: $(top_srcdir)/test/AnnotationTest.thrift
$(THRIFT) --gen cpp $<
diff --git a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/Tests.cpp b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/Tests.cpp
index 33af39281..d09d438d6 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/Tests.cpp
+++ b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/Tests.cpp
@@ -25,6 +25,10 @@
#include "TimerManagerTests.h"
#include "ThreadManagerTests.h"
+// The test weight, where 10 is 10 times more threads than baseline
+// and the baseline is optimized for running in valgrind
+static size_t WEIGHT = 10;
+
int main(int argc, char** argv) {
std::string arg;
@@ -37,6 +41,11 @@ int main(int argc, char** argv) {
args[ix - 1] = std::string(argv[ix]);
}
+ if (getenv("VALGRIND") != 0) {
+ // lower the scale of every test
+ WEIGHT = 1;
+ }
+
bool runAll = args[0].compare("all") == 0;
if (runAll || args[0].compare("thread-factory") == 0) {
@@ -45,10 +54,10 @@ int main(int argc, char** argv) {
std::cout << "ThreadFactory tests..." << std::endl;
- int reapLoops = 20;
- int reapCount = 1000;
+ int reapLoops = 2 * WEIGHT;
+ int reapCount = 100 * WEIGHT;
size_t floodLoops = 3;
- size_t floodCount = 20000;
+ size_t floodCount = 500 * WEIGHT;
std::cout << "\t\tThreadFactory reap N threads test: N = " << reapLoops << "x" << reapCount << std::endl;
@@ -114,6 +123,20 @@ int main(int argc, char** argv) {
std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
return 1;
}
+
+ std::cout << "\t\tTimerManager test01" << std::endl;
+
+ if (!timerManagerTests.test01()) {
+ std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
+ return 1;
+ }
+
+ std::cout << "\t\tTimerManager test02" << std::endl;
+
+ if (!timerManagerTests.test02()) {
+ std::cerr << "\t\tTimerManager tests FAILED" << std::endl;
+ return 1;
+ }
}
if (runAll || args[0].compare("thread-manager") == 0) {
@@ -121,8 +144,8 @@ int main(int argc, char** argv) {
std::cout << "ThreadManager tests..." << std::endl;
{
- size_t workerCount = 100;
- size_t taskCount = 50000;
+ size_t workerCount = 10 * WEIGHT;
+ size_t taskCount = 500 * WEIGHT;
int64_t delay = 10LL;
ThreadManagerTests threadManagerTests;
@@ -160,13 +183,13 @@ int main(int argc, char** argv) {
size_t minWorkerCount = 2;
- size_t maxWorkerCount = 64;
+ size_t maxWorkerCount = 8;
- size_t tasksPerWorker = 1000;
+ size_t tasksPerWorker = 100 * WEIGHT;
int64_t delay = 5LL;
- for (size_t workerCount = minWorkerCount; workerCount < maxWorkerCount; workerCount *= 4) {
+ for (size_t workerCount = minWorkerCount; workerCount <= maxWorkerCount; workerCount *= 4) {
size_t taskCount = workerCount * tasksPerWorker;
diff --git a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadFactoryTests.h b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadFactoryTests.h
index bd6ed323d..6ac9aa51c 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadFactoryTests.h
+++ b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadFactoryTests.h
@@ -21,11 +21,12 @@
#include
#include
#include
+#include
#include
#include
#include
-#include
+#include
namespace apache {
namespace thrift {
@@ -78,13 +79,13 @@ public:
int* activeCount = new int(count);
- std::set > threads;
+ std::vector > threads;
int tix;
for (tix = 0; tix < count; tix++) {
try {
- threads.insert(
+ threads.push_back(
threadFactory.newThread(shared_ptr(new ReapNTask(*monitor, *activeCount))));
} catch (SystemResourceException& e) {
std::cout << "\t\t\tfailed to create " << lix* count + tix << " thread " << e.what()
@@ -94,7 +95,7 @@ public:
}
tix = 0;
- for (std::set >::const_iterator thread = threads.begin();
+ for (std::vector >::const_iterator thread = threads.begin();
thread != threads.end();
tix++, ++thread) {
@@ -113,6 +114,7 @@ public:
monitor->wait(1000);
}
}
+
delete activeCount;
std::cout << "\t\t\treaped " << lix* count << " threads" << std::endl;
}
@@ -253,19 +255,22 @@ public:
class FloodTask : public Runnable {
public:
- FloodTask(const size_t id) : _id(id) {}
+ FloodTask(const size_t id, Monitor& mon) : _id(id), _mon(mon) {}
~FloodTask() {
if (_id % 10000 == 0) {
+ Synchronized sync(_mon);
std::cout << "\t\tthread " << _id << " done" << std::endl;
}
}
void run() {
if (_id % 10000 == 0) {
+ Synchronized sync(_mon);
std::cout << "\t\tthread " << _id << " started" << std::endl;
}
}
const size_t _id;
+ Monitor& _mon;
};
void foo(PlatformThreadFactory* tf) { (void)tf; }
@@ -273,7 +278,8 @@ public:
bool floodNTest(size_t loop = 1, size_t count = 100000) {
bool success = false;
-
+ Monitor mon;
+
for (size_t lix = 0; lix < loop; lix++) {
PlatformThreadFactory threadFactory = PlatformThreadFactory();
@@ -283,10 +289,8 @@ public:
try {
- shared_ptr task(new FloodTask(lix * count + tix));
-
+ shared_ptr task(new FloodTask(lix * count + tix, mon));
shared_ptr thread = threadFactory.newThread(task);
-
thread->start();
} catch (TException& e) {
@@ -298,8 +302,8 @@ public:
}
}
+ Synchronized sync(mon);
std::cout << "\t\t\tflooded " << (lix + 1) * count << " threads" << std::endl;
-
success = true;
}
diff --git a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadManagerTests.h b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadManagerTests.h
index c07a21b55..9ecd6bad5 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadManagerTests.h
+++ b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/ThreadManagerTests.h
@@ -109,7 +109,7 @@ public:
shared_ptr threadManager = ThreadManager::newSimpleThreadManager(workerCount);
shared_ptr threadFactory
- = shared_ptr(new PlatformThreadFactory());
+ = shared_ptr(new PlatformThreadFactory(false));
#if !USE_BOOST_THREAD && !USE_STD_THREAD
threadFactory->setPriority(PosixThreadFactory::HIGHEST);
diff --git a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/TimerManagerTests.h b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/TimerManagerTests.h
index 32d39355f..80d373bef 100644
--- a/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/TimerManagerTests.h
+++ b/vendor/github.com/apache/thrift/lib/cpp/test/concurrency/TimerManagerTests.h
@@ -126,6 +126,72 @@ public:
return true;
}
+ /**
+ * This test creates two tasks, removes the first one then waits for the second one. It then
+ * verifies that the timer manager properly clean up itself and the remaining orphaned timeout
+ * task when the manager goes out of scope and its destructor is called.
+ */
+ bool test01(int64_t timeout = 1000LL) {
+ TimerManager timerManager;
+ timerManager.threadFactory(shared_ptr(new PlatformThreadFactory()));
+ timerManager.start();
+ assert(timerManager.state() == TimerManager::STARTED);
+
+ Synchronized s(_monitor);
+
+ // Setup the two tasks
+ shared_ptr taskToRemove
+ = shared_ptr(new TimerManagerTests::Task(_monitor, timeout / 2));
+ timerManager.add(taskToRemove, taskToRemove->_timeout);
+
+ shared_ptr task
+ = shared_ptr(new TimerManagerTests::Task(_monitor, timeout));
+ timerManager.add(task, task->_timeout);
+
+ // Remove one task and wait until the other has completed
+ timerManager.remove(taskToRemove);
+ _monitor.wait(timeout * 2);
+
+ assert(!taskToRemove->_done);
+ assert(task->_done);
+
+ return true;
+ }
+
+ /**
+ * This test creates two tasks with the same callback and another one, then removes the two
+ * duplicated then waits for the last one. It then verifies that the timer manager properly
+ * clean up itself and the remaining orphaned timeout task when the manager goes out of scope
+ * and its destructor is called.
+ */
+ bool test02(int64_t timeout = 1000LL) {
+ TimerManager timerManager;
+ timerManager.threadFactory(shared_ptr(new PlatformThreadFactory()));
+ timerManager.start();
+ assert(timerManager.state() == TimerManager::STARTED);
+
+ Synchronized s(_monitor);
+
+ // Setup the one tasks and add it twice
+ shared_ptr taskToRemove
+ = shared_ptr(new TimerManagerTests::Task(_monitor, timeout / 3));
+ timerManager.add(taskToRemove, taskToRemove->_timeout);
+ timerManager.add(taskToRemove, taskToRemove->_timeout * 2);
+
+ shared_ptr task
+ = shared_ptr(new TimerManagerTests::Task(_monitor, timeout));
+ timerManager.add(task, task->_timeout);
+
+ // Remove the first task (e.g. two timers) and wait until the other has completed
+ timerManager.remove(taskToRemove);
+ _monitor.wait(timeout * 2);
+
+ assert(!taskToRemove->_done);
+ assert(task->_done);
+
+ return true;
+ }
+
friend class TestTask;
Monitor _monitor;
diff --git a/vendor/github.com/apache/thrift/lib/d/test/Makefile.am b/vendor/github.com/apache/thrift/lib/d/test/Makefile.am
index c5104719f..3b6a6f14a 100755
--- a/vendor/github.com/apache/thrift/lib/d/test/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/d/test/Makefile.am
@@ -24,8 +24,6 @@ BUILT_SOURCES = trusted-ca-certificate.pem server-certificate.pem
# Thrift compiler rules
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
debug_proto_gen = $(addprefix gen-d/, DebugProtoTest_types.d)
$(debug_proto_gen): $(top_srcdir)/test/DebugProtoTest.thrift
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Processor.Multiplex.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Processor.Multiplex.pas
index 756daa191..4cd80ba8e 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Processor.Multiplex.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Processor.Multiplex.pas
@@ -68,16 +68,16 @@ type
// the standard format, without the service name prepended to TMessage.name.
TStoredMessageProtocol = class( TProtocolDecorator)
private
- FMessageBegin : IMessage;
+ FMessageBegin : TThriftMessage;
public
- constructor Create( const protocol : IProtocol; const aMsgBegin : IMessage);
- function ReadMessageBegin: IMessage; override;
+ constructor Create( const protocol : IProtocol; const aMsgBegin : TThriftMessage);
+ function ReadMessageBegin: TThriftMessage; override;
end;
private
FServiceProcessorMap : TDictionary;
- procedure Error( const oprot : IProtocol; const msg : IMessage;
+ procedure Error( const oprot : IProtocol; const msg : TThriftMessage;
extype : TApplicationExceptionSpecializedClass; const etxt : string);
public
@@ -105,14 +105,14 @@ type
implementation
-constructor TMultiplexedProcessorImpl.TStoredMessageProtocol.Create( const protocol : IProtocol; const aMsgBegin : IMessage);
+constructor TMultiplexedProcessorImpl.TStoredMessageProtocol.Create( const protocol : IProtocol; const aMsgBegin : TThriftMessage);
begin
inherited Create( protocol);
FMessageBegin := aMsgBegin;
end;
-function TMultiplexedProcessorImpl.TStoredMessageProtocol.ReadMessageBegin: IMessage;
+function TMultiplexedProcessorImpl.TStoredMessageProtocol.ReadMessageBegin: TThriftMessage;
begin
result := FMessageBegin;
end;
@@ -141,15 +141,15 @@ begin
end;
-procedure TMultiplexedProcessorImpl.Error( const oprot : IProtocol; const msg : IMessage;
+procedure TMultiplexedProcessorImpl.Error( const oprot : IProtocol; const msg : TThriftMessage;
extype : TApplicationExceptionSpecializedClass;
const etxt : string);
var appex : TApplicationException;
- newMsg : IMessage;
+ newMsg : TThriftMessage;
begin
appex := extype.Create(etxt);
try
- newMsg := TMessageImpl.Create( msg.Name, TMessageType.Exception, msg.SeqID);
+ Init( newMsg, msg.Name, TMessageType.Exception, msg.SeqID);
oprot.WriteMessageBegin(newMsg);
appex.Write(oprot);
@@ -163,7 +163,7 @@ end;
function TMultiplexedProcessorImpl.Process(const iprot, oprot : IProtocol; const events : IProcessorEvents = nil): Boolean;
-var msg, newMsg : IMessage;
+var msg, newMsg : TThriftMessage;
idx : Integer;
sService : string;
processor : IProcessor;
@@ -204,7 +204,7 @@ begin
// Create a new TMessage, removing the service name
Inc( idx, Length(TMultiplexedProtocol.SEPARATOR));
- newMsg := TMessageImpl.Create( Copy( msg.Name, idx, MAXINT), msg.Type_, msg.SeqID);
+ Init( newMsg, Copy( msg.Name, idx, MAXINT), msg.Type_, msg.SeqID);
// Dispatch processing to the stored processor
protocol := TStoredMessageProtocol.Create( iprot, newMsg);
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Compact.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Compact.pas
index e9944d664..5b1253aa2 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Compact.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Compact.pas
@@ -123,7 +123,7 @@ type
// If we encounter a boolean field begin, save the TField here so it can
// have the value incorporated.
- private booleanField_ : IField;
+ private booleanField_ : TThriftField;
// If we Read a field header, and it's a boolean field, save the boolean
// value here so that ReadBool can use it.
@@ -148,21 +148,21 @@ type
private
// The workhorse of WriteFieldBegin. It has the option of doing a 'type override'
// of the type header. This is used specifically in the boolean field case.
- procedure WriteFieldBeginInternal( const field : IField; typeOverride : Byte);
+ procedure WriteFieldBeginInternal( const field : TThriftField; typeOverride : Byte);
public
- procedure WriteMessageBegin( const msg: IMessage); override;
+ procedure WriteMessageBegin( const msg: TThriftMessage); override;
procedure WriteMessageEnd; override;
- procedure WriteStructBegin( const struc: IStruct); override;
+ procedure WriteStructBegin( const struc: TThriftStruct); override;
procedure WriteStructEnd; override;
- procedure WriteFieldBegin( const field: IField); override;
+ procedure WriteFieldBegin( const field: TThriftField); override;
procedure WriteFieldEnd; override;
procedure WriteFieldStop; override;
- procedure WriteMapBegin( const map: IMap); override;
+ procedure WriteMapBegin( const map: TThriftMap); override;
procedure WriteMapEnd; override;
- procedure WriteListBegin( const list: IList); override;
+ procedure WriteListBegin( const list: TThriftList); override;
procedure WriteListEnd(); override;
- procedure WriteSetBegin( const set_: ISet ); override;
+ procedure WriteSetBegin( const set_: TThriftSet ); override;
procedure WriteSetEnd(); override;
procedure WriteBool( b: Boolean); override;
procedure WriteByte( b: ShortInt); override;
@@ -194,17 +194,17 @@ type
class procedure fixedLongToBytes( const n : Int64; var buf : TBytes);
public
- function ReadMessageBegin: IMessage; override;
+ function ReadMessageBegin: TThriftMessage; override;
procedure ReadMessageEnd(); override;
- function ReadStructBegin: IStruct; override;
+ function ReadStructBegin: TThriftStruct; override;
procedure ReadStructEnd; override;
- function ReadFieldBegin: IField; override;
+ function ReadFieldBegin: TThriftField; override;
procedure ReadFieldEnd(); override;
- function ReadMapBegin: IMap; override;
+ function ReadMapBegin: TThriftMap; override;
procedure ReadMapEnd(); override;
- function ReadListBegin: IList; override;
+ function ReadListBegin: TThriftList; override;
procedure ReadListEnd(); override;
- function ReadSetBegin: ISet; override;
+ function ReadSetBegin: TThriftSet; override;
procedure ReadSetEnd(); override;
function ReadBool: Boolean; override;
function ReadByte: ShortInt; override;
@@ -273,7 +273,7 @@ begin
lastFieldId_ := 0;
lastField_ := TStack.Create;
- booleanField_ := nil;
+ Init( booleanField_, '', TType.Stop, 0);
boolValue_ := unused;
end;
@@ -293,7 +293,7 @@ procedure TCompactProtocolImpl.Reset;
begin
lastField_.Clear();
lastFieldId_ := 0;
- booleanField_ := nil;
+ Init( booleanField_, '', TType.Stop, 0);
boolValue_ := unused;
end;
@@ -301,11 +301,8 @@ end;
// Writes a byte without any possibility of all that field header nonsense.
// Used internally by other writing methods that know they need to Write a byte.
procedure TCompactProtocolImpl.WriteByteDirect( const b : Byte);
-var data : TBytes;
begin
- SetLength( data, 1);
- data[0] := b;
- Transport.Write( data);
+ Transport.Write( @b, SizeOf(b));
end;
@@ -344,7 +341,7 @@ end;
// Write a message header to the wire. Compact Protocol messages contain the
// protocol version so we can migrate forwards in the future if need be.
-procedure TCompactProtocolImpl.WriteMessageBegin( const msg: IMessage);
+procedure TCompactProtocolImpl.WriteMessageBegin( const msg: TThriftMessage);
var versionAndType : Byte;
begin
Reset;
@@ -362,7 +359,7 @@ end;
// Write a struct begin. This doesn't actually put anything on the wire. We use it as an
// opportunity to put special placeholder markers on the field stack so we can get the
// field id deltas correct.
-procedure TCompactProtocolImpl.WriteStructBegin( const struc: IStruct);
+procedure TCompactProtocolImpl.WriteStructBegin( const struc: TThriftStruct);
begin
lastField_.Push(lastFieldId_);
lastFieldId_ := 0;
@@ -380,7 +377,7 @@ end;
// Write a field header containing the field id and field type. If the difference between the
// current field id and the last one is small (< 15), then the field id will be encoded in
// the 4 MSB as a delta. Otherwise, the field id will follow the type header as a zigzag varint.
-procedure TCompactProtocolImpl.WriteFieldBegin( const field: IField);
+procedure TCompactProtocolImpl.WriteFieldBegin( const field: TThriftField);
begin
case field.Type_ of
TType.Bool_ : booleanField_ := field; // we want to possibly include the value, so we'll wait.
@@ -392,7 +389,7 @@ end;
// The workhorse of WriteFieldBegin. It has the option of doing a 'type override'
// of the type header. This is used specifically in the boolean field case.
-procedure TCompactProtocolImpl.WriteFieldBeginInternal( const field : IField; typeOverride : Byte);
+procedure TCompactProtocolImpl.WriteFieldBeginInternal( const field : TThriftField; typeOverride : Byte);
var typeToWrite : Byte;
begin
// if there's a type override, use that.
@@ -425,7 +422,7 @@ end;
// Write a map header. If the map is empty, omit the key and value type
// headers, as we don't need any additional information to skip it.
-procedure TCompactProtocolImpl.WriteMapBegin( const map: IMap);
+procedure TCompactProtocolImpl.WriteMapBegin( const map: TThriftMap);
var key, val : Byte;
begin
if (map.Count = 0)
@@ -440,14 +437,14 @@ end;
// Write a list header.
-procedure TCompactProtocolImpl.WriteListBegin( const list: IList);
+procedure TCompactProtocolImpl.WriteListBegin( const list: TThriftList);
begin
WriteCollectionBegin( list.ElementType, list.Count);
end;
// Write a set header.
-procedure TCompactProtocolImpl.WriteSetBegin( const set_: ISet );
+procedure TCompactProtocolImpl.WriteSetBegin( const set_: TThriftSet );
begin
WriteCollectionBegin( set_.ElementType, set_.Count);
end;
@@ -464,10 +461,10 @@ begin
then bt := Types.BOOLEAN_TRUE
else bt := Types.BOOLEAN_FALSE;
- if booleanField_ <> nil then begin
+ if booleanField_.Type_ = TType.Bool_ then begin
// we haven't written the field header yet
WriteFieldBeginInternal( booleanField_, Byte(bt));
- booleanField_ := nil;
+ booleanField_.Type_ := TType.Stop;
end
else begin
// we're not part of a field, so just Write the value.
@@ -642,7 +639,7 @@ end;
// Read a message header.
-function TCompactProtocolImpl.ReadMessageBegin : IMessage;
+function TCompactProtocolImpl.ReadMessageBegin : TThriftMessage;
var protocolId, versionAndType, version, type_ : Byte;
seqid : Integer;
msgNm : String;
@@ -663,17 +660,17 @@ begin
type_ := Byte( (versionAndType shr TYPE_SHIFT_AMOUNT) and TYPE_BITS);
seqid := Integer( ReadVarint32);
msgNm := ReadString;
- result := TMessageImpl.Create( msgNm, TMessageType(type_), seqid);
+ Init( result, msgNm, TMessageType(type_), seqid);
end;
// Read a struct begin. There's nothing on the wire for this, but it is our
// opportunity to push a new struct begin marker onto the field stack.
-function TCompactProtocolImpl.ReadStructBegin: IStruct;
+function TCompactProtocolImpl.ReadStructBegin: TThriftStruct;
begin
lastField_.Push( lastFieldId_);
lastFieldId_ := 0;
- result := TStructImpl.Create('');
+ Init( result);
end;
@@ -687,7 +684,7 @@ end;
// Read a field header off the wire.
-function TCompactProtocolImpl.ReadFieldBegin: IField;
+function TCompactProtocolImpl.ReadFieldBegin: TThriftField;
var type_ : Byte;
fieldId, modifier : ShortInt;
begin
@@ -695,7 +692,7 @@ begin
// if it's a stop, then we can return immediately, as the struct is over.
if type_ = Byte(Types.STOP) then begin
- result := TFieldImpl.Create( '', TType.Stop, 0);
+ Init( result, '', TType.Stop, 0);
Exit;
end;
@@ -705,7 +702,7 @@ begin
then fieldId := ReadI16 // not a delta. look ahead for the zigzag varint field id.
else fieldId := ShortInt( lastFieldId_ + modifier); // add the delta to the last Read field id.
- result := TFieldImpl.Create( '', getTType(Byte(type_ and $0F)), fieldId);
+ Init( result, '', getTType(Byte(type_ and $0F)), fieldId);
// if this happens to be a boolean field, the value is encoded in the type
// save the boolean value in a special instance variable.
@@ -723,7 +720,7 @@ end;
// Read a map header off the wire. If the size is zero, skip Reading the key
// and value type. This means that 0-length maps will yield TMaps without the
// "correct" types.
-function TCompactProtocolImpl.ReadMapBegin: IMap;
+function TCompactProtocolImpl.ReadMapBegin: TThriftMap;
var size : Integer;
keyAndValueType : Byte;
key, val : TType;
@@ -735,7 +732,7 @@ begin
key := getTType( Byte( keyAndValueType shr 4));
val := getTType( Byte( keyAndValueType and $F));
- result := TMapImpl.Create( key, val, size);
+ Init( result, key, val, size);
ASSERT( (result.KeyType = key) and (result.ValueType = val));
end;
@@ -744,7 +741,7 @@ end;
// be packed into the element type header. If it's a longer list, the 4 MSB
// of the element type header will be $F, and a varint will follow with the
// true size.
-function TCompactProtocolImpl.ReadListBegin: IList;
+function TCompactProtocolImpl.ReadListBegin: TThriftList;
var size_and_type : Byte;
size : Integer;
type_ : TType;
@@ -756,7 +753,7 @@ begin
then size := Integer( ReadVarint32);
type_ := getTType( size_and_type);
- result := TListImpl.Create( type_, size);
+ Init( result, type_, size);
end;
@@ -764,7 +761,7 @@ end;
// be packed into the element type header. If it's a longer set, the 4 MSB
// of the element type header will be $F, and a varint will follow with the
// true size.
-function TCompactProtocolImpl.ReadSetBegin: ISet;
+function TCompactProtocolImpl.ReadSetBegin: TThriftSet;
var size_and_type : Byte;
size : Integer;
type_ : TType;
@@ -776,7 +773,7 @@ begin
then size := Integer( ReadVarint32);
type_ := getTType( size_and_type);
- result := TSetImpl.Create( type_, size);
+ Init( result, type_, size);
end;
@@ -797,11 +794,8 @@ end;
// Read a single byte off the wire. Nothing interesting here.
function TCompactProtocolImpl.ReadByte: ShortInt;
-var data : TBytes;
begin
- SetLength( data, 1);
- Transport.ReadAll( data, 0, 1);
- result := ShortInt(data[0]);
+ Transport.ReadAll( @result, SizeOf(result), 0, 1);
end;
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.JSON.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.JSON.pas
index 71ee7ae35..30600aa80 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.JSON.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.JSON.pas
@@ -103,7 +103,7 @@ type
private
FHasData : Boolean;
- FData : TBytes;
+ FData : Byte;
public
// Return and consume the next byte to be Read, either taking it from the
@@ -169,18 +169,18 @@ type
public
// IProtocol
- procedure WriteMessageBegin( const aMsg : IMessage); override;
+ procedure WriteMessageBegin( const aMsg : TThriftMessage); override;
procedure WriteMessageEnd; override;
- procedure WriteStructBegin( const struc: IStruct); override;
+ procedure WriteStructBegin( const struc: TThriftStruct); override;
procedure WriteStructEnd; override;
- procedure WriteFieldBegin( const field: IField); override;
+ procedure WriteFieldBegin( const field: TThriftField); override;
procedure WriteFieldEnd; override;
procedure WriteFieldStop; override;
- procedure WriteMapBegin( const map: IMap); override;
+ procedure WriteMapBegin( const map: TThriftMap); override;
procedure WriteMapEnd; override;
- procedure WriteListBegin( const list: IList); override;
+ procedure WriteListBegin( const list: TThriftList); override;
procedure WriteListEnd(); override;
- procedure WriteSetBegin( const set_: ISet ); override;
+ procedure WriteSetBegin( const set_: TThriftSet ); override;
procedure WriteSetEnd(); override;
procedure WriteBool( b: Boolean); override;
procedure WriteByte( b: ShortInt); override;
@@ -191,17 +191,17 @@ type
procedure WriteString( const s: string ); override;
procedure WriteBinary( const b: TBytes); override;
//
- function ReadMessageBegin: IMessage; override;
+ function ReadMessageBegin: TThriftMessage; override;
procedure ReadMessageEnd(); override;
- function ReadStructBegin: IStruct; override;
+ function ReadStructBegin: TThriftStruct; override;
procedure ReadStructEnd; override;
- function ReadFieldBegin: IField; override;
+ function ReadFieldBegin: TThriftField; override;
procedure ReadFieldEnd(); override;
- function ReadMapBegin: IMap; override;
+ function ReadMapBegin: TThriftMap; override;
procedure ReadMapEnd(); override;
- function ReadListBegin: IList; override;
+ function ReadListBegin: TThriftList; override;
procedure ReadListEnd(); override;
- function ReadSetBegin: ISet; override;
+ function ReadSetBegin: TThriftSet; override;
procedure ReadSetEnd(); override;
function ReadBool: Boolean; override;
function ReadByte: ShortInt; override;
@@ -437,21 +437,19 @@ begin
if FHasData
then FHasData := FALSE
else begin
- SetLength( FData, 1);
- IJSONProtocol(FProto).Transport.ReadAll( FData, 0, 1);
+ IJSONProtocol(FProto).Transport.ReadAll( @FData, SizeOf(FData), 0, 1);
end;
- result := FData[0];
+ result := FData;
end;
function TJSONProtocolImpl.TLookaheadReader.Peek : Byte;
begin
if not FHasData then begin
- SetLength( FData, 1);
- IJSONProtocol(FProto).Transport.ReadAll( FData, 0, 1);
+ IJSONProtocol(FProto).Transport.ReadAll( @FData, SizeOf(FData), 0, 1);
FHasData := TRUE;
end;
- result := FData[0];
+ result := FData;
end;
@@ -681,7 +679,7 @@ begin
end;
-procedure TJSONProtocolImpl.WriteMessageBegin( const aMsg : IMessage);
+procedure TJSONProtocolImpl.WriteMessageBegin( const aMsg : TThriftMessage);
begin
ResetContextStack; // THRIFT-1473
@@ -700,7 +698,7 @@ begin
end;
-procedure TJSONProtocolImpl.WriteStructBegin( const struc: IStruct);
+procedure TJSONProtocolImpl.WriteStructBegin( const struc: TThriftStruct);
begin
WriteJSONObjectStart;
end;
@@ -712,7 +710,7 @@ begin
end;
-procedure TJSONProtocolImpl.WriteFieldBegin( const field : IField);
+procedure TJSONProtocolImpl.WriteFieldBegin( const field : TThriftField);
begin
WriteJSONInteger(field.ID);
WriteJSONObjectStart;
@@ -731,7 +729,7 @@ begin
// nothing to do
end;
-procedure TJSONProtocolImpl.WriteMapBegin( const map: IMap);
+procedure TJSONProtocolImpl.WriteMapBegin( const map: TThriftMap);
begin
WriteJSONArrayStart;
WriteJSONString( GetTypeNameForTypeID( map.KeyType));
@@ -748,7 +746,7 @@ begin
end;
-procedure TJSONProtocolImpl.WriteListBegin( const list: IList);
+procedure TJSONProtocolImpl.WriteListBegin( const list: TThriftList);
begin
WriteJSONArrayStart;
WriteJSONString( GetTypeNameForTypeID( list.ElementType));
@@ -762,7 +760,7 @@ begin
end;
-procedure TJSONProtocolImpl.WriteSetBegin( const set_: ISet);
+procedure TJSONProtocolImpl.WriteSetBegin( const set_: TThriftSet);
begin
WriteJSONArrayStart;
WriteJSONString( GetTypeNameForTypeID( set_.ElementType));
@@ -1051,11 +1049,11 @@ begin
end;
-function TJSONProtocolImpl.ReadMessageBegin: IMessage;
+function TJSONProtocolImpl.ReadMessageBegin: TThriftMessage;
begin
ResetContextStack; // THRIFT-1473
- result := TMessageImpl.Create;
+ Init( result);
ReadJSONArrayStart;
if ReadJSONInteger <> VERSION
@@ -1073,10 +1071,10 @@ begin
end;
-function TJSONProtocolImpl.ReadStructBegin : IStruct ;
+function TJSONProtocolImpl.ReadStructBegin : TThriftStruct ;
begin
ReadJSONObjectStart;
- result := TStructImpl.Create('');
+ Init( result);
end;
@@ -1086,11 +1084,11 @@ begin
end;
-function TJSONProtocolImpl.ReadFieldBegin : IField;
+function TJSONProtocolImpl.ReadFieldBegin : TThriftField;
var ch : Byte;
str : string;
begin
- result := TFieldImpl.Create;
+ Init( result);
ch := FReader.Peek;
if ch = RBRACE[0]
then result.Type_ := TType.Stop
@@ -1110,10 +1108,10 @@ begin
end;
-function TJSONProtocolImpl.ReadMapBegin : IMap;
+function TJSONProtocolImpl.ReadMapBegin : TThriftMap;
var str : string;
begin
- result := TMapImpl.Create;
+ Init( result);
ReadJSONArrayStart;
str := SysUtils.TEncoding.UTF8.GetString( ReadJSONString(FALSE));
@@ -1134,10 +1132,10 @@ begin
end;
-function TJSONProtocolImpl.ReadListBegin : IList;
+function TJSONProtocolImpl.ReadListBegin : TThriftList;
var str : string;
begin
- result := TListImpl.Create;
+ Init( result);
ReadJSONArrayStart;
str := SysUtils.TEncoding.UTF8.GetString( ReadJSONString(FALSE));
@@ -1152,10 +1150,10 @@ begin
end;
-function TJSONProtocolImpl.ReadSetBegin : ISet;
+function TJSONProtocolImpl.ReadSetBegin : TThriftSet;
var str : string;
begin
- result := TSetImpl.Create;
+ Init( result);
ReadJSONArrayStart;
str := SysUtils.TEncoding.UTF8.GetString( ReadJSONString(FALSE));
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Multiplex.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Multiplex.pas
index 18b39b51c..93a38380d 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Multiplex.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.Multiplex.pas
@@ -71,7 +71,7 @@ type
{ Prepends the service name to the function name, separated by SEPARATOR.
Args: The original message.
}
- procedure WriteMessageBegin( const msg: IMessage); override;
+ procedure WriteMessageBegin( const msg: TThriftMessage); override;
end;
@@ -86,14 +86,14 @@ begin
end;
-procedure TMultiplexedProtocol.WriteMessageBegin( const msg: IMessage);
+procedure TMultiplexedProtocol.WriteMessageBegin( const msg: TThriftMessage);
// Prepends the service name to the function name, separated by TMultiplexedProtocol.SEPARATOR.
-var newMsg : IMessage;
+var newMsg : TThriftMessage;
begin
case msg.Type_ of
TMessageType.Call,
TMessageType.Oneway : begin
- newMsg := TMessageImpl.Create( FServiceName + SEPARATOR + msg.Name, msg.Type_, msg.SeqID);
+ Init( newMsg, FServiceName + SEPARATOR + msg.Name, msg.Type_, msg.SeqID);
inherited WriteMessageBegin( newMsg);
end;
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.pas
index 9ea28deb3..24f679145 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Protocol.pas
@@ -70,7 +70,40 @@ const
type
IProtocol = interface;
- IStruct = interface;
+
+ TThriftMessage = record
+ Name: string;
+ Type_: TMessageType;
+ SeqID: Integer;
+ end;
+
+ TThriftStruct = record
+ Name: string;
+ end;
+
+ TThriftField = record
+ Name: string;
+ Type_: TType;
+ Id: SmallInt;
+ end;
+
+ TThriftList = record
+ ElementType: TType;
+ Count: Integer;
+ end;
+
+ TThriftMap = record
+ KeyType: TType;
+ ValueType: TType;
+ Count: Integer;
+ end;
+
+ TThriftSet = record
+ ElementType: TType;
+ Count: Integer;
+ end;
+
+
IProtocolFactory = interface
['{7CD64A10-4E9F-4E99-93BF-708A31F4A67B}']
@@ -117,146 +150,6 @@ type
TProtocolExceptionNotImplemented = class (TProtocolExceptionSpecialized);
TProtocolExceptionDepthLimit = class (TProtocolExceptionSpecialized);
- IMap = interface
- ['{30531D97-7E06-4233-B800-C3F53CCD23E7}']
- function GetKeyType: TType;
- procedure SetKeyType( Value: TType);
- function GetValueType: TType;
- procedure SetValueType( Value: TType);
- function GetCount: Integer;
- procedure SetCount( Value: Integer);
- property KeyType: TType read GetKeyType write SetKeyType;
- property ValueType: TType read GetValueType write SetValueType;
- property Count: Integer read GetCount write SetCount;
- end;
-
- TMapImpl = class( TInterfacedObject, IMap)
- private
- FValueType: TType;
- FKeyType: TType;
- FCount: Integer;
- protected
- function GetKeyType: TType;
- procedure SetKeyType( Value: TType);
- function GetValueType: TType;
- procedure SetValueType( Value: TType);
- function GetCount: Integer;
- procedure SetCount( Value: Integer);
- public
- constructor Create( AKeyType, AValueType: TType; ACount: Integer); overload;
- constructor Create; overload;
- end;
-
- IList = interface
- ['{6763E1EA-A934-4472-904F-0083980B9B87}']
- function GetElementType: TType;
- procedure SetElementType( Value: TType);
- function GetCount: Integer;
- procedure SetCount( Value: Integer);
- property ElementType: TType read GetElementType write SetElementType;
- property Count: Integer read GetCount write SetCount;
- end;
-
- TListImpl = class( TInterfacedObject, IList)
- private
- FElementType: TType;
- FCount : Integer;
- protected
- function GetElementType: TType;
- procedure SetElementType( Value: TType);
- function GetCount: Integer;
- procedure SetCount( Value: Integer);
- public
- constructor Create( AElementType: TType; ACount: Integer); overload;
- constructor Create; overload;
- end;
-
- ISet = interface
- ['{A8671700-7514-4C1E-8A05-62786872005F}']
- function GetElementType: TType;
- procedure SetElementType( Value: TType);
- function GetCount: Integer;
- procedure SetCount( Value: Integer);
- property ElementType: TType read GetElementType write SetElementType;
- property Count: Integer read GetCount write SetCount;
- end;
-
- TSetImpl = class( TInterfacedObject, ISet)
- private
- FCount: Integer;
- FElementType: TType;
- protected
- function GetElementType: TType;
- procedure SetElementType( Value: TType);
- function GetCount: Integer;
- procedure SetCount( Value: Integer);
- public
- constructor Create( AElementType: TType; ACount: Integer); overload;
- constructor Create; overload;
- end;
-
- IMessage = interface
- ['{9E368B4A-B1FA-43E7-8CF5-56C66D256CA7}']
- function GetName: string;
- procedure SetName( const Value: string);
- function GetType: TMessageType;
- procedure SetType( Value: TMessageType);
- function GetSeqID: Integer;
- procedure SetSeqID( Value: Integer);
- property Name: string read GetName write SetName;
- property Type_: TMessageType read GetType write SetType;
- property SeqID: Integer read GetSeqID write SetSeqID;
- end;
-
- TMessageImpl = class( TInterfacedObject, IMessage )
- private
- FName: string;
- FMessageType: TMessageType;
- FSeqID: Integer;
- protected
- function GetName: string;
- procedure SetName( const Value: string);
- function GetType: TMessageType;
- procedure SetType( Value: TMessageType);
- function GetSeqID: Integer;
- procedure SetSeqID( Value: Integer);
- public
- property Name: string read FName write FName;
- property Type_: TMessageType read FMessageType write FMessageType;
- property SeqID: Integer read FSeqID write FSeqID;
- constructor Create( AName: string; AMessageType: TMessageType; ASeqID: Integer); overload;
- constructor Create; overload;
- end;
-
- IField = interface
- ['{F0D43BE5-7883-442E-83FF-0580CC632B72}']
- function GetName: string;
- procedure SetName( const Value: string);
- function GetType: TType;
- procedure SetType( Value: TType);
- function GetId: SmallInt;
- procedure SetId( Value: SmallInt);
- property Name: string read GetName write SetName;
- property Type_: TType read GetType write SetType;
- property Id: SmallInt read GetId write SetId;
- end;
-
- TFieldImpl = class( TInterfacedObject, IField)
- private
- FName : string;
- FType : TType;
- FId : SmallInt;
- protected
- function GetName: string;
- procedure SetName( const Value: string);
- function GetType: TType;
- procedure SetType( Value: TType);
- function GetId: SmallInt;
- procedure SetId( Value: SmallInt);
- public
- constructor Create( const AName: string; const AType: TType; AId: SmallInt); overload;
- constructor Create; overload;
- end;
TProtocolUtil = class
public
@@ -279,18 +172,18 @@ type
IProtocol = interface
['{602A7FFB-0D9E-4CD8-8D7F-E5076660588A}']
function GetTransport: ITransport;
- procedure WriteMessageBegin( const msg: IMessage);
+ procedure WriteMessageBegin( const msg: TThriftMessage);
procedure WriteMessageEnd;
- procedure WriteStructBegin( const struc: IStruct);
+ procedure WriteStructBegin( const struc: TThriftStruct);
procedure WriteStructEnd;
- procedure WriteFieldBegin( const field: IField);
+ procedure WriteFieldBegin( const field: TThriftField);
procedure WriteFieldEnd;
procedure WriteFieldStop;
- procedure WriteMapBegin( const map: IMap);
+ procedure WriteMapBegin( const map: TThriftMap);
procedure WriteMapEnd;
- procedure WriteListBegin( const list: IList);
+ procedure WriteListBegin( const list: TThriftList);
procedure WriteListEnd();
- procedure WriteSetBegin( const set_: ISet );
+ procedure WriteSetBegin( const set_: TThriftSet );
procedure WriteSetEnd();
procedure WriteBool( b: Boolean);
procedure WriteByte( b: ShortInt);
@@ -302,17 +195,17 @@ type
procedure WriteAnsiString( const s: AnsiString);
procedure WriteBinary( const b: TBytes);
- function ReadMessageBegin: IMessage;
+ function ReadMessageBegin: TThriftMessage;
procedure ReadMessageEnd();
- function ReadStructBegin: IStruct;
+ function ReadStructBegin: TThriftStruct;
procedure ReadStructEnd;
- function ReadFieldBegin: IField;
+ function ReadFieldBegin: TThriftField;
procedure ReadFieldEnd();
- function ReadMapBegin: IMap;
+ function ReadMapBegin: TThriftMap;
procedure ReadMapEnd();
- function ReadListBegin: IList;
+ function ReadListBegin: TThriftList;
procedure ReadListEnd();
- function ReadSetBegin: ISet;
+ function ReadSetBegin: TThriftSet;
procedure ReadSetEnd();
function ReadBool: Boolean;
function ReadByte: ShortInt;
@@ -348,18 +241,18 @@ type
function GetTransport: ITransport;
public
- procedure WriteMessageBegin( const msg: IMessage); virtual; abstract;
+ procedure WriteMessageBegin( const msg: TThriftMessage); virtual; abstract;
procedure WriteMessageEnd; virtual; abstract;
- procedure WriteStructBegin( const struc: IStruct); virtual; abstract;
+ procedure WriteStructBegin( const struc: TThriftStruct); virtual; abstract;
procedure WriteStructEnd; virtual; abstract;
- procedure WriteFieldBegin( const field: IField); virtual; abstract;
+ procedure WriteFieldBegin( const field: TThriftField); virtual; abstract;
procedure WriteFieldEnd; virtual; abstract;
procedure WriteFieldStop; virtual; abstract;
- procedure WriteMapBegin( const map: IMap); virtual; abstract;
+ procedure WriteMapBegin( const map: TThriftMap); virtual; abstract;
procedure WriteMapEnd; virtual; abstract;
- procedure WriteListBegin( const list: IList); virtual; abstract;
+ procedure WriteListBegin( const list: TThriftList); virtual; abstract;
procedure WriteListEnd(); virtual; abstract;
- procedure WriteSetBegin( const set_: ISet ); virtual; abstract;
+ procedure WriteSetBegin( const set_: TThriftSet ); virtual; abstract;
procedure WriteSetEnd(); virtual; abstract;
procedure WriteBool( b: Boolean); virtual; abstract;
procedure WriteByte( b: ShortInt); virtual; abstract;
@@ -371,17 +264,17 @@ type
procedure WriteAnsiString( const s: AnsiString); virtual;
procedure WriteBinary( const b: TBytes); virtual; abstract;
- function ReadMessageBegin: IMessage; virtual; abstract;
+ function ReadMessageBegin: TThriftMessage; virtual; abstract;
procedure ReadMessageEnd(); virtual; abstract;
- function ReadStructBegin: IStruct; virtual; abstract;
+ function ReadStructBegin: TThriftStruct; virtual; abstract;
procedure ReadStructEnd; virtual; abstract;
- function ReadFieldBegin: IField; virtual; abstract;
+ function ReadFieldBegin: TThriftField; virtual; abstract;
procedure ReadFieldEnd(); virtual; abstract;
- function ReadMapBegin: IMap; virtual; abstract;
+ function ReadMapBegin: TThriftMap; virtual; abstract;
procedure ReadMapEnd(); virtual; abstract;
- function ReadListBegin: IList; virtual; abstract;
+ function ReadListBegin: TThriftList; virtual; abstract;
procedure ReadListEnd(); virtual; abstract;
- function ReadSetBegin: ISet; virtual; abstract;
+ function ReadSetBegin: TThriftSet; virtual; abstract;
procedure ReadSetEnd(); virtual; abstract;
function ReadBool: Boolean; virtual; abstract;
function ReadByte: ShortInt; virtual; abstract;
@@ -405,22 +298,6 @@ type
procedure Write( const iprot: IProtocol);
end;
- IStruct = interface
- ['{5DCE39AA-C916-4BC7-A79B-96A0C36B2220}']
- procedure SetName(const Value: string);
- function GetName: string;
- property Name: string read GetName write SetName;
- end;
-
- TStructImpl = class( TInterfacedObject, IStruct )
- private
- FName: string;
- protected
- function GetName: string;
- procedure SetName(const Value: string);
- public
- constructor Create( const AName: string);
- end;
TBinaryProtocolImpl = class( TProtocolImpl )
protected
@@ -432,7 +309,7 @@ type
FStrictWrite : Boolean;
private
- function ReadAll( var buf: TBytes; off: Integer; len: Integer ): Integer;
+ function ReadAll( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer ): Integer; inline;
function ReadStringBody( size: Integer): string;
public
@@ -451,18 +328,18 @@ type
constructor Create( const trans: ITransport); overload;
constructor Create( const trans: ITransport; strictRead: Boolean; strictWrite: Boolean); overload;
- procedure WriteMessageBegin( const msg: IMessage); override;
+ procedure WriteMessageBegin( const msg: TThriftMessage); override;
procedure WriteMessageEnd; override;
- procedure WriteStructBegin( const struc: IStruct); override;
+ procedure WriteStructBegin( const struc: TThriftStruct); override;
procedure WriteStructEnd; override;
- procedure WriteFieldBegin( const field: IField); override;
+ procedure WriteFieldBegin( const field: TThriftField); override;
procedure WriteFieldEnd; override;
procedure WriteFieldStop; override;
- procedure WriteMapBegin( const map: IMap); override;
+ procedure WriteMapBegin( const map: TThriftMap); override;
procedure WriteMapEnd; override;
- procedure WriteListBegin( const list: IList); override;
+ procedure WriteListBegin( const list: TThriftList); override;
procedure WriteListEnd(); override;
- procedure WriteSetBegin( const set_: ISet ); override;
+ procedure WriteSetBegin( const set_: TThriftSet ); override;
procedure WriteSetEnd(); override;
procedure WriteBool( b: Boolean); override;
procedure WriteByte( b: ShortInt); override;
@@ -472,17 +349,17 @@ type
procedure WriteDouble( const d: Double); override;
procedure WriteBinary( const b: TBytes); override;
- function ReadMessageBegin: IMessage; override;
+ function ReadMessageBegin: TThriftMessage; override;
procedure ReadMessageEnd(); override;
- function ReadStructBegin: IStruct; override;
+ function ReadStructBegin: TThriftStruct; override;
procedure ReadStructEnd; override;
- function ReadFieldBegin: IField; override;
+ function ReadFieldBegin: TThriftField; override;
procedure ReadFieldEnd(); override;
- function ReadMapBegin: IMap; override;
+ function ReadMapBegin: TThriftMap; override;
procedure ReadMapEnd(); override;
- function ReadListBegin: IList; override;
+ function ReadListBegin: TThriftList; override;
procedure ReadListEnd(); override;
- function ReadSetBegin: ISet; override;
+ function ReadSetBegin: TThriftSet; override;
procedure ReadSetEnd(); override;
function ReadBool: Boolean; override;
function ReadByte: ShortInt; override;
@@ -510,18 +387,18 @@ type
// All operations will be forward to the given protocol. Must be non-null.
constructor Create( const aProtocol : IProtocol);
- procedure WriteMessageBegin( const msg: IMessage); override;
+ procedure WriteMessageBegin( const msg: TThriftMessage); override;
procedure WriteMessageEnd; override;
- procedure WriteStructBegin( const struc: IStruct); override;
+ procedure WriteStructBegin( const struc: TThriftStruct); override;
procedure WriteStructEnd; override;
- procedure WriteFieldBegin( const field: IField); override;
+ procedure WriteFieldBegin( const field: TThriftField); override;
procedure WriteFieldEnd; override;
procedure WriteFieldStop; override;
- procedure WriteMapBegin( const map: IMap); override;
+ procedure WriteMapBegin( const map: TThriftMap); override;
procedure WriteMapEnd; override;
- procedure WriteListBegin( const list: IList); override;
+ procedure WriteListBegin( const list: TThriftList); override;
procedure WriteListEnd(); override;
- procedure WriteSetBegin( const set_: ISet ); override;
+ procedure WriteSetBegin( const set_: TThriftSet ); override;
procedure WriteSetEnd(); override;
procedure WriteBool( b: Boolean); override;
procedure WriteByte( b: ShortInt); override;
@@ -533,17 +410,17 @@ type
procedure WriteAnsiString( const s: AnsiString); override;
procedure WriteBinary( const b: TBytes); override;
- function ReadMessageBegin: IMessage; override;
+ function ReadMessageBegin: TThriftMessage; override;
procedure ReadMessageEnd(); override;
- function ReadStructBegin: IStruct; override;
+ function ReadStructBegin: TThriftStruct; override;
procedure ReadStructEnd; override;
- function ReadFieldBegin: IField; override;
+ function ReadFieldBegin: TThriftField; override;
procedure ReadFieldEnd(); override;
- function ReadMapBegin: IMap; override;
+ function ReadMapBegin: TThriftMap; override;
procedure ReadMapEnd(); override;
- function ReadListBegin: IList; override;
+ function ReadListBegin: TThriftList; override;
procedure ReadListEnd(); override;
- function ReadSetBegin: ISet; override;
+ function ReadSetBegin: TThriftSet; override;
procedure ReadSetEnd(); override;
function ReadBool: Boolean; override;
function ReadByte: ShortInt; override;
@@ -594,6 +471,13 @@ type
end;
+procedure Init( var rec : TThriftMessage; const AName: string = ''; const AMessageType: TMessageType = Low(TMessageType); const ASeqID: Integer = 0); overload; inline;
+procedure Init( var rec : TThriftStruct; const AName: string = ''); overload; inline;
+procedure Init( var rec : TThriftField; const AName: string = ''; const AType: TType = Low(TType); const AID: SmallInt = 0); overload; inline;
+procedure Init( var rec : TThriftMap; const AKeyType: TType = Low(TType); const AValueType: TType = Low(TType); const ACount: Integer = 0); overload; inline;
+procedure Init( var rec : TThriftSet; const AElementType: TType = Low(TType); const ACount: Integer = 0); overload; inline;
+procedure Init( var rec : TThriftList; const AElementType: TType = Low(TType); const ACount: Integer = 0); overload; inline;
+
implementation
@@ -609,54 +493,7 @@ begin
System.Move( d, Result, SizeOf(Result));
end;
-{ TFieldImpl }
-constructor TFieldImpl.Create(const AName: string; const AType: TType;
- AId: SmallInt);
-begin
- inherited Create;
- FName := AName;
- FType := AType;
- FId := AId;
-end;
-
-constructor TFieldImpl.Create;
-begin
- inherited Create;
- FName := '';
- FType := Low(TType);
- FId := 0;
-end;
-
-function TFieldImpl.GetId: SmallInt;
-begin
- Result := FId;
-end;
-
-function TFieldImpl.GetName: string;
-begin
- Result := FName;
-end;
-
-function TFieldImpl.GetType: TType;
-begin
- Result := FType;
-end;
-
-procedure TFieldImpl.SetId(Value: SmallInt);
-begin
- FId := Value;
-end;
-
-procedure TFieldImpl.SetName(const Value: string);
-begin
- FName := Value;
-end;
-
-procedure TFieldImpl.SetType(Value: TType);
-begin
- FType := Value;
-end;
{ TProtocolRecursionTrackerImpl }
@@ -769,10 +606,10 @@ end;
{ TProtocolUtil }
class procedure TProtocolUtil.Skip( prot: IProtocol; type_: TType);
-var field : IField;
- map : IMap;
- set_ : ISet;
- list : IList;
+var field : TThriftField;
+ map : TThriftMap;
+ set_ : TThriftSet;
+ list : TThriftList;
i : Integer;
tracker : IProtocolRecursionTracker;
begin
@@ -827,182 +664,6 @@ begin
end;
end;
-{ TStructImpl }
-
-constructor TStructImpl.Create(const AName: string);
-begin
- inherited Create;
- FName := AName;
-end;
-
-function TStructImpl.GetName: string;
-begin
- Result := FName;
-end;
-
-procedure TStructImpl.SetName(const Value: string);
-begin
- FName := Value;
-end;
-
-{ TMapImpl }
-
-constructor TMapImpl.Create( AKeyType, AValueType: TType; ACount: Integer);
-begin
- inherited Create;
- FValueType := AValueType;
- FKeyType := AKeyType;
- FCount := ACount;
-end;
-
-constructor TMapImpl.Create;
-begin
- inherited Create;
-end;
-
-function TMapImpl.GetCount: Integer;
-begin
- Result := FCount;
-end;
-
-function TMapImpl.GetKeyType: TType;
-begin
- Result := FKeyType;
-end;
-
-function TMapImpl.GetValueType: TType;
-begin
- Result := FValueType;
-end;
-
-procedure TMapImpl.SetCount(Value: Integer);
-begin
- FCount := Value;
-end;
-
-procedure TMapImpl.SetKeyType(Value: TType);
-begin
- FKeyType := Value;
-end;
-
-procedure TMapImpl.SetValueType(Value: TType);
-begin
- FValueType := Value;
-end;
-
-{ IMessage }
-
-constructor TMessageImpl.Create(AName: string; AMessageType: TMessageType;
- ASeqID: Integer);
-begin
- inherited Create;
- FName := AName;
- FMessageType := AMessageType;
- FSeqID := ASeqID;
-end;
-
-constructor TMessageImpl.Create;
-begin
- inherited;
-end;
-
-function TMessageImpl.GetName: string;
-begin
- Result := FName;
-end;
-
-function TMessageImpl.GetSeqID: Integer;
-begin
- Result := FSeqID;
-end;
-
-function TMessageImpl.GetType: TMessageType;
-begin
- Result := FMessageType;
-end;
-
-procedure TMessageImpl.SetName(const Value: string);
-begin
- FName := Value;
-end;
-
-procedure TMessageImpl.SetSeqID(Value: Integer);
-begin
- FSeqID := Value;
-end;
-
-procedure TMessageImpl.SetType(Value: TMessageType);
-begin
- FMessageType := Value;
-end;
-
-{ ISet }
-
-constructor TSetImpl.Create( AElementType: TType; ACount: Integer);
-begin
- inherited Create;
- FCount := ACount;
- FElementType := AElementType;
-end;
-
-constructor TSetImpl.Create;
-begin
- inherited Create;
-end;
-
-function TSetImpl.GetCount: Integer;
-begin
- Result := FCount;
-end;
-
-function TSetImpl.GetElementType: TType;
-begin
- Result := FElementType;
-end;
-
-procedure TSetImpl.SetCount(Value: Integer);
-begin
- FCount := Value;
-end;
-
-procedure TSetImpl.SetElementType(Value: TType);
-begin
- FElementType := Value;
-end;
-
-{ IList }
-
-constructor TListImpl.Create( AElementType: TType; ACount: Integer);
-begin
- inherited Create;
- FCount := ACount;
- FElementType := AElementType;
-end;
-
-constructor TListImpl.Create;
-begin
- inherited Create;
-end;
-
-function TListImpl.GetCount: Integer;
-begin
- Result := FCount;
-end;
-
-function TListImpl.GetElementType: TType;
-begin
- Result := FElementType;
-end;
-
-procedure TListImpl.SetCount(Value: Integer);
-begin
- FCount := Value;
-end;
-
-procedure TListImpl.SetElementType(Value: TType);
-begin
- FElementType := Value;
-end;
{ TBinaryProtocolImpl }
@@ -1020,10 +681,9 @@ begin
FStrictWrite := strictWrite;
end;
-function TBinaryProtocolImpl.ReadAll( var buf: TBytes; off,
- len: Integer): Integer;
+function TBinaryProtocolImpl.ReadAll( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer ): Integer;
begin
- Result := FTrans.ReadAll( buf, off, len );
+ Result := FTrans.ReadAll( pBuf, buflen, off, len );
end;
function TBinaryProtocolImpl.ReadBinary: TBytes;
@@ -1039,16 +699,12 @@ end;
function TBinaryProtocolImpl.ReadBool: Boolean;
begin
- Result := ReadByte = 1;
+ Result := (ReadByte = 1);
end;
function TBinaryProtocolImpl.ReadByte: ShortInt;
-var
- bin : TBytes;
begin
- SetLength( bin, 1);
- ReadAll( bin, 0, 1 );
- Result := ShortInt( bin[0]);
+ ReadAll( @result, SizeOf(result), 0, 1);
end;
function TBinaryProtocolImpl.ReadDouble: Double;
@@ -1056,17 +712,12 @@ begin
Result := ConvertInt64ToDouble( ReadI64 )
end;
-function TBinaryProtocolImpl.ReadFieldBegin: IField;
-var
- field : IField;
+function TBinaryProtocolImpl.ReadFieldBegin: TThriftField;
begin
- field := TFieldImpl.Create;
- field.Type_ := TType( ReadByte);
- if ( field.Type_ <> TType.Stop ) then
- begin
- field.Id := ReadI16;
+ Init( result, '', TType( ReadByte), 0);
+ if ( result.Type_ <> TType.Stop ) then begin
+ result.Id := ReadI16;
end;
- Result := field;
end;
procedure TBinaryProtocolImpl.ReadFieldEnd;
@@ -1075,20 +726,16 @@ begin
end;
function TBinaryProtocolImpl.ReadI16: SmallInt;
-var
- i16in : TBytes;
+var i16in : packed array[0..1] of Byte;
begin
- SetLength( i16in, 2 );
- ReadAll( i16in, 0, 2);
+ ReadAll( @i16in, Sizeof(i16in), 0, 2);
Result := SmallInt(((i16in[0] and $FF) shl 8) or (i16in[1] and $FF));
end;
function TBinaryProtocolImpl.ReadI32: Integer;
-var
- i32in : TBytes;
+var i32in : packed array[0..3] of Byte;
begin
- SetLength( i32in, 4 );
- ReadAll( i32in, 0, 4);
+ ReadAll( @i32in, SizeOf(i32in), 0, 4);
Result := Integer(
((i32in[0] and $FF) shl 24) or
@@ -1099,11 +746,9 @@ begin
end;
function TBinaryProtocolImpl.ReadI64: Int64;
-var
- i64in : TBytes;
+var i64in : packed array[0..7] of Byte;
begin
- SetLength( i64in, 8);
- ReadAll( i64in, 0, 8);
+ ReadAll( @i64in, SizeOf(i64in), 0, 8);
Result :=
(Int64( i64in[0] and $FF) shl 56) or
(Int64( i64in[1] and $FF) shl 48) or
@@ -1115,14 +760,10 @@ begin
(Int64( i64in[7] and $FF));
end;
-function TBinaryProtocolImpl.ReadListBegin: IList;
-var
- list : IList;
+function TBinaryProtocolImpl.ReadListBegin: TThriftList;
begin
- list := TListImpl.Create;
- list.ElementType := TType( ReadByte );
- list.Count := ReadI32;
- Result := list;
+ result.ElementType := TType(ReadByte);
+ result.Count := ReadI32;
end;
procedure TBinaryProtocolImpl.ReadListEnd;
@@ -1130,15 +771,11 @@ begin
end;
-function TBinaryProtocolImpl.ReadMapBegin: IMap;
-var
- map : IMap;
+function TBinaryProtocolImpl.ReadMapBegin: TThriftMap;
begin
- map := TMapImpl.Create;
- map.KeyType := TType( ReadByte );
- map.ValueType := TType( ReadByte );
- map.Count := ReadI32;
- Result := map;
+ result.KeyType := TType(ReadByte);
+ result.ValueType := TType(ReadByte);
+ result.Count := ReadI32;
end;
procedure TBinaryProtocolImpl.ReadMapEnd;
@@ -1146,35 +783,30 @@ begin
end;
-function TBinaryProtocolImpl.ReadMessageBegin: IMessage;
+function TBinaryProtocolImpl.ReadMessageBegin: TThriftMessage;
var
size : Integer;
version : Integer;
- message : IMessage;
begin
- message := TMessageImpl.Create;
+ Init( result);
size := ReadI32;
- if (size < 0) then
- begin
+ if (size < 0) then begin
version := size and Integer( VERSION_MASK);
- if ( version <> Integer( VERSION_1)) then
- begin
+ if ( version <> Integer( VERSION_1)) then begin
raise TProtocolExceptionBadVersion.Create('Bad version in ReadMessageBegin: ' + IntToStr(version) );
end;
- message.Type_ := TMessageType( size and $000000ff);
- message.Name := ReadString;
- message.SeqID := ReadI32;
- end else
- begin
- if FStrictRead then
- begin
+ result.Type_ := TMessageType( size and $000000ff);
+ result.Name := ReadString;
+ result.SeqID := ReadI32;
+ end
+ else begin
+ if FStrictRead then begin
raise TProtocolExceptionBadVersion.Create('Missing version in readMessageBegin, old client?' );
end;
- message.Name := ReadStringBody( size );
- message.Type_ := TMessageType( ReadByte );
- message.SeqID := ReadI32;
+ result.Name := ReadStringBody( size );
+ result.Type_ := TMessageType( ReadByte );
+ result.SeqID := ReadI32;
end;
- Result := message;
end;
procedure TBinaryProtocolImpl.ReadMessageEnd;
@@ -1183,14 +815,10 @@ begin
end;
-function TBinaryProtocolImpl.ReadSetBegin: ISet;
-var
- set_ : ISet;
+function TBinaryProtocolImpl.ReadSetBegin: TThriftSet;
begin
- set_ := TSetImpl.Create;
- set_.ElementType := TType( ReadByte );
- set_.Count := ReadI32;
- Result := set_;
+ result.ElementType := TType(ReadByte);
+ result.Count := ReadI32;
end;
procedure TBinaryProtocolImpl.ReadSetEnd;
@@ -1207,9 +835,9 @@ begin
Result := TEncoding.UTF8.GetString( buf);
end;
-function TBinaryProtocolImpl.ReadStructBegin: IStruct;
+function TBinaryProtocolImpl.ReadStructBegin: TThriftStruct;
begin
- Result := TStructImpl.Create('');
+ Init( Result);
end;
procedure TBinaryProtocolImpl.ReadStructEnd;
@@ -1228,22 +856,16 @@ end;
procedure TBinaryProtocolImpl.WriteBool(b: Boolean);
begin
- if b then
- begin
+ if b then begin
WriteByte( 1 );
- end else
- begin
+ end else begin
WriteByte( 0 );
end;
end;
procedure TBinaryProtocolImpl.WriteByte(b: ShortInt);
-var
- a : TBytes;
begin
- SetLength( a, 1);
- a[0] := Byte( b );
- FTrans.Write( a, 0, 1 );
+ FTrans.Write( @b, 0, 1);
end;
procedure TBinaryProtocolImpl.WriteDouble( const d: Double);
@@ -1251,7 +873,7 @@ begin
WriteI64(ConvertDoubleToInt64(d));
end;
-procedure TBinaryProtocolImpl.WriteFieldBegin( const field: IField);
+procedure TBinaryProtocolImpl.WriteFieldBegin( const field: TThriftField);
begin
WriteByte(ShortInt(field.Type_));
WriteI16(field.ID);
@@ -1268,32 +890,26 @@ begin
end;
procedure TBinaryProtocolImpl.WriteI16(i16: SmallInt);
-var
- i16out : TBytes;
+var i16out : packed array[0..1] of Byte;
begin
- SetLength( i16out, 2);
i16out[0] := Byte($FF and (i16 shr 8));
i16out[1] := Byte($FF and i16);
- FTrans.Write( i16out );
+ FTrans.Write( @i16out, 0, 2);
end;
procedure TBinaryProtocolImpl.WriteI32(i32: Integer);
-var
- i32out : TBytes;
+var i32out : packed array[0..3] of Byte;
begin
- SetLength( i32out, 4);
i32out[0] := Byte($FF and (i32 shr 24));
i32out[1] := Byte($FF and (i32 shr 16));
i32out[2] := Byte($FF and (i32 shr 8));
i32out[3] := Byte($FF and i32);
- FTrans.Write( i32out, 0, 4);
+ FTrans.Write( @i32out, 0, 4);
end;
procedure TBinaryProtocolImpl.WriteI64( const i64: Int64);
-var
- i64out : TBytes;
+var i64out : packed array[0..7] of Byte;
begin
- SetLength( i64out, 8);
i64out[0] := Byte($FF and (i64 shr 56));
i64out[1] := Byte($FF and (i64 shr 48));
i64out[2] := Byte($FF and (i64 shr 40));
@@ -1302,10 +918,10 @@ begin
i64out[5] := Byte($FF and (i64 shr 16));
i64out[6] := Byte($FF and (i64 shr 8));
i64out[7] := Byte($FF and i64);
- FTrans.Write( i64out, 0, 8);
+ FTrans.Write( @i64out, 0, 8);
end;
-procedure TBinaryProtocolImpl.WriteListBegin( const list: IList);
+procedure TBinaryProtocolImpl.WriteListBegin( const list: TThriftList);
begin
WriteByte(ShortInt(list.ElementType));
WriteI32(list.Count);
@@ -1316,7 +932,7 @@ begin
end;
-procedure TBinaryProtocolImpl.WriteMapBegin( const map: IMap);
+procedure TBinaryProtocolImpl.WriteMapBegin( const map: TThriftMap);
begin
WriteByte(ShortInt(map.KeyType));
WriteByte(ShortInt(map.ValueType));
@@ -1328,7 +944,7 @@ begin
end;
-procedure TBinaryProtocolImpl.WriteMessageBegin( const msg: IMessage);
+procedure TBinaryProtocolImpl.WriteMessageBegin( const msg: TThriftMessage);
var
version : Cardinal;
begin
@@ -1351,7 +967,7 @@ begin
end;
-procedure TBinaryProtocolImpl.WriteSetBegin( const set_: ISet);
+procedure TBinaryProtocolImpl.WriteSetBegin( const set_: TThriftSet);
begin
WriteByte(ShortInt(set_.ElementType));
WriteI32(set_.Count);
@@ -1362,7 +978,7 @@ begin
end;
-procedure TBinaryProtocolImpl.WriteStructBegin( const struc: IStruct);
+procedure TBinaryProtocolImpl.WriteStructBegin( const struc: TThriftStruct);
begin
end;
@@ -1461,7 +1077,7 @@ begin
end;
-procedure TProtocolDecorator.WriteMessageBegin( const msg: IMessage);
+procedure TProtocolDecorator.WriteMessageBegin( const msg: TThriftMessage);
begin
FWrappedProtocol.WriteMessageBegin( msg);
end;
@@ -1473,7 +1089,7 @@ begin
end;
-procedure TProtocolDecorator.WriteStructBegin( const struc: IStruct);
+procedure TProtocolDecorator.WriteStructBegin( const struc: TThriftStruct);
begin
FWrappedProtocol.WriteStructBegin( struc);
end;
@@ -1485,7 +1101,7 @@ begin
end;
-procedure TProtocolDecorator.WriteFieldBegin( const field: IField);
+procedure TProtocolDecorator.WriteFieldBegin( const field: TThriftField);
begin
FWrappedProtocol.WriteFieldBegin( field);
end;
@@ -1503,7 +1119,7 @@ begin
end;
-procedure TProtocolDecorator.WriteMapBegin( const map: IMap);
+procedure TProtocolDecorator.WriteMapBegin( const map: TThriftMap);
begin
FWrappedProtocol.WriteMapBegin( map);
end;
@@ -1515,7 +1131,7 @@ begin
end;
-procedure TProtocolDecorator.WriteListBegin( const list: IList);
+procedure TProtocolDecorator.WriteListBegin( const list: TThriftList);
begin
FWrappedProtocol.WriteListBegin( list);
end;
@@ -1527,7 +1143,7 @@ begin
end;
-procedure TProtocolDecorator.WriteSetBegin( const set_: ISet );
+procedure TProtocolDecorator.WriteSetBegin( const set_: TThriftSet );
begin
FWrappedProtocol.WriteSetBegin( set_);
end;
@@ -1593,7 +1209,7 @@ begin
end;
-function TProtocolDecorator.ReadMessageBegin: IMessage;
+function TProtocolDecorator.ReadMessageBegin: TThriftMessage;
begin
result := FWrappedProtocol.ReadMessageBegin;
end;
@@ -1605,7 +1221,7 @@ begin
end;
-function TProtocolDecorator.ReadStructBegin: IStruct;
+function TProtocolDecorator.ReadStructBegin: TThriftStruct;
begin
result := FWrappedProtocol.ReadStructBegin;
end;
@@ -1617,7 +1233,7 @@ begin
end;
-function TProtocolDecorator.ReadFieldBegin: IField;
+function TProtocolDecorator.ReadFieldBegin: TThriftField;
begin
result := FWrappedProtocol.ReadFieldBegin;
end;
@@ -1629,7 +1245,7 @@ begin
end;
-function TProtocolDecorator.ReadMapBegin: IMap;
+function TProtocolDecorator.ReadMapBegin: TThriftMap;
begin
result := FWrappedProtocol.ReadMapBegin;
end;
@@ -1641,7 +1257,7 @@ begin
end;
-function TProtocolDecorator.ReadListBegin: IList;
+function TProtocolDecorator.ReadListBegin: TThriftList;
begin
result := FWrappedProtocol.ReadListBegin;
end;
@@ -1653,7 +1269,7 @@ begin
end;
-function TProtocolDecorator.ReadSetBegin: ISet;
+function TProtocolDecorator.ReadSetBegin: TThriftSet;
begin
result := FWrappedProtocol.ReadSetBegin;
end;
@@ -1719,6 +1335,54 @@ begin
end;
+{ Init helper functions }
+
+procedure Init( var rec : TThriftMessage; const AName: string; const AMessageType: TMessageType; const ASeqID: Integer);
+begin
+ rec.Name := AName;
+ rec.Type_ := AMessageType;
+ rec.SeqID := ASeqID;
+end;
+
+
+procedure Init( var rec : TThriftStruct; const AName: string = '');
+begin
+ rec.Name := AName;
+end;
+
+
+procedure Init( var rec : TThriftField; const AName: string; const AType: TType; const AID: SmallInt);
+begin
+ rec.Name := AName;
+ rec.Type_ := AType;
+ rec.Id := AId;
+end;
+
+
+procedure Init( var rec : TThriftMap; const AKeyType, AValueType: TType; const ACount: Integer);
+begin
+ rec.ValueType := AValueType;
+ rec.KeyType := AKeyType;
+ rec.Count := ACount;
+end;
+
+
+procedure Init( var rec : TThriftSet; const AElementType: TType; const ACount: Integer);
+begin
+ rec.Count := ACount;
+ rec.ElementType := AElementType;
+end;
+
+
+procedure Init( var rec : TThriftList; const AElementType: TType; const ACount: Integer);
+begin
+ rec.Count := ACount;
+ rec.ElementType := AElementType;
+end;
+
+
+
+
end.
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Stream.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Stream.pas
index 7c448d8aa..b6e0cbfe9 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Stream.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Stream.pas
@@ -38,9 +38,11 @@ uses
type
IThriftStream = interface
- ['{732621B3-F697-4D76-A1B0-B4DD5A8E4018}']
- procedure Write( const buffer: TBytes; offset: Integer; count: Integer);
- function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer;
+ ['{2A77D916-7446-46C1-8545-0AEC0008DBCA}']
+ procedure Write( const buffer: TBytes; offset: Integer; count: Integer); overload;
+ procedure Write( const pBuf : Pointer; offset: Integer; count: Integer); overload;
+ function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; overload;
+ function Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; overload;
procedure Open;
procedure Close;
procedure Flush;
@@ -50,10 +52,12 @@ type
TThriftStreamImpl = class( TInterfacedObject, IThriftStream)
private
- procedure CheckSizeAndOffset( const buffer: TBytes; offset: Integer; count: Integer);
+ procedure CheckSizeAndOffset( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer); overload;
protected
- procedure Write( const buffer: TBytes; offset: Integer; count: Integer); virtual;
- function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; virtual;
+ procedure Write( const buffer: TBytes; offset: Integer; count: Integer); overload; inline;
+ procedure Write( const pBuf : Pointer; offset: Integer; count: Integer); overload; virtual;
+ function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; overload; inline;
+ function Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; overload; virtual;
procedure Open; virtual; abstract;
procedure Close; virtual; abstract;
procedure Flush; virtual; abstract;
@@ -66,8 +70,8 @@ type
FStream : TStream;
FOwnsStream : Boolean;
protected
- procedure Write( const buffer: TBytes; offset: Integer; count: Integer); override;
- function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; offset: Integer; count: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; override;
procedure Open; override;
procedure Close; override;
procedure Flush; override;
@@ -82,8 +86,8 @@ type
private
FStream : IStream;
protected
- procedure Write( const buffer: TBytes; offset: Integer; count: Integer); override;
- function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; offset: Integer; count: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; override;
procedure Open; override;
procedure Close; override;
procedure Flush; override;
@@ -127,13 +131,17 @@ begin
// nothing to do
end;
-function TThriftStreamAdapterCOM.Read( var buffer: TBytes; offset: Integer; count: Integer): Integer;
+function TThriftStreamAdapterCOM.Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
begin
inherited;
+
+ if count >= buflen-offset
+ then count := buflen-offset;
+
Result := 0;
if FStream <> nil then begin
if count > 0 then begin
- FStream.Read( @buffer[offset], count, @Result);
+ FStream.Read( @(PByteArray(pBuf)^[offset]), count, @Result);
end;
end;
end;
@@ -162,44 +170,53 @@ begin
end;
end;
-procedure TThriftStreamAdapterCOM.Write( const buffer: TBytes; offset: Integer; count: Integer);
+procedure TThriftStreamAdapterCOM.Write( const pBuf: Pointer; offset: Integer; count: Integer);
var nWritten : Integer;
begin
inherited;
if IsOpen then begin
if count > 0 then begin
- FStream.Write( @buffer[0], count, @nWritten);
+ FStream.Write( @(PByteArray(pBuf)^[offset]), count, @nWritten);
end;
end;
end;
{ TThriftStreamImpl }
-procedure TThriftStreamImpl.CheckSizeAndOffset(const buffer: TBytes; offset,
- count: Integer);
-var
- len : Integer;
+procedure TThriftStreamImpl.CheckSizeAndOffset( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer);
begin
if count > 0 then begin
- len := Length( buffer );
- if (offset < 0) or ( offset >= len) then begin
+ if (offset < 0) or ( offset >= buflen) then begin
raise ERangeError.Create( SBitsIndexError );
end;
- if count > len then begin
+ if count > buflen then begin
raise ERangeError.Create( SBitsIndexError );
end;
end;
end;
function TThriftStreamImpl.Read(var buffer: TBytes; offset, count: Integer): Integer;
+begin
+ if Length(buffer) > 0
+ then Result := Read( @buffer[0], Length(buffer), offset, count)
+ else Result := 0;
+end;
+
+function TThriftStreamImpl.Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
begin
Result := 0;
- CheckSizeAndOffset( buffer, offset, count );
+ CheckSizeAndOffset( pBuf, buflen, offset, count );
end;
procedure TThriftStreamImpl.Write(const buffer: TBytes; offset, count: Integer);
begin
- CheckSizeAndOffset( buffer, offset, count );
+ if Length(buffer) > 0
+ then Write( @buffer[0], offset, count);
+end;
+
+procedure TThriftStreamImpl.Write( const pBuf : Pointer; offset: Integer; count: Integer);
+begin
+ CheckSizeAndOffset( pBuf, offset+count, offset, count);
end;
{ TThriftStreamAdapterDelphi }
@@ -241,14 +258,16 @@ begin
// nothing to do
end;
-function TThriftStreamAdapterDelphi.Read(var buffer: TBytes; offset,
- count: Integer): Integer;
+function TThriftStreamAdapterDelphi.Read(const pBuf : Pointer; const buflen : Integer; offset, count: Integer): Integer;
begin
inherited;
- Result := 0;
- if count > 0 then begin
- Result := FStream.Read( Pointer(@buffer[offset])^, count)
- end;
+
+ if count >= buflen-offset
+ then count := buflen-offset;
+
+ if count > 0
+ then Result := FStream.Read( PByteArray(pBuf)^[offset], count)
+ else Result := 0;
end;
function TThriftStreamAdapterDelphi.ToArray: TBytes;
@@ -276,12 +295,11 @@ begin
end
end;
-procedure TThriftStreamAdapterDelphi.Write(const buffer: TBytes; offset,
- count: Integer);
+procedure TThriftStreamAdapterDelphi.Write(const pBuf : Pointer; offset, count: Integer);
begin
inherited;
if count > 0 then begin
- FStream.Write( Pointer(@buffer[offset])^, count)
+ FStream.Write( PByteArray(pBuf)^[offset], count)
end;
end;
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.Pipes.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.Pipes.pas
index d4f99aba4..9b7f842c1 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.Pipes.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.Pipes.pas
@@ -48,16 +48,16 @@ type
FOpenTimeOut : DWORD; // separate value to allow for fail-fast-on-open scenarios
FOverlapped : Boolean;
- procedure Write( const buffer: TBytes; offset: Integer; count: Integer); override;
- function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; offset, count : Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; override;
//procedure Open; override; - see derived classes
procedure Close; override;
procedure Flush; override;
- function ReadDirect( var buffer: TBytes; offset: Integer; count: Integer): Integer;
- function ReadOverlapped( var buffer: TBytes; offset: Integer; count: Integer): Integer;
- procedure WriteDirect( const buffer: TBytes; offset: Integer; count: Integer);
- procedure WriteOverlapped( const buffer: TBytes; offset: Integer; count: Integer);
+ function ReadDirect( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; overload;
+ function ReadOverlapped( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; overload;
+ procedure WriteDirect( const pBuf : Pointer; offset: Integer; count: Integer); overload;
+ procedure WriteOverlapped( const pBuf : Pointer; offset: Integer; count: Integer); overload;
function IsOpen: Boolean; override;
function ToArray: TBytes; override;
@@ -310,34 +310,67 @@ begin
end;
-procedure TPipeStreamBase.Write(const buffer: TBytes; offset, count: Integer);
+procedure TPipeStreamBase.Write( const pBuf : Pointer; offset, count : Integer);
begin
if FOverlapped
- then WriteOverlapped( buffer, offset, count)
- else WriteDirect( buffer, offset, count);
+ then WriteOverlapped( pBuf, offset, count)
+ else WriteDirect( pBuf, offset, count);
end;
-function TPipeStreamBase.Read( var buffer: TBytes; offset, count: Integer): Integer;
+function TPipeStreamBase.Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
begin
if FOverlapped
- then result := ReadOverlapped( buffer, offset, count)
- else result := ReadDirect( buffer, offset, count);
+ then result := ReadOverlapped( pBuf, buflen, offset, count)
+ else result := ReadDirect( pBuf, buflen, offset, count);
end;
-procedure TPipeStreamBase.WriteDirect(const buffer: TBytes; offset, count: Integer);
+procedure TPipeStreamBase.WriteDirect( const pBuf : Pointer; offset: Integer; count: Integer);
var cbWritten : DWORD;
begin
if not IsOpen
then raise TTransportExceptionNotOpen.Create('Called write on non-open pipe');
- if not WriteFile( FPipe, buffer[offset], count, cbWritten, nil)
+ if not WriteFile( FPipe, PByteArray(pBuf)^[offset], count, cbWritten, nil)
then raise TTransportExceptionNotOpen.Create('Write to pipe failed');
end;
-function TPipeStreamBase.ReadDirect( var buffer: TBytes; offset, count: Integer): Integer;
+procedure TPipeStreamBase.WriteOverlapped( const pBuf : Pointer; offset: Integer; count: Integer);
+var cbWritten, dwWait, dwError : DWORD;
+ overlapped : IOverlappedHelper;
+begin
+ if not IsOpen
+ then raise TTransportExceptionNotOpen.Create('Called write on non-open pipe');
+
+ overlapped := TOverlappedHelperImpl.Create;
+
+ if not WriteFile( FPipe, PByteArray(pBuf)^[offset], count, cbWritten, overlapped.OverlappedPtr)
+ then begin
+ dwError := GetLastError;
+ case dwError of
+ ERROR_IO_PENDING : begin
+ dwWait := overlapped.WaitFor(FTimeout);
+
+ if (dwWait = WAIT_TIMEOUT)
+ then raise TTransportExceptionTimedOut.Create('Pipe write timed out');
+
+ if (dwWait <> WAIT_OBJECT_0)
+ or not GetOverlappedResult( FPipe, overlapped.Overlapped, cbWritten, TRUE)
+ then raise TTransportExceptionUnknown.Create('Pipe write error');
+ end;
+
+ else
+ raise TTransportExceptionUnknown.Create(SysErrorMessage(dwError));
+ end;
+ end;
+
+ ASSERT( DWORD(count) = cbWritten);
+end;
+
+
+function TPipeStreamBase.ReadDirect( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
var cbRead, dwErr : DWORD;
bytes, retries : LongInt;
bOk : Boolean;
@@ -374,47 +407,14 @@ begin
end;
// read the data (or block INFINITE-ly)
- bOk := ReadFile( FPipe, buffer[offset], count, cbRead, nil);
+ bOk := ReadFile( FPipe, PByteArray(pBuf)^[offset], count, cbRead, nil);
if (not bOk) and (GetLastError() <> ERROR_MORE_DATA)
then result := 0 // No more data, possibly because client disconnected.
else result := cbRead;
end;
-procedure TPipeStreamBase.WriteOverlapped(const buffer: TBytes; offset, count: Integer);
-var cbWritten, dwWait, dwError : DWORD;
- overlapped : IOverlappedHelper;
-begin
- if not IsOpen
- then raise TTransportExceptionNotOpen.Create('Called write on non-open pipe');
-
- overlapped := TOverlappedHelperImpl.Create;
-
- if not WriteFile( FPipe, buffer[offset], count, cbWritten, overlapped.OverlappedPtr)
- then begin
- dwError := GetLastError;
- case dwError of
- ERROR_IO_PENDING : begin
- dwWait := overlapped.WaitFor(FTimeout);
-
- if (dwWait = WAIT_TIMEOUT)
- then raise TTransportExceptionTimedOut.Create('Pipe write timed out');
-
- if (dwWait <> WAIT_OBJECT_0)
- or not GetOverlappedResult( FPipe, overlapped.Overlapped, cbWritten, TRUE)
- then raise TTransportExceptionUnknown.Create('Pipe write error');
- end;
-
- else
- raise TTransportExceptionUnknown.Create(SysErrorMessage(dwError));
- end;
- end;
-
- ASSERT( DWORD(count) = cbWritten);
-end;
-
-
-function TPipeStreamBase.ReadOverlapped( var buffer: TBytes; offset, count: Integer): Integer;
+function TPipeStreamBase.ReadOverlapped( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
var cbRead, dwWait, dwError : DWORD;
bOk : Boolean;
overlapped : IOverlappedHelper;
@@ -425,7 +425,7 @@ begin
overlapped := TOverlappedHelperImpl.Create;
// read the data
- bOk := ReadFile( FPipe, buffer[offset], count, cbRead, overlapped.OverlappedPtr);
+ bOk := ReadFile( FPipe, PByteArray(pBuf)^[offset], count, cbRead, overlapped.OverlappedPtr);
if not bOk then begin
dwError := GetLastError;
case dwError of
@@ -768,8 +768,6 @@ var sd : PSECURITY_DESCRIPTOR;
sa : SECURITY_ATTRIBUTES; //TSecurityAttributes;
hCAR, hPipeW, hCAW, hPipe : THandle;
begin
- result := FALSE;
-
sd := PSECURITY_DESCRIPTOR( LocalAlloc( LPTR,SECURITY_DESCRIPTOR_MIN_LENGTH));
try
Win32Check( InitializeSecurityDescriptor( sd, SECURITY_DESCRIPTOR_REVISION));
@@ -779,12 +777,14 @@ begin
sa.lpSecurityDescriptor := sd;
sa.bInheritHandle := TRUE; //allow passing handle to child
- if not CreatePipe( hCAR, hPipeW, @sa, FBufSize) then begin //create stdin pipe
+ Result := CreatePipe( hCAR, hPipeW, @sa, FBufSize); //create stdin pipe
+ if not Result then begin //create stdin pipe
raise TTransportExceptionNotOpen.Create('TServerPipe CreatePipe (anon) failed, '+SysErrorMessage(GetLastError));
Exit;
end;
- if not CreatePipe( hPipe, hCAW, @sa, FBufSize) then begin //create stdout pipe
+ Result := CreatePipe( hPipe, hCAW, @sa, FBufSize); //create stdout pipe
+ if not Result then begin //create stdout pipe
CloseHandle( hCAR);
CloseHandle( hPipeW);
raise TTransportExceptionNotOpen.Create('TServerPipe CreatePipe (anon) failed, '+SysErrorMessage(GetLastError));
@@ -795,9 +795,6 @@ begin
FClientAnonWrite := hCAW;
FReadHandle := hPipe;
FWriteHandle := hPipeW;
-
- result := TRUE;
-
finally
if sd <> nil then LocalFree( Cardinal(sd));
end;
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.pas
index 5dfb14ef0..52b617bb9 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.Transport.pas
@@ -44,16 +44,20 @@ uses
type
ITransport = interface
- ['{A4A9FC37-D620-44DC-AD21-662D16364CE4}']
+ ['{DB84961E-8BB3-4532-99E1-A8C7AC2300F7}']
function GetIsOpen: Boolean;
property IsOpen: Boolean read GetIsOpen;
function Peek: Boolean;
procedure Open;
procedure Close;
- function Read(var buf: TBytes; off: Integer; len: Integer): Integer;
- function ReadAll(var buf: TBytes; off: Integer; len: Integer): Integer;
+ function Read(var buf: TBytes; off: Integer; len: Integer): Integer; overload;
+ function Read(const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; overload;
+ function ReadAll(var buf: TBytes; off: Integer; len: Integer): Integer; overload;
+ function ReadAll(const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; overload;
procedure Write( const buf: TBytes); overload;
procedure Write( const buf: TBytes; off: Integer; len: Integer); overload;
+ procedure Write( const pBuf : Pointer; off, len : Integer); overload;
+ procedure Write( const pBuf : Pointer; len : Integer); overload;
procedure Flush;
end;
@@ -64,10 +68,14 @@ type
function Peek: Boolean; virtual;
procedure Open(); virtual; abstract;
procedure Close(); virtual; abstract;
- function Read(var buf: TBytes; off: Integer; len: Integer): Integer; virtual; abstract;
- function ReadAll(var buf: TBytes; off: Integer; len: Integer): Integer; virtual;
- procedure Write( const buf: TBytes); overload; virtual;
- procedure Write( const buf: TBytes; off: Integer; len: Integer); overload; virtual; abstract;
+ function Read(var buf: TBytes; off: Integer; len: Integer): Integer; overload; inline;
+ function Read(const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; overload; virtual; abstract;
+ function ReadAll(var buf: TBytes; off: Integer; len: Integer): Integer; overload; inline;
+ function ReadAll(const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; overload; virtual;
+ procedure Write( const buf: TBytes); overload; inline;
+ procedure Write( const buf: TBytes; off: Integer; len: Integer); overload; inline;
+ procedure Write( const pBuf : Pointer; len : Integer); overload; inline;
+ procedure Write( const pBuf : Pointer; off, len : Integer); overload; virtual; abstract;
procedure Flush; virtual;
end;
@@ -135,8 +143,8 @@ type
function GetIsOpen: Boolean; override;
procedure Open(); override;
procedure Close(); override;
- function Read( var buf: TBytes; off: Integer; len: Integer): Integer; override;
- procedure Write( const buf: TBytes; off: Integer; len: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; off, len : Integer); override;
procedure Flush; override;
procedure SetConnectionTimeout(const Value: Integer);
@@ -193,8 +201,8 @@ type
SLEEP_TIME = 200;
{$ENDIF}
protected
- procedure Write( const buffer: TBytes; offset: Integer; count: Integer); override;
- function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; offset, count: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; override;
procedure Open; override;
procedure Close; override;
procedure Flush; override;
@@ -233,8 +241,8 @@ type
procedure Open; override;
procedure Close; override;
procedure Flush; override;
- function Read(var buf: TBytes; off: Integer; len: Integer): Integer; override;
- procedure Write( const buf: TBytes; off: Integer; len: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; off, len : Integer); override;
constructor Create( const AInputStream : IThriftStream; const AOutputStream : IThriftStream);
destructor Destroy; override;
end;
@@ -246,8 +254,8 @@ type
FReadBuffer : TMemoryStream;
FWriteBuffer : TMemoryStream;
protected
- procedure Write( const buffer: TBytes; offset: Integer; count: Integer); override;
- function Read( var buffer: TBytes; offset: Integer; count: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; offset: Integer; count: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer; override;
procedure Open; override;
procedure Close; override;
procedure Flush; override;
@@ -299,8 +307,8 @@ type
public
procedure Open(); override;
procedure Close(); override;
- function Read(var buf: TBytes; off: Integer; len: Integer): Integer; override;
- procedure Write( const buf: TBytes; off: Integer; len: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; off, len : Integer); override;
constructor Create( const ATransport : IStreamTransport ); overload;
constructor Create( const ATransport : IStreamTransport; ABufSize: Integer); overload;
property UnderlyingTransport: ITransport read GetUnderlyingTransport;
@@ -377,8 +385,8 @@ type
function GetIsOpen: Boolean; override;
procedure Close(); override;
- function Read(var buf: TBytes; off: Integer; len: Integer): Integer; override;
- procedure Write( const buf: TBytes; off: Integer; len: Integer); override;
+ function Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer; override;
+ procedure Write( const pBuf : Pointer; off, len : Integer); override;
procedure Flush; override;
end;
@@ -404,24 +412,47 @@ begin
Result := IsOpen;
end;
-function TTransportImpl.ReadAll( var buf: TBytes; off, len: Integer): Integer;
-var
- got : Integer;
- ret : Integer;
+function TTransportImpl.Read(var buf: TBytes; off: Integer; len: Integer): Integer;
begin
- got := 0;
- while got < len do begin
- ret := Read( buf, off + got, len - got);
- if ret > 0
- then Inc( got, ret)
- else raise TTransportExceptionNotOpen.Create( 'Cannot read, Remote side has closed' );
- end;
- Result := got;
+ if Length(buf) > 0
+ then result := Read( @buf[0], Length(buf), off, len)
+ else result := 0;
+end;
+
+function TTransportImpl.ReadAll(var buf: TBytes; off: Integer; len: Integer): Integer;
+begin
+ if Length(buf) > 0
+ then result := ReadAll( @buf[0], Length(buf), off, len)
+ else result := 0;
end;
procedure TTransportImpl.Write( const buf: TBytes);
begin
- Self.Write( buf, 0, Length(buf) );
+ if Length(buf) > 0
+ then Write( @buf[0], 0, Length(buf));
+end;
+
+procedure TTransportImpl.Write( const buf: TBytes; off: Integer; len: Integer);
+begin
+ if Length(buf) > 0
+ then Write( @buf[0], off, len);
+end;
+
+function TTransportImpl.ReadAll(const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer;
+var ret : Integer;
+begin
+ result := 0;
+ while result < len do begin
+ ret := Read( pBuf, buflen, off + result, len - result);
+ if ret > 0
+ then Inc( result, ret)
+ else raise TTransportExceptionNotOpen.Create( 'Cannot read, Remote side has closed' );
+ end;
+end;
+
+procedure TTransportImpl.Write( const pBuf : Pointer; len : Integer);
+begin
+ Self.Write( pBuf, 0, len);
end;
{ THTTPClientImpl }
@@ -501,14 +532,14 @@ begin
// nothing to do
end;
-function THTTPClientImpl.Read( var buf: TBytes; off, len: Integer): Integer;
+function THTTPClientImpl.Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer;
begin
if FInputStream = nil then begin
raise TTransportExceptionNotOpen.Create('No request has been sent');
end;
try
- Result := FInputStream.Read( buf, off, len )
+ Result := FInputStream.Read( pBuf, buflen, off, len)
except
on E: Exception
do raise TTransportExceptionUnknown.Create(E.Message);
@@ -550,9 +581,9 @@ begin
FReadTimeout := Value
end;
-procedure THTTPClientImpl.Write( const buf: TBytes; off, len: Integer);
+procedure THTTPClientImpl.Write( const pBuf : Pointer; off, len : Integer);
begin
- FOutputStream.Write( buf, off, len);
+ FOutputStream.Write( pBuf, off, len);
end;
{ TTransportException }
@@ -931,7 +962,7 @@ begin
// nothing to do
end;
-function TBufferedStreamImpl.Read( var buffer: TBytes; offset: Integer; count: Integer): Integer;
+function TBufferedStreamImpl.Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
var
nRead : Integer;
tempbuf : TBytes;
@@ -954,7 +985,7 @@ begin
if FReadBuffer.Position < FReadBuffer.Size then begin
nRead := Min( FReadBuffer.Size - FReadBuffer.Position, count);
- Inc( Result, FReadBuffer.Read( Pointer(@buffer[offset])^, nRead));
+ Inc( Result, FReadBuffer.Read( PByteArray(pBuf)^[offset], nRead));
Dec( count, nRead);
Inc( offset, nRead);
end;
@@ -979,12 +1010,12 @@ begin
end;
end;
-procedure TBufferedStreamImpl.Write( const buffer: TBytes; offset: Integer; count: Integer);
+procedure TBufferedStreamImpl.Write( const pBuf : Pointer; offset: Integer; count: Integer);
begin
inherited;
if count > 0 then begin
if IsOpen then begin
- FWriteBuffer.Write( Pointer(@buffer[offset])^, count );
+ FWriteBuffer.Write( PByteArray(pBuf)^[offset], count );
if FWriteBuffer.Size > FBufSize then begin
Flush;
end;
@@ -1043,22 +1074,22 @@ begin
end;
-function TStreamTransportImpl.Read(var buf: TBytes; off, len: Integer): Integer;
+function TStreamTransportImpl.Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer;
begin
if FInputStream = nil then begin
raise TTransportExceptionNotOpen.Create('Cannot read from null inputstream' );
end;
- Result := FInputStream.Read( buf, off, len );
+ Result := FInputStream.Read( pBuf,buflen, off, len );
end;
-procedure TStreamTransportImpl.Write(const buf: TBytes; off, len: Integer);
+procedure TStreamTransportImpl.Write( const pBuf : Pointer; off, len : Integer);
begin
if FOutputStream = nil then begin
raise TTransportExceptionNotOpen.Create('Cannot write to null outputstream' );
end;
- FOutputStream.Write( buf, off, len );
+ FOutputStream.Write( pBuf, off, len );
end;
{ TBufferedTransportImpl }
@@ -1114,18 +1145,18 @@ begin
FTransport.Open
end;
-function TBufferedTransportImpl.Read(var buf: TBytes; off, len: Integer): Integer;
+function TBufferedTransportImpl.Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer;
begin
Result := 0;
if FInputBuffer <> nil then begin
- Result := FInputBuffer.Read( buf, off, len );
+ Result := FInputBuffer.Read( pBuf,buflen, off, len );
end;
end;
-procedure TBufferedTransportImpl.Write(const buf: TBytes; off, len: Integer);
+procedure TBufferedTransportImpl.Write( const pBuf : Pointer; off, len : Integer);
begin
if FOutputBuffer <> nil then begin
- FOutputBuffer.Write( buf, off, len );
+ FOutputBuffer.Write( pBuf, off, len );
end;
end;
@@ -1222,24 +1253,21 @@ begin
FTransport.Open;
end;
-function TFramedTransportImpl.Read(var buf: TBytes; off, len: Integer): Integer;
-var
- got : Integer;
+function TFramedTransportImpl.Read( const pBuf : Pointer; const buflen : Integer; off: Integer; len: Integer): Integer;
begin
- if FReadBuffer <> nil then begin
- if len > 0
- then got := FReadBuffer.Read( Pointer(@buf[off])^, len )
- else got := 0;
-
- if got > 0 then begin
- Result := got;
+ if len > (buflen-off)
+ then len := buflen-off;
+
+ if (FReadBuffer <> nil) and (len > 0) then begin
+ result := FReadBuffer.Read( PByteArray(pBuf)^[off], len);
+ if result > 0 then begin
Exit;
end;
end;
ReadFrame;
if len > 0
- then Result := FReadBuffer.Read( Pointer(@buf[off])^, len)
+ then Result := FReadBuffer.Read( PByteArray(pBuf)^[off], len)
else Result := 0;
end;
@@ -1260,14 +1288,15 @@ begin
FTransport.ReadAll( buff, 0, size );
FReadBuffer.Free;
FReadBuffer := TMemoryStream.Create;
- FReadBuffer.Write( Pointer(@buff[0])^, size );
+ if Length(buff) > 0
+ then FReadBuffer.Write( Pointer(@buff[0])^, size );
FReadBuffer.Position := 0;
end;
-procedure TFramedTransportImpl.Write(const buf: TBytes; off, len: Integer);
+procedure TFramedTransportImpl.Write( const pBuf : Pointer; off, len : Integer);
begin
if len > 0
- then FWriteBuffer.Write( Pointer(@buf[off])^, len );
+ then FWriteBuffer.Write( PByteArray(pBuf)^[off], len );
end;
{ TFramedTransport.TFactory }
@@ -1447,7 +1476,7 @@ end;
{$ENDIF}
{$IFDEF OLD_SOCKETS}
-function TTcpSocketStreamImpl.Read(var buffer: TBytes; offset, count: Integer): Integer;
+function TTcpSocketStreamImpl.Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
// old sockets version
var wfd : TWaitForData;
wsaError,
@@ -1462,7 +1491,7 @@ begin
else msecs := DEFAULT_THRIFT_TIMEOUT;
result := 0;
- pDest := Pointer(@buffer[offset]);
+ pDest := @(PByteArray(pBuf)^[offset]);
while count > 0 do begin
while TRUE do begin
@@ -1513,7 +1542,7 @@ begin
end;
end;
-procedure TTcpSocketStreamImpl.Write(const buffer: TBytes; offset, count: Integer);
+procedure TTcpSocketStreamImpl.Write( const pBuf : Pointer; offset, count: Integer);
// old sockets version
var bCanWrite, bError : Boolean;
retval, wsaError : Integer;
@@ -1537,12 +1566,12 @@ begin
if bError or not bCanWrite
then raise TTransportExceptionUnknown.Create('unknown error');
- FTcpClient.SendBuf( Pointer(@buffer[offset])^, count);
+ FTcpClient.SendBuf( PByteArray(pBuf)^[offset], count);
end;
{$ELSE}
-function TTcpSocketStreamImpl.Read(var buffer: TBytes; offset, count: Integer): Integer;
+function TTcpSocketStreamImpl.Read( const pBuf : Pointer; const buflen : Integer; offset: Integer; count: Integer): Integer;
// new sockets version
var nBytes : Integer;
pDest : PByte;
@@ -1550,7 +1579,7 @@ begin
inherited;
result := 0;
- pDest := Pointer(@buffer[offset]);
+ pDest := @(PByteArray(pBuf)^[offset]);
while count > 0 do begin
nBytes := FTcpClient.Read(pDest^, count);
if nBytes = 0 then Exit;
@@ -1579,7 +1608,7 @@ begin
SetLength(Result, Length(Result) - 1024 + len);
end;
-procedure TTcpSocketStreamImpl.Write(const buffer: TBytes; offset, count: Integer);
+procedure TTcpSocketStreamImpl.Write( const pBuf : Pointer; offset, count: Integer);
// new sockets version
begin
inherited;
@@ -1587,7 +1616,7 @@ begin
if not FTcpClient.IsOpen
then raise TTransportExceptionNotOpen.Create('not open');
- FTcpClient.Write(buffer[offset], count);
+ FTcpClient.Write( PByteArray(pBuf)^[offset], count);
end;
{$ENDIF}
diff --git a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.pas b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.pas
index e969ebf24..6eca3c9cb 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/src/Thrift.pas
@@ -172,10 +172,10 @@ end;
class function TApplicationException.Read( const iprot: IProtocol): TApplicationException;
var
- field : IField;
+ field : TThriftField;
msg : string;
typ : TExceptionType;
- struc : IStruct;
+ struc : TThriftStruct;
begin
msg := '';
typ := TExceptionType.Unknown;
@@ -220,12 +220,11 @@ end;
procedure TApplicationException.Write( const oprot: IProtocol);
var
- struc : IStruct;
- field : IField;
-
+ struc : TThriftStruct;
+ field : TThriftField;
begin
- struc := TStructImpl.Create( 'TApplicationException' );
- field := TFieldImpl.Create;
+ Init(struc, 'TApplicationException');
+ Init(field);
oprot.WriteStructBegin( struc );
if Message <> '' then
diff --git a/vendor/github.com/apache/thrift/lib/delphi/test/TestClient.pas b/vendor/github.com/apache/thrift/lib/delphi/test/TestClient.pas
index 043ff331b..37d8546dd 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/test/TestClient.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/test/TestClient.pas
@@ -22,7 +22,8 @@ unit TestClient;
{$I ../src/Thrift.Defines.inc}
{.$DEFINE StressTest} // activate to stress-test the server with frequent connects/disconnects
-{.$DEFINE PerfTest} // activate to activate the performance test
+{.$DEFINE PerfTest} // activate the performance test
+{$DEFINE Exceptions} // activate the exceptions test (or disable while debugging)
interface
@@ -258,7 +259,7 @@ begin
if s = 'buffered' then Include( layered, trns_Buffered)
else if s = 'framed' then Include( layered, trns_Framed)
else if s = 'http' then endpoint := trns_Http
- else if s = 'evhttp' then endpoint := trns_AnonPipes
+ else if s = 'evhttp' then endpoint := trns_EvHttp
else InvalidArgs;
end
else if s = '--protocol' then begin
@@ -462,6 +463,7 @@ begin
StressTest( client);
{$ENDIF StressTest}
+ {$IFDEF Exceptions}
// in-depth exception test
// (1) do we get an exception at all?
// (2) do we get the right exception?
@@ -510,6 +512,7 @@ begin
on e:TTransportException do Expect( FALSE, 'Unexpected : "'+e.ToString+'"');
on e:Exception do Expect( FALSE, 'Unexpected exception "'+e.ClassName+'"');
end;
+ {$ENDIF Exceptions}
// simple things
@@ -525,6 +528,9 @@ begin
s := client.testString('Test');
Expect( s = 'Test', 'testString(''Test'') = "'+s+'"');
+ s := client.testString(''); // empty string
+ Expect( s = '', 'testString('''') = "'+s+'"');
+
s := client.testString(HUGE_TEST_STRING);
Expect( length(s) = length(HUGE_TEST_STRING),
'testString( length(HUGE_TEST_STRING) = '+IntToStr(Length(HUGE_TEST_STRING))+') '
@@ -540,6 +546,7 @@ begin
i64 := client.testI64(-34359738368);
Expect( i64 = -34359738368, 'testI64(-34359738368) = ' + IntToStr( i64));
+ // random binary
binOut := PrepareBinaryData( TRUE);
Console.WriteLine('testBinary('+BytesToHex(binOut)+')');
try
@@ -552,6 +559,19 @@ begin
on e:Exception do Expect( FALSE, 'testBinary(): Unexpected exception "'+e.ClassName+'": '+e.Message);
end;
+ // empty binary
+ SetLength( binOut, 0);
+ Console.WriteLine('testBinary('+BytesToHex(binOut)+')');
+ try
+ binIn := client.testBinary(binOut);
+ Expect( Length(binOut) = Length(binIn), 'testBinary(): length '+IntToStr(Length(binOut))+' = '+IntToStr(Length(binIn)));
+ i32 := Min( Length(binOut), Length(binIn));
+ Expect( CompareMem( binOut, binIn, i32), 'testBinary('+BytesToHex(binOut)+') = '+BytesToHex(binIn));
+ except
+ on e:TApplicationException do Console.WriteLine('testBinary(): '+e.Message);
+ on e:Exception do Expect( FALSE, 'testBinary(): Unexpected exception "'+e.ClassName+'": '+e.Message);
+ end;
+
Console.WriteLine('testDouble(5.325098235)');
dub := client.testDouble(5.325098235);
Expect( abs(dub-5.325098235) < 1e-14, 'testDouble(5.325098235) = ' + FloatToStr( dub));
@@ -1037,8 +1057,8 @@ procedure TClientThread.JSONProtocolReadWriteTest;
// other clients or servers expect as the real JSON. This is beyond the scope of this test.
var prot : IProtocol;
stm : TStringStream;
- list : IList;
- binary, binRead : TBytes;
+ list : TThriftList;
+ binary, binRead, emptyBinary : TBytes;
i,iErr : Integer;
const
TEST_SHORT = ShortInt( $FE);
@@ -1061,6 +1081,7 @@ begin
// prepare binary data
binary := PrepareBinaryData( FALSE);
+ SetLength( emptyBinary, 0); // empty binary data block
// output setup
prot := TJSONProtocolImpl.Create(
@@ -1068,7 +1089,8 @@ begin
nil, TThriftStreamAdapterDelphi.Create( stm, FALSE)));
// write
- prot.WriteListBegin( TListImpl.Create( TType.String_, 9));
+ Init( list, TType.String_, 9);
+ prot.WriteListBegin( list);
prot.WriteBool( TRUE);
prot.WriteBool( FALSE);
prot.WriteByte( TEST_SHORT);
@@ -1078,6 +1100,8 @@ begin
prot.WriteDouble( TEST_DOUBLE);
prot.WriteString( TEST_STRING);
prot.WriteBinary( binary);
+ prot.WriteString( ''); // empty string
+ prot.WriteBinary( emptyBinary); // empty binary data block
prot.WriteListEnd;
// input setup
@@ -1100,6 +1124,8 @@ begin
Expect( abs(prot.ReadDouble-TEST_DOUBLE) < abs(DELTA_DOUBLE), 'WriteDouble/ReadDouble');
Expect( prot.ReadString = TEST_STRING, 'WriteString/ReadString');
binRead := prot.ReadBinary;
+ Expect( Length(prot.ReadString) = 0, 'WriteString/ReadString (empty string)');
+ Expect( Length(prot.ReadBinary) = 0, 'empty WriteBinary/ReadBinary (empty data block)');
prot.ReadListEnd;
// test binary data
diff --git a/vendor/github.com/apache/thrift/lib/delphi/test/codegen/ReservedKeywords.thrift b/vendor/github.com/apache/thrift/lib/delphi/test/codegen/ReservedKeywords.thrift
index 300adf96b..8db3ea5d4 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/test/codegen/ReservedKeywords.thrift
+++ b/vendor/github.com/apache/thrift/lib/delphi/test/codegen/ReservedKeywords.thrift
@@ -52,4 +52,49 @@ enum keywords {
}
+struct Struct_lists {
+ 1: list init;
+ 2: list struc;
+ 3: list field;
+ 4: list field_;
+ 5: list tracker;
+ 6: list Self;
+}
+
+struct Struct_structs {
+ 1: Struct_simple init;
+ 2: Struct_simple struc;
+ 3: Struct_simple field;
+ 4: Struct_simple field_;
+ 5: Struct_simple tracker;
+ 6: Struct_simple Self;
+}
+
+struct Struct_simple {
+ 1: bool init;
+ 2: bool struc;
+ 3: bool field;
+ 4: bool field_;
+ 5: bool tracker;
+ 6: bool Self;
+}
+
+struct Struct_strings {
+ 1: string init;
+ 2: string struc;
+ 3: string field;
+ 4: string field_;
+ 5: string tracker;
+ 6: string Self;
+}
+
+struct Struct_binary {
+ 1: binary init;
+ 2: binary struc;
+ 3: binary field;
+ 4: binary field_;
+ 5: binary tracker;
+ 6: binary Self;
+}
+
diff --git a/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.Data.pas b/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.Data.pas
index 30d9dd4cf..5fc0070e8 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.Data.pas
+++ b/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.Data.pas
@@ -22,6 +22,7 @@ unit TestSerializer.Data;
interface
uses
+ SysUtils,
Thrift.Collections,
DebugProtoTest;
@@ -194,7 +195,7 @@ begin
{$IF cDebugProtoTest_Option_AnsiStr_Binary}
result.SetBase64('base64');
{$ELSE}
- not yet impl
+ result.SetBase64( TEncoding.UTF8.GetBytes('base64'));
{$IFEND}
// byte, i16, and i64 lists are populated by default constructor
@@ -338,7 +339,7 @@ begin
{$IF cDebugProtoTest_Option_AnsiStr_Binary}
result.A_binary := AnsiString( #0#1#2#3#4#5#6#7#8);
{$ELSE}
- not yet impl
+ result.A_binary := TEncoding.UTF8.GetBytes( #0#1#2#3#4#5#6#7#8);
{$IFEND}
end;
diff --git a/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.dpr b/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.dpr
index 9e283e5ac..14be502a4 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.dpr
+++ b/vendor/github.com/apache/thrift/lib/delphi/test/serializer/TestSerializer.dpr
@@ -35,6 +35,7 @@ uses
Thrift.Serializer in '..\..\src\Thrift.Serializer.pas',
Thrift.Stream in '..\..\src\Thrift.Stream.pas',
Thrift.TypeRegistry in '..\..\src\Thrift.TypeRegistry.pas',
+ ReservedKeywords,
DebugProtoTest,
TestSerializer.Data;
diff --git a/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version1.dpr b/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version1.dpr
index c7092c9c8..40d025fbf 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version1.dpr
+++ b/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version1.dpr
@@ -44,7 +44,7 @@ const
function CreatePing : IPing;
begin
result := TPingImpl.Create;
- result.Version1 := Skiptest.One.TConstants.SKIPTESTSERVICE_VERSION;
+ result.Version1 := Tskiptest_version_1Constants.SKIPTESTSERVICE_VERSION;
end;
@@ -179,7 +179,7 @@ const
FILE_JSON = 'pingpong.json';
begin
try
- Writeln( 'Delphi SkipTest '+IntToStr(TConstants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
+ Writeln( 'Delphi SkipTest '+IntToStr(Tskiptest_version_1Constants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
Writeln;
Writeln('Binary protocol');
diff --git a/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version2.dpr b/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version2.dpr
index e99e62e7f..9cb6ff613 100644
--- a/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version2.dpr
+++ b/vendor/github.com/apache/thrift/lib/delphi/test/skip/skiptest_version2.dpr
@@ -45,7 +45,7 @@ var list : IThriftList;
set_ : IHashSet;
begin
result := TPingImpl.Create;
- result.Version1 := Skiptest.Two.TConstants.SKIPTESTSERVICE_VERSION;
+ result.Version1 := Tskiptest_version_2Constants.SKIPTESTSERVICE_VERSION;
result.BoolVal := TRUE;
result.ByteVal := 2;
result.DbVal := 3;
@@ -206,7 +206,7 @@ const
FILE_JSON = 'pingpong.json';
begin
try
- Writeln( 'Delphi SkipTest '+IntToStr(TConstants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
+ Writeln( 'Delphi SkipTest '+IntToStr(Tskiptest_version_2Constants.SKIPTESTSERVICE_VERSION)+' using '+Thrift.Version);
Writeln;
Writeln('Binary protocol');
diff --git a/vendor/github.com/apache/thrift/lib/erl/coding_standards.md b/vendor/github.com/apache/thrift/lib/erl/coding_standards.md
index fa0390bb5..4d37dbcc6 100644
--- a/vendor/github.com/apache/thrift/lib/erl/coding_standards.md
+++ b/vendor/github.com/apache/thrift/lib/erl/coding_standards.md
@@ -1 +1,3 @@
Please follow [General Coding Standards](/doc/coding_standards.md)
+
+Particularly for Erlang please follow the Erlang [Programming Rules and Conventions](http://www.erlang.se/doc/programming_rules.shtml).
diff --git a/vendor/github.com/apache/thrift/lib/erl/src/thrift_reconnecting_client.erl b/vendor/github.com/apache/thrift/lib/erl/src/thrift_reconnecting_client.erl
index 468c38b48..538fd3ad1 100644
--- a/vendor/github.com/apache/thrift/lib/erl/src/thrift_reconnecting_client.erl
+++ b/vendor/github.com/apache/thrift/lib/erl/src/thrift_reconnecting_client.erl
@@ -36,7 +36,7 @@
terminate/2,
code_change/3 ]).
--record( state, { client = nil,
+-record( state, { client = nil,
host,
port,
thrift_svc,
@@ -226,9 +226,9 @@ timer_fun() ->
end.
-else.
timer_fun() ->
- T1 = erlang:now(),
+ T1 = erlang:timestamp(),
fun() ->
- T2 = erlang:now(),
+ T2 = erlang:timestamp(),
timer:now_diff(T2, T1)
end.
-endif.
diff --git a/vendor/github.com/apache/thrift/lib/go/test/Makefile.am b/vendor/github.com/apache/thrift/lib/go/test/Makefile.am
index a3bc9e062..5531e070c 100644
--- a/vendor/github.com/apache/thrift/lib/go/test/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/go/test/Makefile.am
@@ -21,7 +21,6 @@ if GOVERSION_LT_17
COMPILER_EXTRAFLAG=",legacy_context"
endif
-THRIFT = $(top_builddir)/compiler/cpp/thrift
THRIFTARGS = -out gopath/src/ --gen go:thrift_import=thrift$(COMPILER_EXTRAFLAG)
THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go
index 6655cc5a9..525bce22b 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception.go
@@ -30,6 +30,17 @@ const (
PROTOCOL_ERROR = 7
)
+var defaultApplicationExceptionMessage = map[int32]string{
+ UNKNOWN_APPLICATION_EXCEPTION: "unknown application exception",
+ UNKNOWN_METHOD: "unknown method",
+ INVALID_MESSAGE_TYPE_EXCEPTION: "invalid message type",
+ WRONG_METHOD_NAME: "wrong method name",
+ BAD_SEQUENCE_ID: "bad sequence ID",
+ MISSING_RESULT: "missing result",
+ INTERNAL_ERROR: "unknown internal error",
+ PROTOCOL_ERROR: "unknown protocol error",
+}
+
// Application level Thrift exception
type TApplicationException interface {
TException
@@ -44,7 +55,10 @@ type tApplicationException struct {
}
func (e tApplicationException) Error() string {
- return e.message
+ if e.message != "" {
+ return e.message
+ }
+ return defaultApplicationExceptionMessage[e.type_]
}
func NewTApplicationException(type_ int32, message string) TApplicationException {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go
index 7010f868f..b2687a6c8 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/application_exception_test.go
@@ -25,7 +25,7 @@ import (
func TestTApplicationException(t *testing.T) {
exc := NewTApplicationException(UNKNOWN_APPLICATION_EXCEPTION, "")
- if exc.Error() != "" {
+ if exc.Error() != defaultApplicationExceptionMessage[UNKNOWN_APPLICATION_EXCEPTION] {
t.Fatalf("Expected empty string for exception but found '%s'", exc.Error())
}
if exc.TypeId() != UNKNOWN_APPLICATION_EXCEPTION {
diff --git a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go
index 8272703cf..c3bd72cc4 100644
--- a/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go
+++ b/vendor/github.com/apache/thrift/lib/go/thrift/ssl_socket.go
@@ -90,7 +90,8 @@ func (p *TSSLSocket) Open() error {
// If we have a hostname, we need to pass the hostname to tls.Dial for
// certificate hostname checks.
if p.hostPort != "" {
- if p.conn, err = tls.Dial("tcp", p.hostPort, p.cfg); err != nil {
+ if p.conn, err = tls.DialWithDialer(&net.Dialer{
+ Timeout: p.timeout}, "tcp", p.hostPort, p.cfg); err != nil {
return NewTTransportException(NOT_OPEN, err.Error())
}
} else {
@@ -106,7 +107,8 @@ func (p *TSSLSocket) Open() error {
if len(p.addr.String()) == 0 {
return NewTTransportException(NOT_OPEN, "Cannot open bad address.")
}
- if p.conn, err = tls.Dial(p.addr.Network(), p.addr.String(), p.cfg); err != nil {
+ if p.conn, err = tls.DialWithDialer(&net.Dialer{
+ Timeout: p.timeout}, p.addr.Network(), p.addr.String(), p.cfg); err != nil {
return NewTTransportException(NOT_OPEN, err.Error())
}
}
diff --git a/vendor/github.com/apache/thrift/lib/haxe/test/Makefile.am b/vendor/github.com/apache/thrift/lib/haxe/test/Makefile.am
index 5c638d4aa..2b8b24524 100644
--- a/vendor/github.com/apache/thrift/lib/haxe/test/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/haxe/test/Makefile.am
@@ -17,7 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
THRIFTCMD = $(THRIFT) --gen haxe -r
THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
AGGR = $(top_srcdir)/contrib/async-test/aggr.thrift
diff --git a/vendor/github.com/apache/thrift/lib/hs/thrift.cabal b/vendor/github.com/apache/thrift/lib/hs/thrift.cabal
index f919127a2..fb33d9a41 100644
--- a/vendor/github.com/apache/thrift/lib/hs/thrift.cabal
+++ b/vendor/github.com/apache/thrift/lib/hs/thrift.cabal
@@ -40,7 +40,7 @@ Library
Hs-Source-Dirs:
src
Build-Depends:
- base >= 4, base < 5, containers, ghc-prim, attoparsec, binary, bytestring >= 0.10, base64-bytestring, hashable, HTTP, text, hspec-core < 2.4.0, unordered-containers >= 0.2.6, vector >= 0.10.12.2, QuickCheck >= 2.8.2, split
+ base >= 4, base < 5, containers, ghc-prim, attoparsec, binary, bytestring >= 0.10, base64-bytestring, hashable, HTTP, text, hspec-core > 2.4.0, unordered-containers >= 0.2.6, vector >= 0.10.12.2, QuickCheck >= 2.8.2, split
if flag(network-uri)
build-depends: network-uri >= 2.6, network >= 2.6
else
diff --git a/vendor/github.com/apache/thrift/lib/java/Makefile.am b/vendor/github.com/apache/thrift/lib/java/Makefile.am
index ab130f563..1c867ae67 100644
--- a/vendor/github.com/apache/thrift/lib/java/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/java/Makefile.am
@@ -19,8 +19,6 @@
export CLASSPATH
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
all-local:
$(ANT) $(ANT_FLAGS)
diff --git a/vendor/github.com/apache/thrift/lib/java/src/org/apache/thrift/transport/TByteBuffer.java b/vendor/github.com/apache/thrift/lib/java/src/org/apache/thrift/transport/TByteBuffer.java
index a09f33da8..b6b065748 100644
--- a/vendor/github.com/apache/thrift/lib/java/src/org/apache/thrift/transport/TByteBuffer.java
+++ b/vendor/github.com/apache/thrift/lib/java/src/org/apache/thrift/transport/TByteBuffer.java
@@ -35,7 +35,7 @@ public final class TByteBuffer extends TTransport {
final int n = Math.min(byteBuffer.remaining(), len);
if (n > 0) {
try {
- byteBuffer.get(buf, off, len);
+ byteBuffer.get(buf, off, n);
} catch (BufferUnderflowException e) {
throw new TTransportException("Unexpected end of input buffer", e);
}
diff --git a/vendor/github.com/apache/thrift/lib/nodejs/Makefile.am b/vendor/github.com/apache/thrift/lib/nodejs/Makefile.am
index 6d785bec8..a3424d074 100755
--- a/vendor/github.com/apache/thrift/lib/nodejs/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/nodejs/Makefile.am
@@ -16,8 +16,6 @@
# under the License.
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
stubs: $(top_srcdir)/test/ThriftTest.thrift
$(THRIFT) --gen js:node -o test/ $(top_srcdir)/test/ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/lib/php/test/Makefile.am b/vendor/github.com/apache/thrift/lib/php/test/Makefile.am
index d966246fe..c872b1aa1 100755
--- a/vendor/github.com/apache/thrift/lib/php/test/Makefile.am
+++ b/vendor/github.com/apache/thrift/lib/php/test/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
stubs: ../../../test/ThriftTest.thrift TestValidators.thrift
mkdir -p ./packages
$(THRIFT) --gen php -r --out ./packages ../../../test/ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/c_glib/Makefile.am b/vendor/github.com/apache/thrift/test/c_glib/Makefile.am
index 4f9a119f0..0c478f947 100755
--- a/vendor/github.com/apache/thrift/test/c_glib/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/c_glib/Makefile.am
@@ -54,8 +54,6 @@ test_server_LDADD = \
#
# Common thrift code generation rules
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-c_glib/t_test_second_service.c gen-c_glib/t_test_second_service.h gen-c_glib/t_test_thrift_test.c gen-c_glib/t_test_thrift_test.h gen-c_glib/t_test_thrift_test_types.c gen-c_glib/t_test_thrift_test_types.h: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen c_glib -r $<
diff --git a/vendor/github.com/apache/thrift/test/cpp/Makefile.am b/vendor/github.com/apache/thrift/test/cpp/Makefile.am
index e2c21f5dd..359e7e6dd 100755
--- a/vendor/github.com/apache/thrift/test/cpp/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/cpp/Makefile.am
@@ -98,8 +98,6 @@ StressTestNonBlocking_LDADD = \
#
# Common thrift code generation rules
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-cpp/ThriftTest.cpp gen-cpp/ThriftTest_types.cpp gen-cpp/ThriftTest_constants.cpp: $(top_srcdir)/test/ThriftTest.thrift $(THRIFT)
$(THRIFT) --gen cpp:templates,cob_style -r $<
diff --git a/vendor/github.com/apache/thrift/test/dart/Makefile.am b/vendor/github.com/apache/thrift/test/dart/Makefile.am
index e2747712b..9750ec236 100644
--- a/vendor/github.com/apache/thrift/test/dart/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/dart/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-dart/thrift_test/lib/thrift_test.dart: ../ThriftTest.thrift
$(THRIFT) --gen dart ../ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/erl/Makefile.am b/vendor/github.com/apache/thrift/test/erl/Makefile.am
index be8b4f54f..ff25e89f9 100644
--- a/vendor/github.com/apache/thrift/test/erl/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/erl/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
THRIFT_FILES = $(wildcard ../*.thrift)
if ERLANG_OTP16
diff --git a/vendor/github.com/apache/thrift/test/erl/src/test_client.erl b/vendor/github.com/apache/thrift/test/erl/src/test_client.erl
index c916cee71..9bad59229 100644
--- a/vendor/github.com/apache/thrift/test/erl/src/test_client.erl
+++ b/vendor/github.com/apache/thrift/test/erl/src/test_client.erl
@@ -160,12 +160,11 @@ start(Args) ->
ClientS4
end,
- %% Use deprecated erlang:now until we start requiring OTP18
%% Started = erlang:monotonic_time(milli_seconds),
- {_, StartSec, StartUSec} = erlang:now(),
+ {_, StartSec, StartUSec} = erlang:timestamp(),
error_logger:info_msg("testOneway"),
{Client20, {ok, ok}} = thrift_client:call(Client19, testOneway, [1]),
- {_, EndSec, EndUSec} = erlang:now(),
+ {_, EndSec, EndUSec} = erlang:timestamp(),
Elapsed = (EndSec - StartSec) * 1000 + (EndUSec - StartUSec) / 1000,
if
Elapsed > 1000 -> exit(1);
diff --git a/vendor/github.com/apache/thrift/test/go/Makefile.am b/vendor/github.com/apache/thrift/test/go/Makefile.am
index ce711f664..1438d4464 100644
--- a/vendor/github.com/apache/thrift/test/go/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/go/Makefile.am
@@ -22,7 +22,6 @@ if GOVERSION_LT_17
COMPILER_EXTRAFLAG=",legacy_context"
endif
-THRIFT = $(top_builddir)/compiler/cpp/thrift
THRIFTCMD = $(THRIFT) -out src/gen --gen go:thrift_import=thrift$(COMPILER_EXTRAFLAG)
THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/haxe/Makefile.am b/vendor/github.com/apache/thrift/test/haxe/Makefile.am
index 1a32185ec..4edaa30e5 100644
--- a/vendor/github.com/apache/thrift/test/haxe/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/haxe/Makefile.am
@@ -17,7 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
THRIFTCMD = $(THRIFT) --gen haxe -r
THRIFTTEST = $(top_srcdir)/test/ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/hs/Makefile.am b/vendor/github.com/apache/thrift/test/hs/Makefile.am
index 3f353966e..17489068c 100644
--- a/vendor/github.com/apache/thrift/test/hs/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/hs/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
stubs: $(THRIFT) ../ConstantsDemo.thrift ../DebugProtoTest.thrift ../ThriftTest.thrift ../Include.thrift
$(THRIFT) --gen hs ../ConstantsDemo.thrift
$(THRIFT) --gen hs ../DebugProtoTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/known_failures_Linux.json b/vendor/github.com/apache/thrift/test/known_failures_Linux.json
index efa0f5607..0a5953af6 100644
--- a/vendor/github.com/apache/thrift/test/known_failures_Linux.json
+++ b/vendor/github.com/apache/thrift/test/known_failures_Linux.json
@@ -2,22 +2,15 @@
"cpp-cpp_binary_buffered-ip-ssl",
"cpp-cpp_binary_framed-ip-ssl",
"cpp-cpp_binary_http-domain",
- "cpp-cpp_binary_http-ip",
"cpp-cpp_binary_http-ip-ssl",
"cpp-cpp_compact_buffered-ip-ssl",
"cpp-cpp_compact_framed-ip-ssl",
- "cpp-cpp_compact_http-domain",
- "cpp-cpp_compact_http-ip",
"cpp-cpp_compact_http-ip-ssl",
"cpp-cpp_header_buffered-ip-ssl",
"cpp-cpp_header_framed-ip-ssl",
- "cpp-cpp_header_http-domain",
"cpp-cpp_header_http-ip-ssl",
"cpp-cpp_json_buffered-ip-ssl",
- "cpp-cpp_json_framed-ip",
"cpp-cpp_json_framed-ip-ssl",
- "cpp-cpp_json_http-domain",
- "cpp-cpp_json_http-ip",
"cpp-cpp_json_http-ip-ssl",
"cpp-dart_binary_http-ip",
"cpp-dart_compact_http-ip",
@@ -34,60 +27,16 @@
"cpp-java_compact_http-ip-ssl",
"cpp-java_json_http-ip",
"cpp-java_json_http-ip-ssl",
- "csharp-c_glib_binary_buffered-ip-ssl",
- "csharp-c_glib_binary_framed-ip-ssl",
- "csharp-c_glib_compact_buffered-ip-ssl",
- "csharp-c_glib_compact_framed-ip-ssl",
- "csharp-cpp_binary_buffered-ip-ssl",
- "csharp-cpp_binary_framed-ip-ssl",
- "csharp-cpp_compact_buffered-ip-ssl",
- "csharp-cpp_compact_framed-ip-ssl",
- "csharp-cpp_json_buffered-ip-ssl",
- "csharp-cpp_json_framed-ip-ssl",
"csharp-d_binary_buffered-ip-ssl",
- "csharp-d_compact_buffered-ip-ssl",
- "csharp-d_json_buffered-ip-ssl",
"csharp-d_binary_framed-ip-ssl",
+ "csharp-d_compact_buffered-ip-ssl",
"csharp-d_compact_framed-ip-ssl",
+ "csharp-d_json_buffered-ip-ssl",
"csharp-d_json_framed-ip-ssl",
"csharp-erl_binary_buffered-ip-ssl",
"csharp-erl_binary_framed-ip-ssl",
"csharp-erl_compact_buffered-ip-ssl",
"csharp-erl_compact_framed-ip-ssl",
- "csharp-go_binary_buffered-ip-ssl",
- "csharp-go_binary_framed-ip-ssl",
- "csharp-go_compact_buffered-ip-ssl",
- "csharp-go_compact_framed-ip-ssl",
- "csharp-go_json_buffered-ip-ssl",
- "csharp-go_json_framed-ip-ssl",
- "csharp-nodejs_binary_buffered-ip-ssl",
- "csharp-nodejs_binary_framed-ip-ssl",
- "csharp-nodejs_compact_buffered-ip-ssl",
- "csharp-nodejs_compact_framed-ip-ssl",
- "csharp-nodejs_json_buffered-ip-ssl",
- "csharp-nodejs_json_framed-ip-ssl",
- "csharp-perl_binary_buffered-ip-ssl",
- "csharp-perl_binary_framed-ip-ssl",
- "csharp-py3_binary-accel_buffered-ip-ssl",
- "csharp-py3_binary-accel_framed-ip-ssl",
- "csharp-py3_binary_buffered-ip-ssl",
- "csharp-py3_binary_framed-ip-ssl",
- "csharp-py3_compact-accelc_buffered-ip-ssl",
- "csharp-py3_compact-accelc_framed-ip-ssl",
- "csharp-py3_compact_buffered-ip-ssl",
- "csharp-py3_compact_framed-ip-ssl",
- "csharp-py3_json_buffered-ip-ssl",
- "csharp-py3_json_framed-ip-ssl",
- "csharp-py_binary-accel_buffered-ip-ssl",
- "csharp-py_binary-accel_framed-ip-ssl",
- "csharp-py_binary_buffered-ip-ssl",
- "csharp-py_binary_framed-ip-ssl",
- "csharp-py_compact-accelc_buffered-ip-ssl",
- "csharp-py_compact-accelc_framed-ip-ssl",
- "csharp-py_compact_buffered-ip-ssl",
- "csharp-py_compact_framed-ip-ssl",
- "csharp-py_json_buffered-ip-ssl",
- "csharp-py_json_framed-ip-ssl",
"d-cpp_binary_buffered-ip",
"d-cpp_binary_buffered-ip-ssl",
"d-cpp_binary_framed-ip",
@@ -202,10 +151,8 @@
"go-d_compact_http-ip-ssl",
"go-d_json_http-ip",
"go-d_json_http-ip-ssl",
- "go-dart_binary_framed-ip",
"go-dart_binary_http-ip",
"go-dart_compact_http-ip",
- "go-dart_json_framed-ip",
"go-dart_json_http-ip",
"go-java_binary_http-ip",
"go-java_binary_http-ip-ssl",
@@ -214,17 +161,12 @@
"go-java_json_http-ip",
"go-java_json_http-ip-ssl",
"go-nodejs_json_framed-ip",
- "hs-csharp_binary_framed-ip",
- "hs-csharp_compact_framed-ip",
- "hs-csharp_json_framed-ip",
"hs-dart_binary_framed-ip",
"hs-dart_compact_framed-ip",
"hs-dart_json_framed-ip",
- "hs-py3_json_buffered-ip",
- "hs-py3_json_framed-ip",
"java-d_compact_buffered-ip",
"java-d_compact_buffered-ip-ssl",
"java-d_compact_framed-ip",
"rs-dart_binary_framed-ip",
"rs-dart_compact_framed-ip"
-]
+]
\ No newline at end of file
diff --git a/vendor/github.com/apache/thrift/test/perl/Makefile.am b/vendor/github.com/apache/thrift/test/perl/Makefile.am
index d975f693c..165b9a7d0 100644
--- a/vendor/github.com/apache/thrift/test/perl/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/perl/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
stubs: ../ThriftTest.thrift
$(THRIFT) --gen perl ../ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/php/Makefile.am b/vendor/github.com/apache/thrift/test/php/Makefile.am
index 7c4347ff1..ea6eaf3a9 100755
--- a/vendor/github.com/apache/thrift/test/php/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/php/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
stubs: ../ThriftTest.thrift
$(THRIFT) --gen php ../ThriftTest.thrift
$(THRIFT) --gen php:inlined ../ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/py.twisted/Makefile.am b/vendor/github.com/apache/thrift/test/py.twisted/Makefile.am
index 78cde22ba..d11908cc0 100644
--- a/vendor/github.com/apache/thrift/test/py.twisted/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/py.twisted/Makefile.am
@@ -17,7 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
TRIAL ?= trial
stubs: ../ThriftTest.thrift ../SmallTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/py/Makefile.am b/vendor/github.com/apache/thrift/test/py/Makefile.am
index 53c1e634b..b3513dd7e 100644
--- a/vendor/github.com/apache/thrift/test/py/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/py/Makefile.am
@@ -18,8 +18,6 @@
#
AUTOMAKE_OPTIONS = serial-tests
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
py_unit_tests = RunClientServer.py
thrift_gen = \
diff --git a/vendor/github.com/apache/thrift/test/rb/Makefile.am b/vendor/github.com/apache/thrift/test/rb/Makefile.am
index 7b74c6c87..4bd470481 100644
--- a/vendor/github.com/apache/thrift/test/rb/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/rb/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
stubs: $(THRIFT) ../ThriftTest.thrift ../SmallTest.thrift
$(THRIFT) --gen rb ../ThriftTest.thrift
$(THRIFT) --gen rb ../SmallTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/rs/Makefile.am b/vendor/github.com/apache/thrift/test/rs/Makefile.am
index 1a409b8a8..54905b4ef 100644
--- a/vendor/github.com/apache/thrift/test/rs/Makefile.am
+++ b/vendor/github.com/apache/thrift/test/rs/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
stubs: ../ThriftTest.thrift
$(THRIFT) -I ./thrifts -out src --gen rs ../ThriftTest.thrift
diff --git a/vendor/github.com/apache/thrift/test/valgrind.suppress b/vendor/github.com/apache/thrift/test/valgrind.suppress
index 41f9414e6..de17cb8d8 100644
--- a/vendor/github.com/apache/thrift/test/valgrind.suppress
+++ b/vendor/github.com/apache/thrift/test/valgrind.suppress
@@ -5,5 +5,49 @@
fun:malloc
fun:_ZN5boost6detail25get_once_per_thread_epochEv
}
+{
+ boostthreads/once/ignore
+ Helgrind:Race
+ fun:_ZN5boost13thread_detail17enter_once_regionERNS_9once_flagE
+ fun:_ZN5boost6detail23get_current_thread_dataEv
+ fun:_ZN5boost6detail20interruption_checkerC1EP15pthread_mutex_tP14pthread_cond_t
+ fun:_ZN5boost22condition_variable_any4waitINS_11unique_lockINS_11timed_mutexEEEEEvRT_
+ fun:_ZN6apache6thrift11concurrency7Monitor4Impl11waitForeverEv
+ fun:_ZN6apache6thrift11concurrency7Monitor4Impl19waitForTimeRelativeEl
+ fun:_ZN6apache6thrift11concurrency7Monitor4Impl4waitEl
+ fun:_ZNK6apache6thrift11concurrency7Monitor4waitEl
+ fun:_ZN6apache6thrift11concurrency11BoostThread5startEv
+ fun:_ZN6apache6thrift11concurrency4test18ThreadFactoryTests12reapNThreadsEii
+ fun:main
+}
+{
+ pthread/creation-tls/ignore
+ Helgrind:Race
+ fun:mempcpy
+ fun:_dl_allocate_tls_init
+ fun:get_cached_stack
+ fun:allocate_stack
+ fun:pthread_create@@GLIBC_2.2*
+ obj:/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so
+ fun:_ZN6apache6thrift11concurrency13PthreadThread5startEv
+ fun:_ZN6apache6thrift11concurrency4test18ThreadFactoryTests12reapNThreadsEii
+ fun:main
+}
+{
+ boost-thread/creation-tls/ignore
+ Helgrind:Race
+ fun:mempcpy
+ fun:_dl_allocate_tls_init
+ fun:get_cached_stack
+ fun:allocate_stack
+ fun:pthread_create@@GLIBC_2.2.5
+ obj:/usr/lib/valgrind/vgpreload_helgrind-amd64-linux.so
+ fun:_ZN5boost6thread21start_thread_noexceptEv
+ fun:_ZN5boost6thread12start_threadEv
+ fun:_ZN5boost6threadC1ISt5_BindIFPFPvS3_ES3_EEEEOT_
+ fun:_ZN6apache6thrift11concurrency11BoostThread5startEv
+ fun:_ZN6apache6thrift11concurrency4test18ThreadFactoryTests12reapNThreadsEii
+ fun:main
+}
diff --git a/vendor/github.com/apache/thrift/tutorial/c_glib/Makefile.am b/vendor/github.com/apache/thrift/tutorial/c_glib/Makefile.am
index 15a9995df..4dbe655ef 100755
--- a/vendor/github.com/apache/thrift/tutorial/c_glib/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/c_glib/Makefile.am
@@ -28,8 +28,6 @@ AM_CFLAGS = -g -Wall -Wextra -pedantic $(GLIB_CFLAGS) $(GOBJECT_CFLAGS) $(OPENSS
AM_CPPFLAGS = -I$(top_srcdir)/lib/c_glib/src -Igen-c_glib
AM_LDFLAGS = $(GLIB_LIBS) $(GOBJECT_LIBS) $(OPENSSL_LDFLAGS) $(OPENSSL_LIBS) @GCOV_LDFLAGS@
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
noinst_LTLIBRARIES = \
libtutorialgencglib.la
diff --git a/vendor/github.com/apache/thrift/tutorial/cpp/Makefile.am b/vendor/github.com/apache/thrift/tutorial/cpp/Makefile.am
index 184a69d63..49cf3be97 100755
--- a/vendor/github.com/apache/thrift/tutorial/cpp/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/cpp/Makefile.am
@@ -61,8 +61,6 @@ TutorialClient_LDADD = \
#
# Common thrift code generation rules
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-cpp/Calculator.cpp gen-cpp/SharedService.cpp gen-cpp/shared_constants.cpp gen-cpp/shared_types.cpp gen-cpp/tutorial_constants.cpp gen-cpp/tutorial_types.cpp: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen cpp -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/dart/Makefile.am b/vendor/github.com/apache/thrift/tutorial/dart/Makefile.am
index 438e45738..2e8cd342d 100644
--- a/vendor/github.com/apache/thrift/tutorial/dart/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/dart/Makefile.am
@@ -19,8 +19,6 @@
BUILT_SOURCES = gen-dart/tutorial/lib/tutorial.dart gen-dart/shared/lib/shared.dart
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-dart/tutorial/lib/tutorial.dart gen-dart/shared/lib/shared.dart: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen dart -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/erl/client.erl b/vendor/github.com/apache/thrift/tutorial/erl/client.erl
index 5d40916b6..77763a2a1 100644
--- a/vendor/github.com/apache/thrift/tutorial/erl/client.erl
+++ b/vendor/github.com/apache/thrift/tutorial/erl/client.erl
@@ -44,7 +44,7 @@ t() ->
{Client3, {ok, Sum1}} = thrift_client:call(Client2, add, [1, 4]),
io:format("1+4=~p~n", [Sum1]),
- Work = #work{op=?tutorial_Operation_SUBTRACT,
+ Work = #'Work'{op=?TUTORIAL_OPERATION_SUBTRACT,
num1=15,
num2=10},
{Client4, {ok, Diff}} = thrift_client:call(Client3, calculate, [1, Work]),
@@ -55,7 +55,7 @@ t() ->
Client6 =
try
- Work1 = #work{op=?tutorial_Operation_DIVIDE,
+ Work1 = #'Work'{op=?TUTORIAL_OPERATION_DIVIDE,
num1=1,
num2=0},
{ClientS1, {ok, _Quot}} = thrift_client:call(Client5, calculate, [2, Work1]),
diff --git a/vendor/github.com/apache/thrift/tutorial/erl/json_client.erl b/vendor/github.com/apache/thrift/tutorial/erl/json_client.erl
index 312b01e2a..0b39ceda9 100644
--- a/vendor/github.com/apache/thrift/tutorial/erl/json_client.erl
+++ b/vendor/github.com/apache/thrift/tutorial/erl/json_client.erl
@@ -55,7 +55,7 @@ t() ->
{Client3, {ok, Sum1}} = thrift_client:call(Client2, add, [1, 4]),
io:format("1+4=~p~n", [Sum1]),
- Work = #work{op=?tutorial_Operation_SUBTRACT,
+ Work = #'Work'{op=?TUTORIAL_OPERATION_SUBTRACT,
num1=15,
num2=10},
{Client4, {ok, Diff}} = thrift_client:call(Client3, calculate, [1, Work]),
@@ -66,7 +66,7 @@ t() ->
Client6 =
try
- Work1 = #work{op=?tutorial_Operation_DIVIDE,
+ Work1 = #'Work'{op=?TUTORIAL_OPERATION_DIVIDE,
num1=1,
num2=0},
{ClientS1, {ok, _Quot}} = thrift_client:call(Client5, calculate, [2, Work1]),
diff --git a/vendor/github.com/apache/thrift/tutorial/erl/server.erl b/vendor/github.com/apache/thrift/tutorial/erl/server.erl
index f1e735764..b877f5e55 100644
--- a/vendor/github.com/apache/thrift/tutorial/erl/server.erl
+++ b/vendor/github.com/apache/thrift/tutorial/erl/server.erl
@@ -36,25 +36,25 @@ add(N1, N2) ->
N1+N2.
calculate(Logid, Work) ->
- { Op, Num1, Num2 } = { Work#work.op, Work#work.num1, Work#work.num2 },
+ { Op, Num1, Num2 } = { Work#'Work'.op, Work#'Work'.num1, Work#'Work'.num2 },
debug("calculate(~p, {~p,~p,~p})", [Logid, Op, Num1, Num2]),
case Op of
- ?tutorial_Operation_ADD -> Num1 + Num2;
- ?tutorial_Operation_SUBTRACT -> Num1 - Num2;
- ?tutorial_Operation_MULTIPLY -> Num1 * Num2;
+ ?TUTORIAL_OPERATION_ADD -> Num1 + Num2;
+ ?TUTORIAL_OPERATION_SUBTRACT -> Num1 - Num2;
+ ?TUTORIAL_OPERATION_MULTIPLY -> Num1 * Num2;
- ?tutorial_Operation_DIVIDE when Num2 == 0 ->
- throw(#invalidOperation{whatOp=Op, why="Cannot divide by 0"});
- ?tutorial_Operation_DIVIDE ->
+ ?TUTORIAL_OPERATION_DIVIDE when Num2 == 0 ->
+ throw(#'InvalidOperation'{whatOp=Op, why="Cannot divide by 0"});
+ ?TUTORIAL_OPERATION_DIVIDE ->
Num1 div Num2;
_Else ->
- throw(#invalidOperation{whatOp=Op, why="Invalid operation"})
+ throw(#'InvalidOperation'{whatOp=Op, why="Invalid operation"})
end.
getStruct(Key) ->
debug("getStruct(~p)", [Key]),
- #sharedStruct{key=Key, value="RARG"}.
+ #'SharedStruct'{key=Key, value="RARG"}.
zip() ->
debug("zip", []),
diff --git a/vendor/github.com/apache/thrift/tutorial/go/Makefile.am b/vendor/github.com/apache/thrift/tutorial/go/Makefile.am
index b6ad9a529..30662f536 100644
--- a/vendor/github.com/apache/thrift/tutorial/go/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/go/Makefile.am
@@ -21,8 +21,6 @@ if GOVERSION_LT_17
COMPILER_EXTRAFLAG=":legacy_context"
endif
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-go/tutorial/calculator.go gen-go/shared/shared_service.go: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen go$(COMPILER_EXTRAFLAG) -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/haxe/Makefile.am b/vendor/github.com/apache/thrift/tutorial/haxe/Makefile.am
index e9c88204c..13ac48dac 100644
--- a/vendor/github.com/apache/thrift/tutorial/haxe/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/haxe/Makefile.am
@@ -17,13 +17,10 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
BIN_CPP = bin/Main-debug
BIN_PHP = bin/php/Main-debug.php
BIN_PHP_WEB = bin/php-web-server/Main-debug.php
-
gen-haxe/tutorial/calculator.hx gen-haxe/shared/shared_service.hx: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen haxe -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/nodejs/Makefile.am b/vendor/github.com/apache/thrift/tutorial/nodejs/Makefile.am
index ecf3b2bae..1516fec2c 100644
--- a/vendor/github.com/apache/thrift/tutorial/nodejs/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/nodejs/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-nodejs/Calculator.js gen-nodejs/SharedService.js: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen js:node -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/py.tornado/Makefile.am b/vendor/github.com/apache/thrift/tutorial/py.tornado/Makefile.am
index 6ac60234c..4b73c1e72 100755
--- a/vendor/github.com/apache/thrift/tutorial/py.tornado/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/py.tornado/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-py.tornado/tutorial/Calculator.py gen-py.tornado/shared/SharedService.py: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen py:tornado -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/py.twisted/Makefile.am b/vendor/github.com/apache/thrift/tutorial/py.twisted/Makefile.am
index c6cbd45e3..50cd3429d 100755
--- a/vendor/github.com/apache/thrift/tutorial/py.twisted/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/py.twisted/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-py/tutorial/Calculator.py gen-py/shared/SharedService.py: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen py:twisted -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/py/Makefile.am b/vendor/github.com/apache/thrift/tutorial/py/Makefile.am
index d891640a9..7db816d3b 100755
--- a/vendor/github.com/apache/thrift/tutorial/py/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/py/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-py/tutorial/Calculator.py gen-py/shared/SharedService.py: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen py -r $<
diff --git a/vendor/github.com/apache/thrift/tutorial/rb/Makefile.am b/vendor/github.com/apache/thrift/tutorial/rb/Makefile.am
index 369e903a0..937241367 100755
--- a/vendor/github.com/apache/thrift/tutorial/rb/Makefile.am
+++ b/vendor/github.com/apache/thrift/tutorial/rb/Makefile.am
@@ -17,8 +17,6 @@
# under the License.
#
-THRIFT = $(top_builddir)/compiler/cpp/thrift
-
gen-py/calculator.rb gen-py/shared_service.rb: $(top_srcdir)/tutorial/tutorial.thrift
$(THRIFT) --gen rb -r $<
diff --git a/vendor/github.com/asaskevich/govalidator/validator.go b/vendor/github.com/asaskevich/govalidator/validator.go
index b699e4449..1ff1529a8 100644
--- a/vendor/github.com/asaskevich/govalidator/validator.go
+++ b/vendor/github.com/asaskevich/govalidator/validator.go
@@ -595,7 +595,7 @@ func ValidateStruct(s interface{}) (bool, error) {
continue // Private field
}
structResult := true
- if valueField.Kind() == reflect.Struct && typeField.Tag.Get(tagName) != "-" {
+ if valueField.Kind() == reflect.Struct {
var err error
structResult, err = ValidateStruct(valueField.Interface())
if err != nil {
diff --git a/vendor/github.com/boltdb/bolt/README.md b/vendor/github.com/boltdb/bolt/README.md
index 7d43a15b2..fc2a1e048 100644
--- a/vendor/github.com/boltdb/bolt/README.md
+++ b/vendor/github.com/boltdb/bolt/README.md
@@ -21,6 +21,25 @@ consistency and thread safety. Bolt is currently used in high-load production
environments serving databases as large as 1TB. Many companies such as
Shopify and Heroku use Bolt-backed services every day.
+## A message from the author
+
+> The original goal of Bolt was to provide a simple pure Go key/value store and to
+> not bloat the code with extraneous features. To that end, the project has been
+> a success. However, this limited scope also means that the project is complete.
+>
+> Maintaining an open source database requires an immense amount of time and energy.
+> Changes to the code can have unintended and sometimes catastrophic effects so
+> even simple changes require hours and hours of careful testing and validation.
+>
+> Unfortunately I no longer have the time or energy to continue this work. Bolt is
+> in a stable state and has years of successful production use. As such, I feel that
+> leaving it in its current state is the most prudent course of action.
+>
+> If you are interested in using a more featureful version of Bolt, I suggest that
+> you look at the CoreOS fork called [bbolt](https://github.com/coreos/bbolt).
+
+- Ben Johnson ([@benbjohnson](https://twitter.com/benbjohnson))
+
## Table of Contents
- [Getting Started](#getting-started)
diff --git a/vendor/github.com/cenkalti/backoff/.travis.yml b/vendor/github.com/cenkalti/backoff/.travis.yml
index 1040404bf..d6f85ad6e 100644
--- a/vendor/github.com/cenkalti/backoff/.travis.yml
+++ b/vendor/github.com/cenkalti/backoff/.travis.yml
@@ -1,6 +1,7 @@
language: go
go:
- 1.3.3
+ - 1.x
- tip
before_install:
- go get github.com/mattn/goveralls
diff --git a/vendor/github.com/cloudflare/cfssl/README.md b/vendor/github.com/cloudflare/cfssl/README.md
index 41df4463b..cc90ddb72 100644
--- a/vendor/github.com/cloudflare/cfssl/README.md
+++ b/vendor/github.com/cloudflare/cfssl/README.md
@@ -42,15 +42,27 @@ $ go get -u github.com/cloudflare/cfssl/cmd/cfssl
```
will download and build the CFSSL tool, installing it in
-`$GOPATH/bin/cfssl`. To install the other utility programs that are in
-this repo:
+`$GOPATH/bin/cfssl`.
+
+To install any of the other utility programs that are
+in this repo (for instance `cffsljson` in this case):
+
+```
+$ go get -u github.com/cloudflare/cfssl/cmd/cfssljson
+```
+
+This will download and build the CFSSLJSON tool, installing it in
+`$GOPATH/bin/`.
+
+And to simply install __all__ of the programs in this repo:
```
$ go get -u github.com/cloudflare/cfssl/cmd/...
```
-This will download, build, and install `cfssl`, `cfssljson`, and
-`mkbundle` into `$GOPATH/bin/`.
+This will download, build, and install all of the utility programs
+(including `cfssl`, `cfssljson`, and `mkbundle` among others) into the
+`$GOPATH/bin/` directory.
#### Installing pre-Go 1.6
@@ -87,10 +99,10 @@ operation it should carry out:
serve start the API server
version prints out the current version
selfsign generates a self-signed certificate
- print-defaults print default configurations
+ print-defaults print default configurations
-Use "cfssl [command] -help" to find out more about a command.
-The version command takes no arguments.
+Use `cfssl [command] -help` to find out more about a command.
+The `version` command takes no arguments.
#### Signing
@@ -98,9 +110,9 @@ The version command takes no arguments.
cfssl sign [-ca cert] [-ca-key key] [-hostname comma,separated,hostnames] csr [subject]
```
-The csr is the client's certificate request. The `-ca` and `-ca-key`
+The `csr` is the client's certificate request. The `-ca` and `-ca-key`
flags are the CA's certificate and private key, respectively. By
-default, they are "ca.pem" and "ca_key.pem". The `-hostname` is
+default, they are `ca.pem` and `ca_key.pem`. The `-hostname` is
a comma separated hostname list that overrides the DNS names and
IP address in the certificate SAN extension.
For example, assuming the CA's private key is in
@@ -109,26 +121,27 @@ For example, assuming the CA's private key is in
for cloudflare.com:
```
-cfssl sign -ca /etc/ssl/certs/cfssl.pem \
+cfssl sign -ca /etc/ssl/certs/cfssl.pem \
-ca-key /etc/ssl/private/cfssl_key.pem \
- -hostname cloudflare.com ./cloudflare.pem
+ -hostname cloudflare.com \
+ ./cloudflare.pem
```
-It is also possible to specify csr through '-csr' flag. By doing so,
+It is also possible to specify CSR with the `-csr` flag. By doing so,
flag values take precedence and will overwrite the argument.
The subject is an optional file that contains subject information that
should be used in place of the information from the CSR. It should be
-a JSON file with the type:
+a JSON file as follows:
```json
{
"CN": "example.com",
"names": [
{
- "C": "US",
- "L": "San Francisco",
- "O": "Internet Widgets, Inc.",
+ "C": "US",
+ "L": "San Francisco",
+ "O": "Internet Widgets, Inc.",
"OU": "WWW",
"ST": "California"
}
@@ -148,28 +161,29 @@ cfssl bundle [-ca-bundle bundle] [-int-bundle bundle] \
```
The bundles are used for the root and intermediate certificate
-pools. In addition, platform metadata is specified through '-metadata'
+pools. In addition, platform metadata is specified through `-metadata`.
The bundle files, metadata file (and auxiliary files) can be
-found at [cfssl_trust](https://github.com/cloudflare/cfssl_trust)
+found at:
+ https://github.com/cloudflare/cfssl_trust
-Specify PEM-encoded client certificate and key through '-cert' and
-'-key' respectively. If key is specified, the bundle will be built
+Specify PEM-encoded client certificate and key through `-cert` and
+`-key` respectively. If key is specified, the bundle will be built
and verified with the key. Otherwise the bundle will be built
-without a private key. Instead of file path, use '-' for reading
-certificate PEM from stdin. It is also acceptable the certificate
-file contains a (partial) certificate bundle.
+without a private key. Instead of file path, use `-` for reading
+certificate PEM from stdin. It is also acceptable that the certificate
+file should contain a (partial) certificate bundle.
-Specify bundling flavor through '-flavor'. There are three flavors:
-'optimal' to generate a bundle of shortest chain and most advanced
-cryptographic algorithms, 'ubiquitous' to generate a bundle of most
+Specify bundling flavor through `-flavor`. There are three flavors:
+`optimal` to generate a bundle of shortest chain and most advanced
+cryptographic algorithms, `ubiquitous` to generate a bundle of most
widely acceptance across different browsers and OS platforms, and
-'force' to find an acceptable bundle which is identical to the
+`force` to find an acceptable bundle which is identical to the
content of the input certificate file.
Alternatively, the client certificate can be pulled directly from
a domain. It is also possible to connect to the remote address
-through '-ip'.
+through `-ip`.
```
cfssl bundle [-ca-bundle bundle] [-int-bundle bundle] \
@@ -177,7 +191,7 @@ cfssl bundle [-ca-bundle bundle] [-int-bundle bundle] \
-domain domain_name [-ip ip_address]
```
-The bundle output form should follow the example
+The bundle output form should follow the example:
```json
{
@@ -213,7 +227,7 @@ cfssl genkey csr.json
```
To generate a private key and corresponding certificate request, specify
-the key request as a JSON file. This file should follow the form
+the key request as a JSON file. This file should follow the form:
```json
{
@@ -227,9 +241,9 @@ the key request as a JSON file. This file should follow the form
},
"names": [
{
- "C": "US",
- "L": "San Francisco",
- "O": "Internet Widgets, Inc.",
+ "C": "US",
+ "L": "San Francisco",
+ "O": "Internet Widgets, Inc.",
"OU": "WWW",
"ST": "California"
}
@@ -244,7 +258,7 @@ cfssl genkey -initca csr.json | cfssljson -bare ca
```
To generate a self-signed root CA certificate, specify the key request as
-the JSON file in the same format as in 'genkey'. Three PEM-encoded entities
+a JSON file in the same format as in 'genkey'. Three PEM-encoded entities
will appear in the output: the private key, the csr, and the self-signed
certificate.
@@ -254,8 +268,8 @@ certificate.
cfssl gencert -remote=remote_server [-hostname=comma,separated,hostnames] csr.json
```
-This is calls genkey, but has a remote CFSSL server sign and issue
-a certificate. You may use `-hostname` to override certificate SANs.
+This calls `genkey` but has a remote CFSSL server sign and issue
+the certificate. You may use `-hostname` to override certificate SANs.
#### Generating a local-issued certificate and private key.
@@ -263,25 +277,25 @@ a certificate. You may use `-hostname` to override certificate SANs.
cfssl gencert -ca cert -ca-key key [-hostname=comma,separated,hostnames] csr.json
```
-This is generates and issues a certificate and private key from a local CA
+This generates and issues a certificate and private key from a local CA
via a JSON request. You may use `-hostname` to override certificate SANs.
-#### Updating a OCSP responses file with a newly issued certificate
+#### Updating an OCSP responses file with a newly issued certificate
```
cfssl ocspsign -ca cert -responder key -responder-key key -cert cert \
| cfssljson -bare -stdout >> responses
```
-This will generate a OCSP response for the `cert` and add it to the
-`responses` file. You can then pass `responses` to `ocspserve` to start a
+This will generate an OCSP response for the `cert` and add it to the
+`responses` file. You can then pass `responses` to `ocspserve` to start an
OCSP server.
### Starting the API Server
CFSSL comes with an HTTP-based API server; the endpoints are
-documented in `doc/api/intro.txt`. The server is started with the "serve"
+documented in `doc/api/intro.txt`. The server is started with the `serve`
command:
```
@@ -293,18 +307,19 @@ cfssl serve [-address address] [-ca cert] [-ca-bundle bundle] \
Address and port default to "127.0.0.1:8888". The `-ca` and `-ca-key`
arguments should be the PEM-encoded certificate and private key to use
-for signing; by default, they are "ca.pem" and "ca_key.pem". The
+for signing; by default, they are `ca.pem` and `ca_key.pem`. The
`-ca-bundle` and `-int-bundle` should be the certificate bundles used
for the root and intermediate certificate pools, respectively. These
-default to "ca-bundle.crt" and "int-bundle." If the "remote" option is
-provided, all signature operations will be forwarded to the remote CFSSL.
+default to `ca-bundle.crt` and `int-bundle.crt` respectively. If the
+`-remote` option is specified, all signature operations will be forwarded
+to the remote CFSSL.
-'-int-dir' specifies intermediates directory. '-metadata' is a file for
+`-int-dir` specifies an intermediates directory. `-metadata` is a file for
root certificate presence. The content of the file is a json dictionary
-(k,v): each key k is SHA-1 digest of a root certificate while value v
-is a list of key store filenames. '-config' specifies path to configuration
-file. '-responder' and '-responder-key' are Certificate for OCSP responder
-and private key for OCSP responder certificate, respectively.
+(k,v) such that each key k is an SHA-1 digest of a root certificate while value v
+is a list of key store filenames. `-config` specifies a path to a configuration
+file. `-responder` and `-responder-key` are the certificate and the
+private key for the OCSP responder, respectively.
The amount of logging can be controlled with the `-loglevel` option. This
comes *after* the serve command:
@@ -315,18 +330,18 @@ cfssl serve -loglevel 2
The levels are:
-* 0. DEBUG
-* 1. INFO (this is the default level)
-* 2. WARNING
-* 3. ERROR
-* 4. CRITICAL
+* 0 - DEBUG
+* 1 - INFO (this is the default level)
+* 2 - WARNING
+* 3 - ERROR
+* 4 - CRITICAL
### The multirootca
The `cfssl` program can act as an online certificate authority, but it
only uses a single key. If multiple signing keys are needed, the
-`multirootca` program can be used. It only provides the sign,
-authsign, and info endpoints. The documentation contains instructions
+`multirootca` program can be used. It only provides the `sign`,
+`authsign` and `info` endpoints. The documentation contains instructions
for configuring and running the CA.
### The mkbundle Utility
@@ -343,49 +358,44 @@ support is planned for the next release) and expired certificates, and
bundles them into one file. It takes directories of certificates and
certificate files (which may contain multiple certificates). For example,
if the directory `intermediates` contains a number of intermediate
-certificates,
+certificates:
```
mkbundle -f int-bundle.crt intermediates
```
-will check those certificates and combine valid ones into a single
+will check those certificates and combine valid certificates into a single
`int-bundle.crt` file.
The `-f` flag specifies an output name; `-loglevel` specifies the verbosity
-of the logging (using the same loglevels above), and `-nw` controls the
+of the logging (using the same loglevels as above), and `-nw` controls the
number of revocation-checking workers.
### The cfssljson Utility
-Most of the output from `cfssl` is in JSON. The `cfssljson` will take
-this output and split it out into separate key, certificate, CSR, and
-bundle files as appropriate. The tool takes a single flag, `-f`, that
+Most of the output from `cfssl` is in JSON. The `cfssljson` utility can take
+this output and split it out into separate `key`, `certificate`, `CSR`, and
+`bundle` files as appropriate. The tool takes a single flag, `-f`, that
specifies the input file, and an argument that specifies the base name for
-the files produced. If the input filename is "-" (which is the default),
-`cfssljson` reads from standard input. It maps keys in the JSON file to
+the files produced. If the input filename is `-` (which is the default),
+cfssljson reads from standard input. It maps keys in the JSON file to
filenames in the following way:
-* if there is a "cert" (or if not, if there's a "certificate") field, the
- file "basename.pem" will be produced.
-* if there is a "key" (or if not, if there's a "private_key") field, the
- file "basename-key.pem" will be produced.
-* if there is a "csr" (or if not, if there's a "certificate_request") field,
- the file "basename.csr" will be produced.
-* if there is a "bundle" field, the file "basename-bundle.pem" will
- be produced.
-* if there is a "ocspResponse" field, the file "basename-response.der" will
- be produced.
+* if __cert__ or __certificate__ is specified, __basename.pem__ will be produced.
+* if __key__ or __private_key__ is specified, __basename-key.pem__ will be produced.
+* if __csr__ or __certificate_request__ is specified, __basename.csr__ will be produced.
+* if __bundle__ is specified, __basename-bundle.pem__ will be produced.
+* if __ocspResponse__ is specified, __basename-response.der__ will be produced.
Instead of saving to a file, you can pass `-stdout` to output the encoded
-contents.
+contents to standard output.
### Static Builds
By default, the web assets are accessed from disk, based on their
-relative locations. If you’re wishing to distribute a single,
-statically-linked, cfssl binary, you’ll want to embed these resources
-before building. This can by done with the
+relative locations. If you wish to distribute a single,
+statically-linked, `cfssl` binary, you’ll want to embed these resources
+before building. This can by done with the
[go.rice](https://github.com/GeertJohan/go.rice) tool.
```
@@ -396,16 +406,18 @@ Then building with `go build` will use the embedded resources.
### Using a PKCS#11 hardware token / HSM
-For better security, you may want to store your private key in an HSM or
+For better security, you may wish to store your private key in an HSM or
smartcard. The interface to both of these categories of device is described by
the PKCS#11 spec. If you need to do approximately one signing operation per
second or fewer, the Yubikey NEO and NEO-n are inexpensive smartcard options:
-https://www.yubico.com/products/yubikey-hardware/yubikey-neo/. In general you
-are looking for a product that supports PIV (personal identity verification). If
+
+ https://www.yubico.com/products/yubikey-hardware/yubikey-neo/
+
+In general you should look for a product that supports PIV (personal identity verification). If
your signing needs are in the hundreds of signatures per second, you will need
to purchase an expensive HSM (in the thousands to many thousands of USD).
-If you want to try out the PKCS#11 signing modes without a hardware token, you
+If you wish to try out the PKCS#11 signing modes without a hardware token, you
can use the [SoftHSM](https://github.com/opendnssec/SoftHSMv1#softhsm)
implementation. Please note that using SoftHSM simply stores your private key in
a file on disk and does not increase security.
@@ -413,14 +425,14 @@ a file on disk and does not increase security.
To get started with your PKCS#11 token you will need to initialize it with a
private key, PIN, and token label. The instructions to do this will be specific
to each hardware device, and you should follow the instructions provided by your
-vendor. You will also need to find the path to your 'module', a shared object
+vendor. You will also need to find the path to your `module`, a shared object
file (.so). Having initialized your device, you can query it to check your token
label with:
pkcs11-tool --module --list-token-slots
You'll also want to check the label of the private key you imported (or
-generated). Run the following command and look for a 'Private Key Object':
+generated). Run the following command and look for a `Private Key Object`:
pkcs11-tool --module --pin \
--list-token-slots --login --list-objects
@@ -430,7 +442,7 @@ CFSSL supports PKCS#11 for certificate signing and OCSP signing. To create a
Signer (for certificate signing), import `signer/universal` and call NewSigner
with a Root object containing the module, pin, token label and private label
from above, plus a path to your certificate. The structure of the Root object is
-documented in universal.go.
+documented in `universal.go`.
Alternately, you can construct a pkcs11key.Key or pkcs11key.Pool yourself, and
pass it to ocsp.NewSigner (for OCSP) or local.NewSigner (for certificate
@@ -440,7 +452,7 @@ same time.
### Additional Documentation
-Additional documentation can be found in the "doc/" directory:
+Additional documentation can be found in the "doc" directory:
* `api/intro.txt`: documents the API endpoints
* `bootstrap.txt`: a walkthrough from building the package to getting
diff --git a/vendor/github.com/cloudflare/cfssl/certdb/testdb/certstore_development.db b/vendor/github.com/cloudflare/cfssl/certdb/testdb/certstore_development.db
index 4821a04e1..dfcd19c76 100644
Binary files a/vendor/github.com/cloudflare/cfssl/certdb/testdb/certstore_development.db and b/vendor/github.com/cloudflare/cfssl/certdb/testdb/certstore_development.db differ
diff --git a/vendor/github.com/cloudflare/cfssl/doc/api/endpoint_newcert.txt b/vendor/github.com/cloudflare/cfssl/doc/api/endpoint_newcert.txt
index aeb0b7da0..c4ecb5408 100644
--- a/vendor/github.com/cloudflare/cfssl/doc/api/endpoint_newcert.txt
+++ b/vendor/github.com/cloudflare/cfssl/doc/api/endpoint_newcert.txt
@@ -27,7 +27,8 @@ Result:
* certificate_request: a PEM-encoded certificate request
* certificate: a PEM-encoded certificate, signed by the server
* sums: a JSON object holding both MD5 and SHA1 digests for the certificate
- request and the certificate
+ request and the certificate; note that this is the digest of the DER
+ contents of the certificate, not the PEM contents
* bundle: See the result of endpoint_bundle.txt (only included if the bundle parameter was set)
Example:
diff --git a/vendor/github.com/cloudflare/cfssl/helpers/helpers.go b/vendor/github.com/cloudflare/cfssl/helpers/helpers.go
index 4514a8182..c9506077a 100644
--- a/vendor/github.com/cloudflare/cfssl/helpers/helpers.go
+++ b/vendor/github.com/cloudflare/cfssl/helpers/helpers.go
@@ -18,7 +18,6 @@ import (
"fmt"
"io"
"io/ioutil"
- "math/big"
"os"
"github.com/google/certificate-transparency-go"
@@ -383,51 +382,6 @@ func GetKeyDERFromPEM(in []byte, password []byte) ([]byte, error) {
return nil, cferr.New(cferr.PrivateKeyError, cferr.DecodeFailed)
}
-// CheckSignature verifies a signature made by the key on a CSR, such
-// as on the CSR itself.
-func CheckSignature(csr *x509.CertificateRequest, algo x509.SignatureAlgorithm, signed, signature []byte) error {
- var hashType crypto.Hash
-
- switch algo {
- case x509.SHA1WithRSA, x509.ECDSAWithSHA1:
- hashType = crypto.SHA1
- case x509.SHA256WithRSA, x509.ECDSAWithSHA256:
- hashType = crypto.SHA256
- case x509.SHA384WithRSA, x509.ECDSAWithSHA384:
- hashType = crypto.SHA384
- case x509.SHA512WithRSA, x509.ECDSAWithSHA512:
- hashType = crypto.SHA512
- default:
- return x509.ErrUnsupportedAlgorithm
- }
-
- if !hashType.Available() {
- return x509.ErrUnsupportedAlgorithm
- }
- h := hashType.New()
-
- h.Write(signed)
- digest := h.Sum(nil)
-
- switch pub := csr.PublicKey.(type) {
- case *rsa.PublicKey:
- return rsa.VerifyPKCS1v15(pub, hashType, digest, signature)
- case *ecdsa.PublicKey:
- ecdsaSig := new(struct{ R, S *big.Int })
- if _, err := asn1.Unmarshal(signature, ecdsaSig); err != nil {
- return err
- }
- if ecdsaSig.R.Sign() <= 0 || ecdsaSig.S.Sign() <= 0 {
- return errors.New("x509: ECDSA signature contained zero or negative values")
- }
- if !ecdsa.Verify(pub, digest, ecdsaSig.R, ecdsaSig.S) {
- return errors.New("x509: ECDSA verification failure")
- }
- return nil
- }
- return x509.ErrUnsupportedAlgorithm
-}
-
// ParseCSR parses a PEM- or DER-encoded PKCS #10 certificate signing request.
func ParseCSR(in []byte) (csr *x509.CertificateRequest, rest []byte, err error) {
in = bytes.TrimSpace(in)
@@ -446,7 +400,7 @@ func ParseCSR(in []byte) (csr *x509.CertificateRequest, rest []byte, err error)
return nil, rest, err
}
- err = CheckSignature(csr, csr.SignatureAlgorithm, csr.RawTBSCertificateRequest, csr.Signature)
+ err = csr.CheckSignature()
if err != nil {
return nil, rest, err
}
diff --git a/vendor/github.com/cloudflare/cfssl/ocsp/testdata/sqlite_test.db b/vendor/github.com/cloudflare/cfssl/ocsp/testdata/sqlite_test.db
index b539903fd..ca46b0d84 100644
Binary files a/vendor/github.com/cloudflare/cfssl/ocsp/testdata/sqlite_test.db and b/vendor/github.com/cloudflare/cfssl/ocsp/testdata/sqlite_test.db differ
diff --git a/vendor/github.com/cloudflare/cfssl/selfsign/selfsign.go b/vendor/github.com/cloudflare/cfssl/selfsign/selfsign.go
index 00ab76c26..f8b90df58 100644
--- a/vendor/github.com/cloudflare/cfssl/selfsign/selfsign.go
+++ b/vendor/github.com/cloudflare/cfssl/selfsign/selfsign.go
@@ -17,7 +17,6 @@ import (
"github.com/cloudflare/cfssl/config"
cferr "github.com/cloudflare/cfssl/errors"
- "github.com/cloudflare/cfssl/helpers"
"github.com/cloudflare/cfssl/signer"
)
@@ -33,7 +32,7 @@ func parseCertificateRequest(priv crypto.Signer, csrBytes []byte) (template *x50
return
}
- err = helpers.CheckSignature(csr, csr.SignatureAlgorithm, csr.RawTBSCertificateRequest, csr.Signature)
+ csr.CheckSignature()
if err != nil {
err = cferr.Wrap(cferr.CSRError, cferr.KeyMismatch, err)
return
diff --git a/vendor/github.com/cloudflare/cfssl/signer/local/local.go b/vendor/github.com/cloudflare/cfssl/signer/local/local.go
index 71daaaf4e..686deac9d 100644
--- a/vendor/github.com/cloudflare/cfssl/signer/local/local.go
+++ b/vendor/github.com/cloudflare/cfssl/signer/local/local.go
@@ -29,6 +29,7 @@ import (
"github.com/google/certificate-transparency-go/client"
"github.com/google/certificate-transparency-go/jsonclient"
"golang.org/x/net/context"
+ "time"
)
// Signer contains a signer that uses the standard library to
@@ -96,12 +97,12 @@ func NewSignerFromFile(caFile, caKeyFile string, policy *config.Signing) (*Signe
return NewSigner(priv, parsedCa, signer.DefaultSigAlgo(priv), policy)
}
-func (s *Signer) sign(template *x509.Certificate, profile *config.SigningProfile) (cert []byte, err error) {
+func (s *Signer) sign(template *x509.Certificate, profile *config.SigningProfile, notBefore time.Time, notAfter time.Time) (cert []byte, err error) {
var distPoints = template.CRLDistributionPoints
if distPoints != nil && len(distPoints) > 0 {
template.CRLDistributionPoints = distPoints
}
- err = signer.FillTemplate(template, s.policy.Default, profile)
+ err = signer.FillTemplate(template, s.policy.Default, profile, notBefore, notAfter)
if err != nil {
return nil, err
}
@@ -342,7 +343,7 @@ func (s *Signer) Sign(req signer.SignRequest) (cert []byte, err error) {
var poisonExtension = pkix.Extension{Id: signer.CTPoisonOID, Critical: true, Value: []byte{0x05, 0x00}}
var poisonedPreCert = certTBS
poisonedPreCert.ExtraExtensions = append(safeTemplate.ExtraExtensions, poisonExtension)
- cert, err = s.sign(&poisonedPreCert, profile)
+ cert, err = s.sign(&poisonedPreCert, profile, req.NotBefore, req.NotAfter)
if err != nil {
return
}
@@ -382,17 +383,22 @@ func (s *Signer) Sign(req signer.SignRequest) (cert []byte, err error) {
certTBS.ExtraExtensions = append(certTBS.ExtraExtensions, SCTListExtension)
}
var signedCert []byte
- signedCert, err = s.sign(&certTBS, profile)
+ signedCert, err = s.sign(&certTBS, profile, req.NotBefore, req.NotAfter)
if err != nil {
return nil, err
}
+ // Get the AKI from signedCert. This is required to support Go 1.9+.
+ // In prior versions of Go, x509.CreateCertificate updated the
+ // AuthorityKeyId of certTBS.
+ parsedCert, _ := helpers.ParseCertificatePEM(signedCert)
+
if s.dbAccessor != nil {
var certRecord = certdb.CertificateRecord{
Serial: certTBS.SerialNumber.String(),
// this relies on the specific behavior of x509.CreateCertificate
- // which updates certTBS AuthorityKeyId from the signer's SubjectKeyId
- AKI: hex.EncodeToString(certTBS.AuthorityKeyId),
+ // which sets the AuthorityKeyId from the signer's SubjectKeyId
+ AKI: hex.EncodeToString(parsedCert.AuthorityKeyId),
CALabel: req.Label,
Status: "good",
Expiry: certTBS.NotAfter,
diff --git a/vendor/github.com/cloudflare/cfssl/signer/local/local_test.go b/vendor/github.com/cloudflare/cfssl/signer/local/local_test.go
index 3f02a232c..9799dd89b 100644
--- a/vendor/github.com/cloudflare/cfssl/signer/local/local_test.go
+++ b/vendor/github.com/cloudflare/cfssl/signer/local/local_test.go
@@ -639,6 +639,98 @@ func TestOverwriteHosts(t *testing.T) {
}
+func TestOverrideValidity(t *testing.T) {
+ csrPEM, err := ioutil.ReadFile(fullSubjectCSR)
+ if err != nil {
+ t.Fatalf("%v", err)
+ }
+
+ s := newCustomSigner(t, testECDSACaFile, testECDSACaKeyFile)
+
+ req := signer.SignRequest{
+ Request: string(csrPEM),
+ }
+
+ // The default expiry value.
+ expiry := 8760 * time.Hour
+
+ // default case
+ now := time.Now().UTC()
+ certPEM, err := s.Sign(req)
+ if err != nil {
+ t.Fatalf("Error signing default request: %s", err)
+ }
+ cert, err := helpers.ParseCertificatePEM(certPEM)
+ if err != nil {
+ t.Fatalf("%v", err)
+ }
+ if !cert.NotBefore.After(now.Add(-10*time.Minute)) || !cert.NotBefore.Before(now.Add(10*time.Minute)) {
+ t.Fatalf("Unexpected NotBefore: wanted %s +/-10 minutes, got %s", now, cert.NotBefore)
+ }
+ expectedNotAfter := now.Round(time.Minute).Add(expiry)
+ if !cert.NotAfter.After(expectedNotAfter.Add(-10*time.Minute)) || !cert.NotAfter.Before(expectedNotAfter.Add(10*time.Minute)) {
+ t.Fatalf("Unexpected NotAfter: wanted %s +/-10 minutes, got %s", now, cert.NotAfter)
+ }
+
+ // custom case, NotBefore only
+ now = time.Now().UTC()
+ req.NotBefore = now.Add(-time.Hour * 5).Truncate(time.Hour)
+ req.NotAfter = time.Time{}
+ certPEM, err = s.Sign(req)
+ if err != nil {
+ t.Fatalf("Error signing default request: %s", err)
+ }
+ cert, err = helpers.ParseCertificatePEM(certPEM)
+ if err != nil {
+ t.Fatalf("%v", err)
+ }
+ if !cert.NotBefore.Equal(req.NotBefore) {
+ t.Fatalf("Unexpected NotBefore: wanted %s, got %s", req.NotBefore, cert.NotBefore)
+ }
+ expectedNotAfter = req.NotBefore.Add(expiry)
+ if !cert.NotAfter.After(expectedNotAfter.Add(-10*time.Minute)) || !cert.NotAfter.Before(expectedNotAfter.Add(10*time.Minute)) {
+ t.Fatalf("Unexpected NotAfter: wanted %s +/-10 minutes, got %s", expectedNotAfter, cert.NotAfter)
+ }
+
+ // custom case, NotAfter only
+ now = time.Now().UTC()
+ req.NotBefore = time.Time{}
+ req.NotAfter = now.Add(-time.Hour * 5).Truncate(time.Hour)
+ certPEM, err = s.Sign(req)
+ if err != nil {
+ t.Fatalf("Error signing default request: %s", err)
+ }
+ cert, err = helpers.ParseCertificatePEM(certPEM)
+ if err != nil {
+ t.Fatalf("%v", err)
+ }
+ if !cert.NotBefore.After(now.Add(-10*time.Minute)) || !cert.NotBefore.Before(now.Add(10*time.Minute)) {
+ t.Fatalf("Unexpected NotBefore: wanted %s +/-10 minutes, got %s", now, cert.NotBefore)
+ }
+ if !cert.NotAfter.Equal(req.NotAfter) {
+ t.Fatalf("Unexpected NotAfter: wanted %s, got %s", req.NotAfter, cert.NotAfter)
+ }
+
+ // custom case, NotBefore and NotAfter
+ now = time.Now().UTC()
+ req.NotBefore = now.Add(-time.Hour * 5).Truncate(time.Hour)
+ req.NotAfter = now.Add(time.Hour * 5).Truncate(time.Hour)
+ certPEM, err = s.Sign(req)
+ if err != nil {
+ t.Fatalf("Error signing default request: %s", err)
+ }
+ cert, err = helpers.ParseCertificatePEM(certPEM)
+ if err != nil {
+ t.Fatalf("%v", err)
+ }
+ if !cert.NotBefore.Equal(req.NotBefore) {
+ t.Fatalf("Unexpected NotBefore: wanted %s, got %s", req.NotBefore, cert.NotBefore)
+ }
+ if !cert.NotAfter.Equal(req.NotAfter) {
+ t.Fatalf("Unexpected NotAfter: wanted %s, got %s", req.NotAfter, cert.NotAfter)
+ }
+}
+
func expectOneValueOf(t *testing.T, s []string, e, n string) {
if len(s) != 1 {
t.Fatalf("Expected %s to have a single value, but it has %d values", n, len(s))
diff --git a/vendor/github.com/cloudflare/cfssl/signer/signer.go b/vendor/github.com/cloudflare/cfssl/signer/signer.go
index 5a9db46ca..20101f682 100644
--- a/vendor/github.com/cloudflare/cfssl/signer/signer.go
+++ b/vendor/github.com/cloudflare/cfssl/signer/signer.go
@@ -20,7 +20,6 @@ import (
"github.com/cloudflare/cfssl/config"
"github.com/cloudflare/cfssl/csr"
cferr "github.com/cloudflare/cfssl/errors"
- "github.com/cloudflare/cfssl/helpers"
"github.com/cloudflare/cfssl/info"
)
@@ -56,6 +55,15 @@ type SignRequest struct {
Label string `json:"label"`
Serial *big.Int `json:"serial,omitempty"`
Extensions []Extension `json:"extensions,omitempty"`
+ // If provided, NotBefore will be used without modification (except
+ // for canonicalization) as the value of the notBefore field of the
+ // certificate. In particular no backdating adjustment will be made
+ // when NotBefore is provided.
+ NotBefore time.Time
+ // If provided, NotAfter will be used without modification (except
+ // for canonicalization) as the value of the notAfter field of the
+ // certificate.
+ NotAfter time.Time
}
// appendIf appends to a if s is not an empty string.
@@ -164,7 +172,7 @@ func ParseCertificateRequest(s Signer, csrBytes []byte) (template *x509.Certific
return
}
- err = helpers.CheckSignature(csrv, csrv.SignatureAlgorithm, csrv.RawTBSCertificateRequest, csrv.Signature)
+ err = csrv.CheckSignature()
if err != nil {
err = cferr.Wrap(cferr.CSRError, cferr.KeyMismatch, err)
return
@@ -232,7 +240,7 @@ func ComputeSKI(template *x509.Certificate) ([]byte, error) {
// the certificate template as possible from the profiles and current
// template. It fills in the key uses, expiration, revocation URLs
// and SKI.
-func FillTemplate(template *x509.Certificate, defaultProfile, profile *config.SigningProfile) error {
+func FillTemplate(template *x509.Certificate, defaultProfile, profile *config.SigningProfile, notBefore time.Time, notAfter time.Time) error {
ski, err := ComputeSKI(template)
if err != nil {
return err
@@ -243,8 +251,6 @@ func FillTemplate(template *x509.Certificate, defaultProfile, profile *config.Si
ku x509.KeyUsage
backdate time.Duration
expiry time.Duration
- notBefore time.Time
- notAfter time.Time
crlURL, ocspURL string
issuerURL = profile.IssuerURL
)
@@ -271,23 +277,29 @@ func FillTemplate(template *x509.Certificate, defaultProfile, profile *config.Si
if ocspURL = profile.OCSP; ocspURL == "" {
ocspURL = defaultProfile.OCSP
}
- if backdate = profile.Backdate; backdate == 0 {
- backdate = -5 * time.Minute
- } else {
- backdate = -1 * profile.Backdate
- }
- if !profile.NotBefore.IsZero() {
- notBefore = profile.NotBefore.UTC()
- } else {
- notBefore = time.Now().Round(time.Minute).Add(backdate).UTC()
+ if notBefore.IsZero() {
+ if !profile.NotBefore.IsZero() {
+ notBefore = profile.NotBefore
+ } else {
+ if backdate = profile.Backdate; backdate == 0 {
+ backdate = -5 * time.Minute
+ } else {
+ backdate = -1 * profile.Backdate
+ }
+ notBefore = time.Now().Round(time.Minute).Add(backdate)
+ }
}
+ notBefore = notBefore.UTC()
- if !profile.NotAfter.IsZero() {
- notAfter = profile.NotAfter.UTC()
- } else {
- notAfter = notBefore.Add(expiry).UTC()
+ if notAfter.IsZero() {
+ if !profile.NotAfter.IsZero() {
+ notAfter = profile.NotAfter
+ } else {
+ notAfter = notBefore.Add(expiry)
+ }
}
+ notAfter = notAfter.UTC()
template.NotBefore = notBefore
template.NotAfter = notAfter
diff --git a/vendor/github.com/cloudflare/cfssl/signer/signer_test.go b/vendor/github.com/cloudflare/cfssl/signer/signer_test.go
index 1402c2a48..bab6ef745 100644
--- a/vendor/github.com/cloudflare/cfssl/signer/signer_test.go
+++ b/vendor/github.com/cloudflare/cfssl/signer/signer_test.go
@@ -141,7 +141,7 @@ func TestName(t *testing.T) {
t.Errorf("Organization: want %s, got %s", []string{"Cool Org"}, name.Organization)
}
if !reflect.DeepEqual([]string{"Really Cool Sub Org"}, name.OrganizationalUnit) {
- t.Errorf("Province: want %s, got %s", []string{"Really Cool Sub Org"}, name.OrganizationalUnit)
+ t.Errorf("Organizational Unit: want %s, got %s", []string{"Really Cool Sub Org"}, name.OrganizationalUnit)
}
if !reflect.DeepEqual([]string{"Cool Locality", "Another Cool Locality"}, name.Locality) {
t.Errorf("Locality: want %s, got %s", []string{"CA"}, name.Locality)
diff --git a/vendor/github.com/coreos/etcd/.travis.yml b/vendor/github.com/coreos/etcd/.travis.yml
index 6e0c66810..378bb46e9 100644
--- a/vendor/github.com/coreos/etcd/.travis.yml
+++ b/vendor/github.com/coreos/etcd/.travis.yml
@@ -4,7 +4,7 @@ go_import_path: github.com/coreos/etcd
sudo: false
go:
- - 1.9
+ - 1.9.x
- tip
notifications:
@@ -44,13 +44,14 @@ addons:
sources:
- debian-sid
packages:
- - libpcap-dev
- libaspell-dev
- libhunspell-dev
+ - hunspell-en-us
+ - aspell-en
- shellcheck
before_install:
- - go get -v -u github.com/chzchzchz/goword
+ - go get -v -u -tags spell github.com/chzchzchz/goword
- go get -v -u github.com/coreos/license-bill-of-materials
- go get -v -u honnef.co/go/tools/cmd/gosimple
- go get -v -u honnef.co/go/tools/cmd/unused
diff --git a/vendor/github.com/coreos/etcd/.words b/vendor/github.com/coreos/etcd/.words
new file mode 100644
index 000000000..155d2facb
--- /dev/null
+++ b/vendor/github.com/coreos/etcd/.words
@@ -0,0 +1,24 @@
+RPC
+RPCs
+cancelable
+cancelation
+defragment
+defragmenting
+etcd
+gRPC
+goroutine
+goroutines
+iff
+inflight
+keepalive
+keepalives
+keyspace
+linearization
+localhost
+mutex
+prefetching
+protobuf
+serializable
+teardown
+uncontended
+unprefixed
diff --git a/vendor/github.com/coreos/etcd/Dockerfile-test b/vendor/github.com/coreos/etcd/Dockerfile-test
new file mode 100644
index 000000000..3762d2e63
--- /dev/null
+++ b/vendor/github.com/coreos/etcd/Dockerfile-test
@@ -0,0 +1,29 @@
+FROM golang:1.9-stretch
+
+RUN apt-get -y update
+RUN apt-get -y install \
+ netcat \
+ libaspell-dev \
+ libhunspell-dev \
+ hunspell-en-us \
+ aspell-en \
+ shellcheck
+
+RUN mkdir -p ${GOPATH}/src/github.com/coreos/etcd
+WORKDIR ${GOPATH}/src/github.com/coreos/etcd
+
+ADD ./scripts/install-marker.sh ./scripts/install-marker.sh
+
+RUN go get -v -u -tags spell github.com/chzchzchz/goword \
+ && go get -v -u github.com/coreos/license-bill-of-materials \
+ && go get -v -u honnef.co/go/tools/cmd/gosimple \
+ && go get -v -u honnef.co/go/tools/cmd/unused \
+ && go get -v -u honnef.co/go/tools/cmd/staticcheck \
+ && go get -v -u github.com/wadey/gocovmerge \
+ && ./scripts/install-marker.sh amd64
+
+# e.g.
+# docker build --tag etcd-test --file ./Dockerfile-test .
+# docker run --volume=`pwd`:/go/src/github.com/coreos/etcd etcd-test \
+# /bin/sh -c "INTEGRATION=y PASSES='build integration_e2e' ./test"
+
diff --git a/vendor/github.com/coreos/etcd/Documentation/op-guide/container.md b/vendor/github.com/coreos/etcd/Documentation/op-guide/container.md
index 1a1969a19..b9bf02b75 100644
--- a/vendor/github.com/coreos/etcd/Documentation/op-guide/container.md
+++ b/vendor/github.com/coreos/etcd/Documentation/op-guide/container.md
@@ -184,11 +184,10 @@ The etcd release container does not include default root certificates. To use HT
```
REGISTRY=quay.io/coreos/etcd
# available from v3.2.5
-REGISTRY=gcr.io/etcd-development/etcd
-```
+REGISTRY=docker://gcr.io/etcd-development/etcd
-```
rkt run \
+ --insecure-options=image \
--volume etcd-ssl-certs-bundle,kind=host,source=/etc/ssl/certs/ca-certificates.crt \
--mount volume=etcd-ssl-certs-bundle,target=/etc/ssl/certs/ca-certificates.crt \
${REGISTRY}:latest -- --name my-name \
@@ -198,6 +197,10 @@ rkt run \
```
```
+REGISTRY=quay.io/coreos/etcd
+# available from v3.2.5
+REGISTRY=gcr.io/etcd-development/etcd
+
docker run \
-p 2379:2379 \
-p 2380:2380 \
diff --git a/vendor/github.com/coreos/etcd/Documentation/upgrades/upgrade_3_3.md b/vendor/github.com/coreos/etcd/Documentation/upgrades/upgrade_3_3.md
new file mode 100644
index 000000000..faae64118
--- /dev/null
+++ b/vendor/github.com/coreos/etcd/Documentation/upgrades/upgrade_3_3.md
@@ -0,0 +1,163 @@
+## Upgrade etcd from 3.2 to 3.3
+
+In the general case, upgrading from etcd 3.2 to 3.3 can be a zero-downtime, rolling upgrade:
+ - one by one, stop the etcd v3.2 processes and replace them with etcd v3.3 processes
+ - after running all v3.3 processes, new features in v3.3 are available to the cluster
+
+Before [starting an upgrade](#upgrade-procedure), read through the rest of this guide to prepare.
+
+### Client upgrade checklists
+
+3.3 introduces breaking changes (TODO: update this before 3.3 release).
+
+Previously, `grpc.ErrClientConnTimeout` error is returned on client dial time-outs. 3.3 instead returns `context.DeadlineExceeded` (see [#8504](https://github.com/coreos/etcd/issues/8504)).
+
+Before
+
+```go
+// expect dial time-out on ipv4 blackhole
+_, err := clientv3.New(clientv3.Config{
+ Endpoints: []string{"http://254.0.0.1:12345"},
+ DialTimeout: 2 * time.Second
+})
+if err == grpc.ErrClientConnTimeout {
+ // handle errors
+}
+```
+
+After
+
+```go
+_, err := clientv3.New(clientv3.Config{
+ Endpoints: []string{"http://254.0.0.1:12345"},
+ DialTimeout: 2 * time.Second
+})
+if err == context.DeadlineExceeded {
+ // handle errors
+}
+```
+
+### Server upgrade checklists
+
+#### Upgrade requirements
+
+To upgrade an existing etcd deployment to 3.3, the running cluster must be 3.2 or greater. If it's before 3.2, please [upgrade to 3.2](upgrade_3_2.md) before upgrading to 3.3.
+
+Also, to ensure a smooth rolling upgrade, the running cluster must be healthy. Check the health of the cluster by using the `etcdctl endpoint health` command before proceeding.
+
+#### Preparation
+
+Before upgrading etcd, always test the services relying on etcd in a staging environment before deploying the upgrade to the production environment.
+
+Before beginning, [backup the etcd data](../op-guide/maintenance.md#snapshot-backup). Should something go wrong with the upgrade, it is possible to use this backup to [downgrade](#downgrade) back to existing etcd version. Please note that the `snapshot` command only backs up the v3 data. For v2 data, see [backing up v2 datastore](../v2/admin_guide.md#backing-up-the-datastore).
+
+#### Mixed versions
+
+While upgrading, an etcd cluster supports mixed versions of etcd members, and operates with the protocol of the lowest common version. The cluster is only considered upgraded once all of its members are upgraded to version 3.3. Internally, etcd members negotiate with each other to determine the overall cluster version, which controls the reported version and the supported features.
+
+#### Limitations
+
+Note: If the cluster only has v3 data and no v2 data, it is not subject to this limitation.
+
+If the cluster is serving a v2 data set larger than 50MB, each newly upgraded member may take up to two minutes to catch up with the existing cluster. Check the size of a recent snapshot to estimate the total data size. In other words, it is safest to wait for 2 minutes between upgrading each member.
+
+For a much larger total data size, 100MB or more , this one-time process might take even more time. Administrators of very large etcd clusters of this magnitude can feel free to contact the [etcd team][etcd-contact] before upgrading, and we'll be happy to provide advice on the procedure.
+
+#### Downgrade
+
+If all members have been upgraded to v3.3, the cluster will be upgraded to v3.3, and downgrade from this completed state is **not possible**. If any single member is still v3.2, however, the cluster and its operations remains "v3.2", and it is possible from this mixed cluster state to return to using a v3.2 etcd binary on all members.
+
+Please [backup the data directory](../op-guide/maintenance.md#snapshot-backup) of all etcd members to make downgrading the cluster possible even after it has been completely upgraded.
+
+### Upgrade procedure
+
+This example shows how to upgrade a 3-member v3.2 ectd cluster running on a local machine.
+
+#### 1. Check upgrade requirements
+
+Is the cluster healthy and running v3.2.x?
+
+```
+$ ETCDCTL_API=3 etcdctl endpoint health --endpoints=localhost:2379,localhost:22379,localhost:32379
+localhost:2379 is healthy: successfully committed proposal: took = 6.600684ms
+localhost:22379 is healthy: successfully committed proposal: took = 8.540064ms
+localhost:32379 is healthy: successfully committed proposal: took = 8.763432ms
+
+$ curl http://localhost:2379/version
+{"etcdserver":"3.2.7","etcdcluster":"3.2.0"}
+```
+
+#### 2. Stop the existing etcd process
+
+When each etcd process is stopped, expected errors will be logged by other cluster members. This is normal since a cluster member connection has been (temporarily) broken:
+
+```
+14:13:31.491746 I | raft: c89feb932daef420 [term 3] received MsgTimeoutNow from 6d4f535bae3ab960 and starts an election to get leadership.
+14:13:31.491769 I | raft: c89feb932daef420 became candidate at term 4
+14:13:31.491788 I | raft: c89feb932daef420 received MsgVoteResp from c89feb932daef420 at term 4
+14:13:31.491797 I | raft: c89feb932daef420 [logterm: 3, index: 9] sent MsgVote request to 6d4f535bae3ab960 at term 4
+14:13:31.491805 I | raft: c89feb932daef420 [logterm: 3, index: 9] sent MsgVote request to 9eda174c7df8a033 at term 4
+14:13:31.491815 I | raft: raft.node: c89feb932daef420 lost leader 6d4f535bae3ab960 at term 4
+14:13:31.524084 I | raft: c89feb932daef420 received MsgVoteResp from 6d4f535bae3ab960 at term 4
+14:13:31.524108 I | raft: c89feb932daef420 [quorum:2] has received 2 MsgVoteResp votes and 0 vote rejections
+14:13:31.524123 I | raft: c89feb932daef420 became leader at term 4
+14:13:31.524136 I | raft: raft.node: c89feb932daef420 elected leader c89feb932daef420 at term 4
+14:13:31.592650 W | rafthttp: lost the TCP streaming connection with peer 6d4f535bae3ab960 (stream MsgApp v2 reader)
+14:13:31.592825 W | rafthttp: lost the TCP streaming connection with peer 6d4f535bae3ab960 (stream Message reader)
+14:13:31.693275 E | rafthttp: failed to dial 6d4f535bae3ab960 on stream Message (dial tcp [::1]:2380: getsockopt: connection refused)
+14:13:31.693289 I | rafthttp: peer 6d4f535bae3ab960 became inactive
+14:13:31.936678 W | rafthttp: lost the TCP streaming connection with peer 6d4f535bae3ab960 (stream Message writer)
+```
+
+It's a good idea at this point to [backup the etcd data](../op-guide/maintenance.md#snapshot-backup) to provide a downgrade path should any problems occur:
+
+```
+$ etcdctl snapshot save backup.db
+```
+
+#### 3. Drop-in etcd v3.3 binary and start the new etcd process
+
+The new v3.3 etcd will publish its information to the cluster:
+
+```
+14:14:25.363225 I | etcdserver: published {Name:s1 ClientURLs:[http://localhost:2379]} to cluster a9ededbffcb1b1f1
+```
+
+Verify that each member, and then the entire cluster, becomes healthy with the new v3.3 etcd binary:
+
+```
+$ ETCDCTL_API=3 /etcdctl endpoint health --endpoints=localhost:2379,localhost:22379,localhost:32379
+localhost:22379 is healthy: successfully committed proposal: took = 5.540129ms
+localhost:32379 is healthy: successfully committed proposal: took = 7.321771ms
+localhost:2379 is healthy: successfully committed proposal: took = 10.629901ms
+```
+
+Upgraded members will log warnings like the following until the entire cluster is upgraded. This is expected and will cease after all etcd cluster members are upgraded to v3.3:
+
+```
+14:15:17.071804 W | etcdserver: member c89feb932daef420 has a higher version 3.3.0
+14:15:21.073110 W | etcdserver: the local etcd version 3.2.7 is not up-to-date
+14:15:21.073142 W | etcdserver: member 6d4f535bae3ab960 has a higher version 3.3.0
+14:15:21.073157 W | etcdserver: the local etcd version 3.2.7 is not up-to-date
+14:15:21.073164 W | etcdserver: member c89feb932daef420 has a higher version 3.3.0
+```
+
+#### 4. Repeat step 2 to step 3 for all other members
+
+#### 5. Finish
+
+When all members are upgraded, the cluster will report upgrading to 3.3 successfully:
+
+```
+14:15:54.536901 N | etcdserver/membership: updated the cluster version from 3.2 to 3.3
+14:15:54.537035 I | etcdserver/api: enabled capabilities for version 3.3
+```
+
+```
+$ ETCDCTL_API=3 /etcdctl endpoint health --endpoints=localhost:2379,localhost:22379,localhost:32379
+localhost:2379 is healthy: successfully committed proposal: took = 2.312897ms
+localhost:22379 is healthy: successfully committed proposal: took = 2.553476ms
+localhost:32379 is healthy: successfully committed proposal: took = 2.517902ms
+```
+
+[etcd-contact]: https://groups.google.com/forum/#!forum/etcd-dev
diff --git a/vendor/github.com/coreos/etcd/README.md b/vendor/github.com/coreos/etcd/README.md
index 55ee92bd7..b807a74bd 100644
--- a/vendor/github.com/coreos/etcd/README.md
+++ b/vendor/github.com/coreos/etcd/README.md
@@ -40,7 +40,7 @@ See [etcdctl][etcdctl] for a simple command line client.
The easiest way to get etcd is to use one of the pre-built release binaries which are available for OSX, Linux, Windows, [rkt][rkt], and Docker. Instructions for using these binaries are on the [GitHub releases page][github-release].
-For those wanting to try the very latest version, [build the latest version of etcd][dl-build] from the `master` branch. This first needs [*Go*](https://golang.org/) installed (version 1.8+ is required). All development occurs on `master`, including new features and bug fixes. Bug fixes are first targeted at `master` and subsequently ported to release branches, as described in the [branch management][branch-management] guide.
+For those wanting to try the very latest version, [build the latest version of etcd][dl-build] from the `master` branch. This first needs [*Go*](https://golang.org/) installed (version 1.9+ is required). All development occurs on `master`, including new features and bug fixes. Bug fixes are first targeted at `master` and subsequently ported to release branches, as described in the [branch management][branch-management] guide.
[rkt]: https://github.com/rkt/rkt/releases/
[github-release]: https://github.com/coreos/etcd/releases/
diff --git a/vendor/github.com/coreos/etcd/auth/jwt.go b/vendor/github.com/coreos/etcd/auth/jwt.go
index 12ccc62c6..99b2d6b5c 100644
--- a/vendor/github.com/coreos/etcd/auth/jwt.go
+++ b/vendor/github.com/coreos/etcd/auth/jwt.go
@@ -15,11 +15,11 @@
package auth
import (
+ "context"
"crypto/rsa"
"io/ioutil"
jwt "github.com/dgrijalva/jwt-go"
- "golang.org/x/net/context"
)
type tokenJWT struct {
diff --git a/vendor/github.com/coreos/etcd/auth/simple_token.go b/vendor/github.com/coreos/etcd/auth/simple_token.go
index e39678d6c..aa30b045b 100644
--- a/vendor/github.com/coreos/etcd/auth/simple_token.go
+++ b/vendor/github.com/coreos/etcd/auth/simple_token.go
@@ -18,6 +18,7 @@ package auth
// JWT based mechanism will be added in the near future.
import (
+ "context"
"crypto/rand"
"fmt"
"math/big"
@@ -25,8 +26,6 @@ import (
"strings"
"sync"
"time"
-
- "golang.org/x/net/context"
)
const (
diff --git a/vendor/github.com/coreos/etcd/auth/store.go b/vendor/github.com/coreos/etcd/auth/store.go
index fa1d5b8e7..0b549abc5 100644
--- a/vendor/github.com/coreos/etcd/auth/store.go
+++ b/vendor/github.com/coreos/etcd/auth/store.go
@@ -16,6 +16,7 @@ package auth
import (
"bytes"
+ "context"
"encoding/binary"
"errors"
"sort"
@@ -26,9 +27,9 @@ import (
"github.com/coreos/etcd/auth/authpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/backend"
+
"github.com/coreos/pkg/capnslog"
"golang.org/x/crypto/bcrypt"
- "golang.org/x/net/context"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/peer"
diff --git a/vendor/github.com/coreos/etcd/auth/store_test.go b/vendor/github.com/coreos/etcd/auth/store_test.go
index f2a25aac6..951bd7b45 100644
--- a/vendor/github.com/coreos/etcd/auth/store_test.go
+++ b/vendor/github.com/coreos/etcd/auth/store_test.go
@@ -15,6 +15,7 @@
package auth
import (
+ "context"
"fmt"
"os"
"reflect"
@@ -27,7 +28,6 @@ import (
"github.com/coreos/etcd/mvcc/backend"
"golang.org/x/crypto/bcrypt"
- "golang.org/x/net/context"
"google.golang.org/grpc/metadata"
)
diff --git a/vendor/github.com/coreos/etcd/build b/vendor/github.com/coreos/etcd/build
index 36be42eb2..b233d3272 100755
--- a/vendor/github.com/coreos/etcd/build
+++ b/vendor/github.com/coreos/etcd/build
@@ -4,7 +4,7 @@
ORG_PATH="github.com/coreos"
REPO_PATH="${ORG_PATH}/etcd"
-GIT_SHA=`git rev-parse --short HEAD || echo "GitNotFound"`
+GIT_SHA=$(git rev-parse --short HEAD || echo "GitNotFound")
if [ ! -z "$FAILPOINTS" ]; then
GIT_SHA="$GIT_SHA"-FAILPOINTS
fi
@@ -14,10 +14,9 @@ GO_LDFLAGS="$GO_LDFLAGS -X ${REPO_PATH}/cmd/vendor/${REPO_PATH}/version.GitSHA=$
# enable/disable failpoints
toggle_failpoints() {
- FAILPKGS="etcdserver/ mvcc/backend/"
mode="$1"
if which gofail >/dev/null 2>&1; then
- gofail "$mode" $FAILPKGS
+ gofail "$mode" etcdserver/ mvcc/backend/
elif [ "$mode" != "disable" ]; then
echo "FAILPOINTS set but gofail not found"
exit 1
@@ -34,9 +33,12 @@ etcd_build() {
out="bin"
if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi
toggle_failpoints_default
- # Static compilation is useful when etcd is run in a container
- CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o ${out}/etcd ${REPO_PATH}/cmd/etcd || return
- CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o ${out}/etcdctl ${REPO_PATH}/cmd/etcdctl || return
+ # Static compilation is useful when etcd is run in a container. $GO_BUILD_FLAGS is OK
+
+ # shellcheck disable=SC2086
+ CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o "${out}/etcd" ${REPO_PATH}/cmd/etcd || return
+ # shellcheck disable=SC2086
+ CGO_ENABLED=0 go build $GO_BUILD_FLAGS -installsuffix cgo -ldflags "$GO_LDFLAGS" -o "${out}/etcdctl" ${REPO_PATH}/cmd/etcdctl || return
}
etcd_setup_gopath() {
@@ -49,9 +51,9 @@ etcd_setup_gopath() {
GOPATH=":$GOPATH"
fi
export GOPATH=${etcdGOPATH}$GOPATH
- rm -rf ${etcdGOPATH}/src
- mkdir -p ${etcdGOPATH}
- ln -s ${CDIR}/cmd/vendor ${etcdGOPATH}/src
+ rm -rf "${etcdGOPATH}/src"
+ mkdir -p "${etcdGOPATH}"
+ ln -s "${CDIR}/cmd/vendor" "${etcdGOPATH}/src"
}
toggle_failpoints_default
diff --git a/vendor/github.com/coreos/etcd/client/README.md b/vendor/github.com/coreos/etcd/client/README.md
index c0ec81901..2be731ede 100644
--- a/vendor/github.com/coreos/etcd/client/README.md
+++ b/vendor/github.com/coreos/etcd/client/README.md
@@ -25,8 +25,8 @@ package main
import (
"log"
"time"
+ "context"
- "golang.org/x/net/context"
"github.com/coreos/etcd/client"
)
diff --git a/vendor/github.com/coreos/etcd/client/auth_role.go b/vendor/github.com/coreos/etcd/client/auth_role.go
index d15e00dd7..b6ba7e150 100644
--- a/vendor/github.com/coreos/etcd/client/auth_role.go
+++ b/vendor/github.com/coreos/etcd/client/auth_role.go
@@ -16,11 +16,10 @@ package client
import (
"bytes"
+ "context"
"encoding/json"
"net/http"
"net/url"
-
- "golang.org/x/net/context"
)
type Role struct {
diff --git a/vendor/github.com/coreos/etcd/client/auth_user.go b/vendor/github.com/coreos/etcd/client/auth_user.go
index 97c3f3181..8e7e2efe8 100644
--- a/vendor/github.com/coreos/etcd/client/auth_user.go
+++ b/vendor/github.com/coreos/etcd/client/auth_user.go
@@ -16,12 +16,11 @@ package client
import (
"bytes"
+ "context"
"encoding/json"
"net/http"
"net/url"
"path"
-
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/client/client.go b/vendor/github.com/coreos/etcd/client/client.go
index 498dfbcc8..3c8948252 100644
--- a/vendor/github.com/coreos/etcd/client/client.go
+++ b/vendor/github.com/coreos/etcd/client/client.go
@@ -15,6 +15,7 @@
package client
import (
+ "context"
"encoding/json"
"errors"
"fmt"
@@ -29,8 +30,6 @@ import (
"time"
"github.com/coreos/etcd/version"
-
- "golang.org/x/net/context"
)
var (
@@ -372,12 +371,7 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo
if err == context.Canceled || err == context.DeadlineExceeded {
return nil, nil, err
}
- if isOneShot {
- return nil, nil, err
- }
- continue
- }
- if resp.StatusCode/100 == 5 {
+ } else if resp.StatusCode/100 == 5 {
switch resp.StatusCode {
case http.StatusInternalServerError, http.StatusServiceUnavailable:
// TODO: make sure this is a no leader response
@@ -385,10 +379,16 @@ func (c *httpClusterClient) Do(ctx context.Context, act httpAction) (*http.Respo
default:
cerr.Errors = append(cerr.Errors, fmt.Errorf("client: etcd member %s returns server error [%s]", eps[k].String(), http.StatusText(resp.StatusCode)))
}
- if isOneShot {
- return nil, nil, cerr.Errors[0]
+ err = cerr.Errors[0]
+ }
+ if err != nil {
+ if !isOneShot {
+ continue
}
- continue
+ c.Lock()
+ c.pinned = (k + 1) % leps
+ c.Unlock()
+ return nil, nil, err
}
if k != pinned {
c.Lock()
diff --git a/vendor/github.com/coreos/etcd/client/client_test.go b/vendor/github.com/coreos/etcd/client/client_test.go
index 4ab54d883..40328a1e9 100644
--- a/vendor/github.com/coreos/etcd/client/client_test.go
+++ b/vendor/github.com/coreos/etcd/client/client_test.go
@@ -15,7 +15,9 @@
package client
import (
+ "context"
"errors"
+ "fmt"
"io"
"io/ioutil"
"math/rand"
@@ -29,7 +31,6 @@ import (
"github.com/coreos/etcd/pkg/testutil"
"github.com/coreos/etcd/version"
- "golang.org/x/net/context"
)
type actionAssertingHTTPClient struct {
@@ -304,7 +305,9 @@ func TestHTTPClusterClientDo(t *testing.T) {
fakeErr := errors.New("fake!")
fakeURL := url.URL{}
tests := []struct {
- client *httpClusterClient
+ client *httpClusterClient
+ ctx context.Context
+
wantCode int
wantErr error
wantPinned int
@@ -395,10 +398,30 @@ func TestHTTPClusterClientDo(t *testing.T) {
wantCode: http.StatusTeapot,
wantPinned: 1,
},
+
+ // 500-level errors cause one shot Do to fallthrough to next endpoint
+ {
+ client: &httpClusterClient{
+ endpoints: []url.URL{fakeURL, fakeURL},
+ clientFactory: newStaticHTTPClientFactory(
+ []staticHTTPResponse{
+ {resp: http.Response{StatusCode: http.StatusBadGateway}},
+ {resp: http.Response{StatusCode: http.StatusTeapot}},
+ },
+ ),
+ rand: rand.New(rand.NewSource(0)),
+ },
+ ctx: context.WithValue(context.Background(), &oneShotCtxValue, &oneShotCtxValue),
+ wantErr: fmt.Errorf("client: etcd member returns server error [Bad Gateway]"),
+ wantPinned: 1,
+ },
}
for i, tt := range tests {
- resp, _, err := tt.client.Do(context.Background(), nil)
+ if tt.ctx == nil {
+ tt.ctx = context.Background()
+ }
+ resp, _, err := tt.client.Do(tt.ctx, nil)
if !reflect.DeepEqual(tt.wantErr, err) {
t.Errorf("#%d: got err=%v, want=%v", i, err, tt.wantErr)
continue
@@ -407,11 +430,9 @@ func TestHTTPClusterClientDo(t *testing.T) {
if resp == nil {
if tt.wantCode != 0 {
t.Errorf("#%d: resp is nil, want=%d", i, tt.wantCode)
+ continue
}
- continue
- }
-
- if resp.StatusCode != tt.wantCode {
+ } else if resp.StatusCode != tt.wantCode {
t.Errorf("#%d: resp code=%d, want=%d", i, resp.StatusCode, tt.wantCode)
continue
}
diff --git a/vendor/github.com/coreos/etcd/client/doc.go b/vendor/github.com/coreos/etcd/client/doc.go
index dd336d188..ad4eca4e1 100644
--- a/vendor/github.com/coreos/etcd/client/doc.go
+++ b/vendor/github.com/coreos/etcd/client/doc.go
@@ -19,9 +19,9 @@ Create a Config and exchange it for a Client:
import (
"net/http"
+ "context"
"github.com/coreos/etcd/client"
- "golang.org/x/net/context"
)
cfg := client.Config{
diff --git a/vendor/github.com/coreos/etcd/client/example_keys_test.go b/vendor/github.com/coreos/etcd/client/example_keys_test.go
index 105a74791..66063571d 100644
--- a/vendor/github.com/coreos/etcd/client/example_keys_test.go
+++ b/vendor/github.com/coreos/etcd/client/example_keys_test.go
@@ -15,12 +15,12 @@
package client_test
import (
+ "context"
"fmt"
"log"
"sort"
"github.com/coreos/etcd/client"
- "golang.org/x/net/context"
)
func ExampleKeysAPI_directory() {
diff --git a/vendor/github.com/coreos/etcd/client/integration/client_test.go b/vendor/github.com/coreos/etcd/client/integration/client_test.go
index 490990b65..5d4d0a05e 100644
--- a/vendor/github.com/coreos/etcd/client/integration/client_test.go
+++ b/vendor/github.com/coreos/etcd/client/integration/client_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"fmt"
"net/http"
"net/http/httptest"
@@ -23,8 +24,6 @@ import (
"sync/atomic"
"testing"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
diff --git a/vendor/github.com/coreos/etcd/client/keys.go b/vendor/github.com/coreos/etcd/client/keys.go
index 4a6c41a78..e8373b945 100644
--- a/vendor/github.com/coreos/etcd/client/keys.go
+++ b/vendor/github.com/coreos/etcd/client/keys.go
@@ -17,6 +17,7 @@ package client
//go:generate codecgen -d 1819 -r "Node|Response|Nodes" -o keys.generated.go keys.go
import (
+ "context"
"encoding/json"
"errors"
"fmt"
@@ -28,7 +29,6 @@ import (
"github.com/coreos/etcd/pkg/pathutil"
"github.com/ugorji/go/codec"
- "golang.org/x/net/context"
)
const (
diff --git a/vendor/github.com/coreos/etcd/client/keys_test.go b/vendor/github.com/coreos/etcd/client/keys_test.go
index 253fa9b8f..0e190cf59 100644
--- a/vendor/github.com/coreos/etcd/client/keys_test.go
+++ b/vendor/github.com/coreos/etcd/client/keys_test.go
@@ -15,6 +15,7 @@
package client
import (
+ "context"
"errors"
"fmt"
"io/ioutil"
@@ -23,8 +24,6 @@ import (
"reflect"
"testing"
"time"
-
- "golang.org/x/net/context"
)
func TestV2KeysURLHelper(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/client/members.go b/vendor/github.com/coreos/etcd/client/members.go
index 205489560..aafa3d1b8 100644
--- a/vendor/github.com/coreos/etcd/client/members.go
+++ b/vendor/github.com/coreos/etcd/client/members.go
@@ -16,14 +16,13 @@ package client
import (
"bytes"
+ "context"
"encoding/json"
"fmt"
"net/http"
"net/url"
"path"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/pkg/types"
)
diff --git a/vendor/github.com/coreos/etcd/client/members_test.go b/vendor/github.com/coreos/etcd/client/members_test.go
index f199db2cb..706b6aeb8 100644
--- a/vendor/github.com/coreos/etcd/client/members_test.go
+++ b/vendor/github.com/coreos/etcd/client/members_test.go
@@ -15,6 +15,7 @@
package client
import (
+ "context"
"encoding/json"
"errors"
"net/http"
@@ -22,8 +23,6 @@ import (
"reflect"
"testing"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/pkg/types"
)
diff --git a/vendor/github.com/coreos/etcd/clientv3/auth.go b/vendor/github.com/coreos/etcd/clientv3/auth.go
index 18f1f5b09..a6ab46841 100644
--- a/vendor/github.com/coreos/etcd/clientv3/auth.go
+++ b/vendor/github.com/coreos/etcd/clientv3/auth.go
@@ -15,12 +15,13 @@
package clientv3
import (
+ "context"
"fmt"
"strings"
"github.com/coreos/etcd/auth/authpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/clientv3/balancer.go b/vendor/github.com/coreos/etcd/clientv3/balancer.go
index 6ae047e98..75c5cd438 100644
--- a/vendor/github.com/coreos/etcd/clientv3/balancer.go
+++ b/vendor/github.com/coreos/etcd/clientv3/balancer.go
@@ -15,11 +15,11 @@
package clientv3
import (
+ "context"
"net/url"
"strings"
"sync"
- "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
)
@@ -29,11 +29,40 @@ import (
// This error is returned only when opts.BlockingWait is true.
var ErrNoAddrAvilable = grpc.Errorf(codes.Unavailable, "there is no address available")
+type notifyMsg int
+
+const (
+ notifyReset notifyMsg = iota
+ notifyNext
+)
+
+type balancer interface {
+ grpc.Balancer
+ ConnectNotify() <-chan struct{}
+
+ endpoint(host string) string
+ endpoints() []string
+
+ // up is Up but includes whether the balancer will use the connection.
+ up(addr grpc.Address) (func(error), bool)
+
+ // updateAddrs changes the balancer's endpoints.
+ updateAddrs(endpoints ...string)
+ // ready returns a channel that closes when the balancer first connects.
+ ready() <-chan struct{}
+ // next forces the balancer to switch endpoints.
+ next()
+}
+
// simpleBalancer does the bare minimum to expose multiple eps
// to the grpc reconnection code path
type simpleBalancer struct {
- // addrs are the client's endpoints for grpc
+ // addrs are the client's endpoint addresses for grpc
addrs []grpc.Address
+
+ // eps holds the raw endpoints from the client
+ eps []string
+
// notifyCh notifies grpc of the set of addresses for connecting
notifyCh chan []grpc.Address
@@ -41,10 +70,10 @@ type simpleBalancer struct {
readyc chan struct{}
readyOnce sync.Once
- // mu protects upEps, pinAddr, and connectingAddr
+ // mu protects all fields below.
mu sync.RWMutex
- // upc closes when upEps transitions from empty to non-zero or the balancer closes.
+ // upc closes when pinAddr transitions from empty to non-empty or the balancer closes.
upc chan struct{}
// downc closes when grpc calls down() on pinAddr
@@ -57,7 +86,7 @@ type simpleBalancer struct {
donec chan struct{}
// updateAddrsC notifies updateNotifyLoop to update addrs.
- updateAddrsC chan struct{}
+ updateAddrsC chan notifyMsg
// grpc issues TLS cert checks using the string passed into dial so
// that string must be the host. To recover the full scheme://host URL,
@@ -65,27 +94,25 @@ type simpleBalancer struct {
host2ep map[string]string
// pinAddr is the currently pinned address; set to the empty string on
- // intialization and shutdown.
+ // initialization and shutdown.
pinAddr string
closed bool
}
func newSimpleBalancer(eps []string) *simpleBalancer {
- notifyCh := make(chan []grpc.Address, 1)
- addrs := make([]grpc.Address, len(eps))
- for i := range eps {
- addrs[i].Addr = getHost(eps[i])
- }
+ notifyCh := make(chan []grpc.Address)
+ addrs := eps2addrs(eps)
sb := &simpleBalancer{
addrs: addrs,
+ eps: eps,
notifyCh: notifyCh,
readyc: make(chan struct{}),
upc: make(chan struct{}),
stopc: make(chan struct{}),
downc: make(chan struct{}),
donec: make(chan struct{}),
- updateAddrsC: make(chan struct{}, 1),
+ updateAddrsC: make(chan notifyMsg),
host2ep: getHost2ep(eps),
}
close(sb.downc)
@@ -101,12 +128,20 @@ func (b *simpleBalancer) ConnectNotify() <-chan struct{} {
return b.upc
}
-func (b *simpleBalancer) getEndpoint(host string) string {
+func (b *simpleBalancer) ready() <-chan struct{} { return b.readyc }
+
+func (b *simpleBalancer) endpoint(host string) string {
b.mu.Lock()
defer b.mu.Unlock()
return b.host2ep[host]
}
+func (b *simpleBalancer) endpoints() []string {
+ b.mu.RLock()
+ defer b.mu.RUnlock()
+ return b.eps
+}
+
func getHost2ep(eps []string) map[string]string {
hm := make(map[string]string, len(eps))
for i := range eps {
@@ -116,7 +151,7 @@ func getHost2ep(eps []string) map[string]string {
return hm
}
-func (b *simpleBalancer) updateAddrs(eps []string) {
+func (b *simpleBalancer) updateAddrs(eps ...string) {
np := getHost2ep(eps)
b.mu.Lock()
@@ -135,27 +170,37 @@ func (b *simpleBalancer) updateAddrs(eps []string) {
}
b.host2ep = np
-
- addrs := make([]grpc.Address, 0, len(eps))
- for i := range eps {
- addrs = append(addrs, grpc.Address{Addr: getHost(eps[i])})
- }
- b.addrs = addrs
+ b.addrs, b.eps = eps2addrs(eps), eps
// updating notifyCh can trigger new connections,
// only update addrs if all connections are down
// or addrs does not include pinAddr.
- update := !hasAddr(addrs, b.pinAddr)
+ update := !hasAddr(b.addrs, b.pinAddr)
b.mu.Unlock()
if update {
select {
- case b.updateAddrsC <- struct{}{}:
+ case b.updateAddrsC <- notifyReset:
case <-b.stopc:
}
}
}
+func (b *simpleBalancer) next() {
+ b.mu.RLock()
+ downc := b.downc
+ b.mu.RUnlock()
+ select {
+ case b.updateAddrsC <- notifyNext:
+ case <-b.stopc:
+ }
+ // wait until disconnect so new RPCs are not issued on old connection
+ select {
+ case <-downc:
+ case <-b.stopc:
+ }
+}
+
func hasAddr(addrs []grpc.Address, targetAddr string) bool {
for _, addr := range addrs {
if targetAddr == addr.Addr {
@@ -192,11 +237,11 @@ func (b *simpleBalancer) updateNotifyLoop() {
default:
}
case downc == nil:
- b.notifyAddrs()
+ b.notifyAddrs(notifyReset)
select {
case <-upc:
- case <-b.updateAddrsC:
- b.notifyAddrs()
+ case msg := <-b.updateAddrsC:
+ b.notifyAddrs(msg)
case <-b.stopc:
return
}
@@ -210,16 +255,24 @@ func (b *simpleBalancer) updateNotifyLoop() {
}
select {
case <-downc:
- case <-b.updateAddrsC:
+ b.notifyAddrs(notifyReset)
+ case msg := <-b.updateAddrsC:
+ b.notifyAddrs(msg)
case <-b.stopc:
return
}
- b.notifyAddrs()
}
}
}
-func (b *simpleBalancer) notifyAddrs() {
+func (b *simpleBalancer) notifyAddrs(msg notifyMsg) {
+ if msg == notifyNext {
+ select {
+ case b.notifyCh <- []grpc.Address{}:
+ case <-b.stopc:
+ return
+ }
+ }
b.mu.RLock()
addrs := b.addrs
b.mu.RUnlock()
@@ -230,22 +283,27 @@ func (b *simpleBalancer) notifyAddrs() {
}
func (b *simpleBalancer) Up(addr grpc.Address) func(error) {
+ f, _ := b.up(addr)
+ return f
+}
+
+func (b *simpleBalancer) up(addr grpc.Address) (func(error), bool) {
b.mu.Lock()
defer b.mu.Unlock()
// gRPC might call Up after it called Close. We add this check
- // to "fix" it up at application layer. Or our simplerBalancer
- // might panic since b.upc is closed.
+ // to "fix" it up at application layer. Otherwise, will panic
+ // if b.upc is already closed.
if b.closed {
- return func(err error) {}
+ return func(err error) {}, false
}
// gRPC might call Up on a stale address.
// Prevent updating pinAddr with a stale address.
if !hasAddr(b.addrs, addr.Addr) {
- return func(err error) {}
+ return func(err error) {}, false
}
if b.pinAddr != "" {
- return func(err error) {}
+ return func(err error) {}, false
}
// notify waiting Get()s and pin first connected address
close(b.upc)
@@ -259,7 +317,7 @@ func (b *simpleBalancer) Up(addr grpc.Address) func(error) {
close(b.downc)
b.pinAddr = ""
b.mu.Unlock()
- }
+ }, true
}
func (b *simpleBalancer) Get(ctx context.Context, opts grpc.BalancerGetOptions) (grpc.Address, func(), error) {
@@ -327,8 +385,8 @@ func (b *simpleBalancer) Close() error {
// In the case of following scenario:
// 1. upc is not closed; no pinned address
- // 2. client issues an rpc, calling invoke(), which calls Get(), enters for loop, blocks
- // 3. clientconn.Close() calls balancer.Close(); closed = true
+ // 2. client issues an RPC, calling invoke(), which calls Get(), enters for loop, blocks
+ // 3. client.conn.Close() calls balancer.Close(); closed = true
// 4. for loop in Get() never exits since ctx is the context passed in by the client and may not be canceled
// we must close upc so Get() exits from blocking on upc
select {
@@ -354,3 +412,11 @@ func getHost(ep string) string {
}
return url.Host
}
+
+func eps2addrs(eps []string) []grpc.Address {
+ addrs := make([]grpc.Address, len(eps))
+ for i := range eps {
+ addrs[i].Addr = getHost(eps[i])
+ }
+ return addrs
+}
diff --git a/vendor/github.com/coreos/etcd/clientv3/balancer_test.go b/vendor/github.com/coreos/etcd/clientv3/balancer_test.go
index 5245b69a2..7048f939c 100644
--- a/vendor/github.com/coreos/etcd/clientv3/balancer_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/balancer_test.go
@@ -15,6 +15,7 @@
package clientv3
import (
+ "context"
"errors"
"net"
"sync"
@@ -24,7 +25,6 @@ import (
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
@@ -84,8 +84,9 @@ func TestBalancerGetBlocking(t *testing.T) {
}
blockingOpts := grpc.BalancerGetOptions{BlockingWait: true}
- ctx, _ := context.WithTimeout(context.Background(), time.Millisecond*100)
+ ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*100)
_, _, err := sb.Get(ctx, blockingOpts)
+ cancel()
if err != context.DeadlineExceeded {
t.Errorf("Get() with no up endpoints should timeout, got %v", err)
}
@@ -124,13 +125,74 @@ func TestBalancerGetBlocking(t *testing.T) {
t.Errorf("closing the only connection should triggered balancer to send the all endpoints via Notify chan so that we can establish a connection")
}
down2(errors.New("error"))
- ctx, _ = context.WithTimeout(context.Background(), time.Millisecond*100)
+ ctx, cancel = context.WithTimeout(context.Background(), time.Millisecond*100)
_, _, err = sb.Get(ctx, blockingOpts)
+ cancel()
if err != context.DeadlineExceeded {
t.Errorf("Get() with no up endpoints should timeout, got %v", err)
}
}
+// TestHealthBalancerGraylist checks one endpoint is tried after the other
+// due to gray listing.
+func TestHealthBalancerGraylist(t *testing.T) {
+ var wg sync.WaitGroup
+ // Use 3 endpoints so gray list doesn't fallback to all connections
+ // after failing on 2 endpoints.
+ lns, eps := make([]net.Listener, 3), make([]string, 3)
+ wg.Add(3)
+ connc := make(chan string, 2)
+ for i := range eps {
+ ln, err := net.Listen("tcp", ":0")
+ testutil.AssertNil(t, err)
+ lns[i], eps[i] = ln, ln.Addr().String()
+ go func() {
+ defer wg.Done()
+ for {
+ conn, err := ln.Accept()
+ if err != nil {
+ return
+ }
+ _, err = conn.Read(make([]byte, 512))
+ conn.Close()
+ if err == nil {
+ select {
+ case connc <- ln.Addr().String():
+ // sleep some so balancer catches up
+ // before attempted next reconnect.
+ time.Sleep(50 * time.Millisecond)
+ default:
+ }
+ }
+ }
+ }()
+ }
+
+ sb := newSimpleBalancer(eps)
+ tf := func(s string) (bool, error) { return false, nil }
+ hb := newHealthBalancer(sb, 5*time.Second, tf)
+
+ conn, err := grpc.Dial("", grpc.WithInsecure(), grpc.WithBalancer(hb))
+ testutil.AssertNil(t, err)
+ defer conn.Close()
+
+ kvc := pb.NewKVClient(conn)
+ <-hb.ready()
+
+ kvc.Range(context.TODO(), &pb.RangeRequest{})
+ ep1 := <-connc
+ kvc.Range(context.TODO(), &pb.RangeRequest{})
+ ep2 := <-connc
+ for _, ln := range lns {
+ ln.Close()
+ }
+ wg.Wait()
+
+ if ep1 == ep2 {
+ t.Fatalf("expected %q != %q", ep1, ep2)
+ }
+}
+
// TestBalancerDoNotBlockOnClose ensures that balancer and grpc don't deadlock each other
// due to rapid open/close conn. The deadlock causes balancer.Close() to block forever.
// See issue: https://github.com/coreos/etcd/issues/7283 for more detail.
diff --git a/vendor/github.com/coreos/etcd/clientv3/client.go b/vendor/github.com/coreos/etcd/clientv3/client.go
index 1f8c83f57..06e2d7713 100644
--- a/vendor/github.com/coreos/etcd/clientv3/client.go
+++ b/vendor/github.com/coreos/etcd/clientv3/client.go
@@ -15,6 +15,7 @@
package clientv3
import (
+ "context"
"crypto/tls"
"errors"
"fmt"
@@ -27,12 +28,12 @@ import (
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
- "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/metadata"
+ "google.golang.org/grpc/status"
)
var (
@@ -54,14 +55,15 @@ type Client struct {
cfg Config
creds *credentials.TransportCredentials
- balancer *simpleBalancer
+ balancer balancer
+ mu sync.Mutex
ctx context.Context
cancel context.CancelFunc
- // Username is a username for authentication
+ // Username is a user name for authentication.
Username string
- // Password is a password for authentication
+ // Password is a password for authentication.
Password string
// tokenCred is an instance of WithPerRPCCredentials()'s argument
tokenCred *authTokenCredential
@@ -115,8 +117,10 @@ func (c *Client) Endpoints() (eps []string) {
// SetEndpoints updates client's endpoints.
func (c *Client) SetEndpoints(eps ...string) {
+ c.mu.Lock()
c.cfg.Endpoints = eps
- c.balancer.updateAddrs(eps)
+ c.mu.Unlock()
+ c.balancer.updateAddrs(eps...)
}
// Sync synchronizes client's endpoints with the known endpoints from the etcd membership.
@@ -143,8 +147,10 @@ func (c *Client) autoSync() {
case <-c.ctx.Done():
return
case <-time.After(c.cfg.AutoSyncInterval):
- ctx, _ := context.WithTimeout(c.ctx, 5*time.Second)
- if err := c.Sync(ctx); err != nil && err != c.ctx.Err() {
+ ctx, cancel := context.WithTimeout(c.ctx, 5*time.Second)
+ err := c.Sync(ctx)
+ cancel()
+ if err != nil && err != c.ctx.Err() {
logger.Println("Auto sync endpoints failed:", err)
}
}
@@ -216,18 +222,15 @@ func (c *Client) dialSetupOpts(endpoint string, dopts ...grpc.DialOption) (opts
}
if c.cfg.DialKeepAliveTime > 0 {
params := keepalive.ClientParameters{
- Time: c.cfg.DialKeepAliveTime,
- }
- // Only relevant when KeepAliveTime is non-zero
- if c.cfg.DialKeepAliveTimeout > 0 {
- params.Timeout = c.cfg.DialKeepAliveTimeout
+ Time: c.cfg.DialKeepAliveTime,
+ Timeout: c.cfg.DialKeepAliveTimeout,
}
opts = append(opts, grpc.WithKeepaliveParams(params))
}
opts = append(opts, dopts...)
f := func(host string, t time.Duration) (net.Conn, error) {
- proto, host, _ := parseEndpoint(c.balancer.getEndpoint(host))
+ proto, host, _ := parseEndpoint(c.balancer.endpoint(host))
if host == "" && endpoint != "" {
// dialing an endpoint not in the balancer; use
// endpoint passed into dial
@@ -320,7 +323,7 @@ func (c *Client) dial(endpoint string, dopts ...grpc.DialOption) (*grpc.ClientCo
if err != nil {
if toErr(ctx, err) != rpctypes.ErrAuthNotEnabled {
if err == ctx.Err() && ctx.Err() != c.ctx.Err() {
- err = grpc.ErrClientConnTimeout
+ err = context.DeadlineExceeded
}
return nil, err
}
@@ -375,9 +378,12 @@ func newClient(cfg *Config) (*Client, error) {
client.Password = cfg.Password
}
- client.balancer = newSimpleBalancer(cfg.Endpoints)
+ sb := newSimpleBalancer(cfg.Endpoints)
+ hc := func(ep string) (bool, error) { return grpcHealthCheck(client, ep) }
+ client.balancer = newHealthBalancer(sb, cfg.DialTimeout, hc)
+
// use Endpoints[0] so that for https:// without any tls config given, then
- // grpc will assume the ServerName is in the endpoint.
+ // grpc will assume the certificate server name is the endpoint host.
conn, err := client.dial(cfg.Endpoints[0], grpc.WithBalancer(client.balancer))
if err != nil {
client.cancel()
@@ -391,13 +397,13 @@ func newClient(cfg *Config) (*Client, error) {
hasConn := false
waitc := time.After(cfg.DialTimeout)
select {
- case <-client.balancer.readyc:
+ case <-client.balancer.ready():
hasConn = true
case <-ctx.Done():
case <-waitc:
}
if !hasConn {
- err := grpc.ErrClientConnTimeout
+ err := context.DeadlineExceeded
select {
case err = <-client.dialerrc:
default:
@@ -432,7 +438,7 @@ func (c *Client) checkVersion() (err error) {
errc := make(chan error, len(c.cfg.Endpoints))
ctx, cancel := context.WithCancel(c.ctx)
if c.cfg.DialTimeout > 0 {
- ctx, _ = context.WithTimeout(ctx, c.cfg.DialTimeout)
+ ctx, cancel = context.WithTimeout(ctx, c.cfg.DialTimeout)
}
wg.Add(len(c.cfg.Endpoints))
for _, ep := range c.cfg.Endpoints {
@@ -479,14 +485,14 @@ func isHaltErr(ctx context.Context, err error) bool {
if err == nil {
return false
}
- code := grpc.Code(err)
+ ev, _ := status.FromError(err)
// Unavailable codes mean the system will be right back.
// (e.g., can't connect, lost leader)
// Treat Internal codes as if something failed, leaving the
// system in an inconsistent state, but retrying could make progress.
// (e.g., failed in middle of send, corrupted frame)
// TODO: are permanent Internal errors possible from grpc?
- return code != codes.Unavailable && code != codes.Internal
+ return ev.Code() != codes.Unavailable && ev.Code() != codes.Internal
}
func toErr(ctx context.Context, err error) error {
@@ -497,7 +503,8 @@ func toErr(ctx context.Context, err error) error {
if _, ok := err.(rpctypes.EtcdError); ok {
return err
}
- code := grpc.Code(err)
+ ev, _ := status.FromError(err)
+ code := ev.Code()
switch code {
case codes.DeadlineExceeded:
fallthrough
diff --git a/vendor/github.com/coreos/etcd/clientv3/client_test.go b/vendor/github.com/coreos/etcd/clientv3/client_test.go
index dd3e144b7..d09e64330 100644
--- a/vendor/github.com/coreos/etcd/clientv3/client_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/client_test.go
@@ -15,6 +15,7 @@
package clientv3
import (
+ "context"
"fmt"
"net"
"testing"
@@ -22,8 +23,6 @@ import (
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
)
func TestDialCancel(t *testing.T) {
@@ -45,7 +44,7 @@ func TestDialCancel(t *testing.T) {
t.Fatal(err)
}
- // connect to ipv4 blackhole so dial blocks
+ // connect to ipv4 black hole so dial blocks
c.SetEndpoints("http://254.0.0.1:12345")
// issue Get to force redial attempts
@@ -97,7 +96,7 @@ func TestDialTimeout(t *testing.T) {
for i, cfg := range testCfgs {
donec := make(chan error)
go func() {
- // without timeout, dial continues forever on ipv4 blackhole
+ // without timeout, dial continues forever on ipv4 black hole
c, err := New(cfg)
if c != nil || err == nil {
t.Errorf("#%d: new client should fail", i)
@@ -117,8 +116,8 @@ func TestDialTimeout(t *testing.T) {
case <-time.After(5 * time.Second):
t.Errorf("#%d: failed to timeout dial on time", i)
case err := <-donec:
- if err != grpc.ErrClientConnTimeout {
- t.Errorf("#%d: unexpected error %v, want %v", i, err, grpc.ErrClientConnTimeout)
+ if err != context.DeadlineExceeded {
+ t.Errorf("#%d: unexpected error %v, want %v", i, err, context.DeadlineExceeded)
}
}
}
diff --git a/vendor/github.com/coreos/etcd/clientv3/clientv3util/example_key_test.go b/vendor/github.com/coreos/etcd/clientv3/clientv3util/example_key_test.go
index ed6d0f695..8b30ae5c8 100644
--- a/vendor/github.com/coreos/etcd/clientv3/clientv3util/example_key_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/clientv3util/example_key_test.go
@@ -33,7 +33,7 @@ func ExampleKeyExists_put() {
kvc := clientv3.NewKV(cli)
// perform a put only if key is missing
- // It is useful to do the check (transactionally) to avoid overwriting
+ // It is useful to do the check atomically to avoid overwriting
// the existing key which would generate potentially unwanted events,
// unless of course you wanted to do an overwrite no matter what.
_, err = kvc.Txn(context.Background()).
diff --git a/vendor/github.com/coreos/etcd/clientv3/cluster.go b/vendor/github.com/coreos/etcd/clientv3/cluster.go
index 922d900e3..bbecaaca7 100644
--- a/vendor/github.com/coreos/etcd/clientv3/cluster.go
+++ b/vendor/github.com/coreos/etcd/clientv3/cluster.go
@@ -15,8 +15,9 @@
package clientv3
import (
+ "context"
+
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/clientv3/compact_op.go b/vendor/github.com/coreos/etcd/clientv3/compact_op.go
index 32d97eb0c..41e80c1da 100644
--- a/vendor/github.com/coreos/etcd/clientv3/compact_op.go
+++ b/vendor/github.com/coreos/etcd/clientv3/compact_op.go
@@ -44,10 +44,8 @@ func (op CompactOp) toRequest() *pb.CompactionRequest {
return &pb.CompactionRequest{Revision: op.revision, Physical: op.physical}
}
-// WithCompactPhysical makes compact RPC call wait until
-// the compaction is physically applied to the local database
-// such that compacted entries are totally removed from the
-// backend database.
+// WithCompactPhysical makes Compact wait until all compacted entries are
+// removed from the etcd server's storage.
func WithCompactPhysical() CompactOption {
return func(op *CompactOp) { op.physical = true }
}
diff --git a/vendor/github.com/coreos/etcd/clientv3/compare.go b/vendor/github.com/coreos/etcd/clientv3/compare.go
index 18131e8b4..b5f0a2552 100644
--- a/vendor/github.com/coreos/etcd/clientv3/compare.go
+++ b/vendor/github.com/coreos/etcd/clientv3/compare.go
@@ -61,7 +61,7 @@ func Compare(cmp Cmp, result string, v interface{}) Cmp {
case pb.Compare_MOD:
cmp.TargetUnion = &pb.Compare_ModRevision{ModRevision: mustInt64(v)}
case pb.Compare_LEASE:
- cmp.TargetUnion = &pb.Compare_Lease{Lease: mustInt64(v)}
+ cmp.TargetUnion = &pb.Compare_Lease{Lease: mustInt64orLeaseID(v)}
default:
panic("Unknown compare type")
}
@@ -84,6 +84,12 @@ func ModRevision(key string) Cmp {
return Cmp{Key: []byte(key), Target: pb.Compare_MOD}
}
+// LeaseValue compares a key's LeaseID to a value of your choosing. The empty
+// LeaseID is 0, otherwise known as `NoLease`.
+func LeaseValue(key string) Cmp {
+ return Cmp{Key: []byte(key), Target: pb.Compare_LEASE}
+}
+
// KeyBytes returns the byte slice holding with the comparison key.
func (cmp *Cmp) KeyBytes() []byte { return cmp.Key }
@@ -113,6 +119,7 @@ func (cmp Cmp) WithPrefix() Cmp {
return cmp
}
+// mustInt64 panics if val isn't an int or int64. It returns an int64 otherwise.
func mustInt64(val interface{}) int64 {
if v, ok := val.(int64); ok {
return v
@@ -122,3 +129,12 @@ func mustInt64(val interface{}) int64 {
}
panic("bad value")
}
+
+// mustInt64orLeaseID panics if val isn't a LeaseID, int or int64. It returns an
+// int64 otherwise.
+func mustInt64orLeaseID(val interface{}) int64 {
+ if v, ok := val.(LeaseID); ok {
+ return int64(v)
+ }
+ return mustInt64(val)
+}
diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go
index 1d75dde3d..e18a0ed4a 100644
--- a/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go
+++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/election.go
@@ -15,13 +15,13 @@
package concurrency
import (
+ "context"
"errors"
"fmt"
v3 "github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
var (
@@ -185,12 +185,12 @@ func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) {
cancel()
return
}
- // only accept PUTs; a DELETE will make observe() spin
+ // only accept puts; a delete will make observe() spin
for _, ev := range wr.Events {
if ev.Type == mvccpb.PUT {
hdr, kv = &wr.Header, ev.Kv
// may have multiple revs; hdr.rev = the last rev
- // set to kv's rev in case batch has multiple PUTs
+ // set to kv's rev in case batch has multiple Puts
hdr.Revision = kv.ModRevision
break
}
@@ -213,6 +213,7 @@ func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) {
for !keyDeleted {
wr, ok := <-wch
if !ok {
+ cancel()
return
}
for _, ev := range wr.Events {
@@ -225,6 +226,7 @@ func (e *Election) observe(ctx context.Context, ch chan<- v3.GetResponse) {
select {
case ch <- *resp:
case <-cctx.Done():
+ cancel()
return
}
}
@@ -240,4 +242,4 @@ func (e *Election) Key() string { return e.leaderKey }
func (e *Election) Rev() int64 { return e.leaderRev }
// Header is the response header from the last successful election proposal.
-func (m *Election) Header() *pb.ResponseHeader { return m.hdr }
+func (e *Election) Header() *pb.ResponseHeader { return e.hdr }
diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/example_stm_test.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/example_stm_test.go
index 54c871d36..9eca53009 100644
--- a/vendor/github.com/coreos/etcd/clientv3/concurrency/example_stm_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/example_stm_test.go
@@ -60,7 +60,7 @@ func ExampleSTM_apply() {
xfer := fromInt / 2
fromInt, toInt = fromInt-xfer, toInt+xfer
- // writeback
+ // write back
stm.Put(fromK, fmt.Sprintf("%d", fromInt))
stm.Put(toK, fmt.Sprintf("%d", toInt))
return nil
diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go
index cf006d70e..4b6e399bd 100644
--- a/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go
+++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/key.go
@@ -15,12 +15,12 @@
package concurrency
import (
+ "context"
"fmt"
v3 "github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
func waitDelete(ctx context.Context, client *v3.Client, key string, rev int64) error {
diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go
index 83df27c79..dac9ba5a2 100644
--- a/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go
+++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/mutex.go
@@ -15,12 +15,12 @@
package concurrency
import (
+ "context"
"fmt"
"sync"
v3 "github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
)
// Mutex implements the sync Locker interface with etcd
diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go
index 0cb5ea7cf..c399d64a6 100644
--- a/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go
+++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/session.go
@@ -15,10 +15,10 @@
package concurrency
import (
+ "context"
"time"
v3 "github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
const defaultSessionTTL = 60
@@ -53,6 +53,7 @@ func NewSession(client *v3.Client, opts ...SessionOption) (*Session, error) {
ctx, cancel := context.WithCancel(ops.ctx)
keepAlive, err := client.KeepAlive(ctx, id)
if err != nil || keepAlive == nil {
+ cancel()
return nil, err
}
diff --git a/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go b/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go
index 9b6576f68..d11023ebe 100644
--- a/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go
+++ b/vendor/github.com/coreos/etcd/clientv3/concurrency/stm.go
@@ -15,10 +15,10 @@
package concurrency
import (
+ "context"
"math"
v3 "github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
// STM is an interface for software transactional memory.
diff --git a/vendor/github.com/coreos/etcd/clientv3/config.go b/vendor/github.com/coreos/etcd/clientv3/config.go
index d9545e430..87d61cf57 100644
--- a/vendor/github.com/coreos/etcd/clientv3/config.go
+++ b/vendor/github.com/coreos/etcd/clientv3/config.go
@@ -15,10 +15,10 @@
package clientv3
import (
+ "context"
"crypto/tls"
"time"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
@@ -44,7 +44,7 @@ type Config struct {
// TLS holds the client secure credentials, if any.
TLS *tls.Config
- // Username is a username for authentication.
+ // Username is a user name for authentication.
Username string `json:"username"`
// Password is a password for authentication.
diff --git a/vendor/github.com/coreos/etcd/clientv3/doc.go b/vendor/github.com/coreos/etcd/clientv3/doc.go
index 470ca4dc4..dacc5bb34 100644
--- a/vendor/github.com/coreos/etcd/clientv3/doc.go
+++ b/vendor/github.com/coreos/etcd/clientv3/doc.go
@@ -28,7 +28,7 @@
// Make sure to close the client after using it. If the client is not closed, the
// connection will have leaky goroutines.
//
-// To specify client request timeout, pass context.WithTimeout to APIs:
+// To specify a client request timeout, wrap the context with context.WithTimeout:
//
// ctx, cancel := context.WithTimeout(context.Background(), timeout)
// resp, err := kvc.Put(ctx, "sample_key", "sample_value")
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_auth_test.go b/vendor/github.com/coreos/etcd/clientv3/example_auth_test.go
index f07e5095c..8200df998 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_auth_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_auth_test.go
@@ -15,11 +15,11 @@
package clientv3_test
import (
+ "context"
"fmt"
"log"
"github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
func ExampleAuth() {
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_cluster_test.go b/vendor/github.com/coreos/etcd/clientv3/example_cluster_test.go
index e9e516ba9..5aa03fd65 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_cluster_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_cluster_test.go
@@ -15,11 +15,11 @@
package clientv3_test
import (
+ "context"
"fmt"
"log"
"github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
func ExampleCluster_memberList() {
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_kv_test.go b/vendor/github.com/coreos/etcd/clientv3/example_kv_test.go
index 340b07811..e2476e3e7 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_kv_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_kv_test.go
@@ -15,12 +15,12 @@
package clientv3_test
import (
+ "context"
"fmt"
"log"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
- "golang.org/x/net/context"
)
func ExampleKV_put() {
@@ -236,8 +236,11 @@ func ExampleKV_txn() {
ctx, cancel := context.WithTimeout(context.Background(), requestTimeout)
_, err = kvc.Txn(ctx).
- If(clientv3.Compare(clientv3.Value("key"), ">", "abc")). // txn value comparisons are lexical
- Then(clientv3.OpPut("key", "XYZ")). // this runs, since 'xyz' > 'abc'
+ // txn value comparisons are lexical
+ If(clientv3.Compare(clientv3.Value("key"), ">", "abc")).
+ // the "Then" runs, since "xyz" > "abc"
+ Then(clientv3.OpPut("key", "XYZ")).
+ // the "Else" does not run
Else(clientv3.OpPut("key", "ABC")).
Commit()
cancel()
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_lease_test.go b/vendor/github.com/coreos/etcd/clientv3/example_lease_test.go
index e1bd57a15..98db148b9 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_lease_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_lease_test.go
@@ -15,11 +15,11 @@
package clientv3_test
import (
+ "context"
"fmt"
"log"
"github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
func ExampleLease_grant() {
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_maintenence_test.go b/vendor/github.com/coreos/etcd/clientv3/example_maintenence_test.go
index 9753176aa..a66a23abc 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_maintenence_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_maintenence_test.go
@@ -15,11 +15,10 @@
package clientv3_test
import (
+ "context"
"fmt"
"log"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/clientv3"
)
@@ -34,20 +33,15 @@ func ExampleMaintenance_status() {
}
defer cli.Close()
- // resp, err := cli.Status(context.Background(), ep)
- //
- // or
- //
- mapi := clientv3.NewMaintenance(cli)
- resp, err := mapi.Status(context.Background(), ep)
+ resp, err := cli.Status(context.Background(), ep)
if err != nil {
log.Fatal(err)
}
- fmt.Printf("endpoint: %s / IsLeader: %v\n", ep, resp.Header.MemberId == resp.Leader)
+ fmt.Printf("endpoint: %s / Leader: %v\n", ep, resp.Header.MemberId == resp.Leader)
}
- // endpoint: localhost:2379 / IsLeader: false
- // endpoint: localhost:22379 / IsLeader: false
- // endpoint: localhost:32379 / IsLeader: true
+ // endpoint: localhost:2379 / Leader: false
+ // endpoint: localhost:22379 / Leader: false
+ // endpoint: localhost:32379 / Leader: true
}
func ExampleMaintenance_defragment() {
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_metrics_test.go b/vendor/github.com/coreos/etcd/clientv3/example_metrics_test.go
index 6e5fd5e09..8406bfefd 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_metrics_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_metrics_test.go
@@ -15,6 +15,7 @@
package clientv3_test
import (
+ "context"
"fmt"
"io/ioutil"
"log"
@@ -26,7 +27,6 @@ import (
grpcprom "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/prometheus/client_golang/prometheus"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
@@ -43,7 +43,7 @@ func ExampleClient_metrics() {
}
defer cli.Close()
- // get a key so it shows up in the metrics as a range rpc
+ // get a key so it shows up in the metrics as a range RPC
cli.Get(context.TODO(), "test_key")
// listen for all prometheus metrics
@@ -80,5 +80,6 @@ func ExampleClient_metrics() {
break
}
}
- // Output: grpc_client_started_total{grpc_method="Range",grpc_service="etcdserverpb.KV",grpc_type="unary"} 1
+ // Output:
+ // grpc_client_started_total{grpc_method="Range",grpc_service="etcdserverpb.KV",grpc_type="unary"} 1
}
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_test.go b/vendor/github.com/coreos/etcd/clientv3/example_test.go
index 4e9b5042d..e486981e5 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_test.go
@@ -15,13 +15,15 @@
package clientv3_test
import (
+ "context"
"log"
+ "os"
"time"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/pkg/transport"
- "github.com/coreos/pkg/capnslog"
- "golang.org/x/net/context"
+
+ "google.golang.org/grpc/grpclog"
)
var (
@@ -31,8 +33,7 @@ var (
)
func Example() {
- var plog = capnslog.NewPackageLogger("github.com/coreos/etcd", "clientv3")
- clientv3.SetLogger(plog)
+ clientv3.SetLogger(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
cli, err := clientv3.New(clientv3.Config{
Endpoints: endpoints,
diff --git a/vendor/github.com/coreos/etcd/clientv3/example_watch_test.go b/vendor/github.com/coreos/etcd/clientv3/example_watch_test.go
index b3a0f1dd2..08c199b38 100644
--- a/vendor/github.com/coreos/etcd/clientv3/example_watch_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/example_watch_test.go
@@ -15,11 +15,11 @@
package clientv3_test
import (
+ "context"
"fmt"
"log"
"github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
func ExampleWatcher_watch() {
diff --git a/vendor/github.com/coreos/etcd/clientv3/health_balancer.go b/vendor/github.com/coreos/etcd/clientv3/health_balancer.go
new file mode 100644
index 000000000..25c2b1c6b
--- /dev/null
+++ b/vendor/github.com/coreos/etcd/clientv3/health_balancer.go
@@ -0,0 +1,212 @@
+// Copyright 2017 The etcd 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 clientv3
+
+import (
+ "context"
+ "sync"
+ "time"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/codes"
+ healthpb "google.golang.org/grpc/health/grpc_health_v1"
+ "google.golang.org/grpc/status"
+)
+
+const minHealthRetryDuration = 3 * time.Second
+const unknownService = "unknown service grpc.health.v1.Health"
+
+type healthCheckFunc func(ep string) (bool, error)
+
+// healthBalancer wraps a balancer so that it uses health checking
+// to choose its endpoints.
+type healthBalancer struct {
+ balancer
+
+ // healthCheck checks an endpoint's health.
+ healthCheck healthCheckFunc
+
+ // mu protects addrs, eps, unhealthy map, and stopc.
+ mu sync.RWMutex
+
+ // addrs stores all grpc addresses associated with the balancer.
+ addrs []grpc.Address
+
+ // eps stores all client endpoints
+ eps []string
+
+ // unhealthy tracks the last unhealthy time of endpoints.
+ unhealthy map[string]time.Time
+
+ stopc chan struct{}
+ stopOnce sync.Once
+
+ host2ep map[string]string
+
+ wg sync.WaitGroup
+}
+
+func newHealthBalancer(b balancer, timeout time.Duration, hc healthCheckFunc) *healthBalancer {
+ hb := &healthBalancer{
+ balancer: b,
+ healthCheck: hc,
+ eps: b.endpoints(),
+ addrs: eps2addrs(b.endpoints()),
+ host2ep: getHost2ep(b.endpoints()),
+ unhealthy: make(map[string]time.Time),
+ stopc: make(chan struct{}),
+ }
+ if timeout < minHealthRetryDuration {
+ timeout = minHealthRetryDuration
+ }
+
+ hb.wg.Add(1)
+ go func() {
+ defer hb.wg.Done()
+ hb.updateUnhealthy(timeout)
+ }()
+
+ return hb
+}
+
+func (hb *healthBalancer) Up(addr grpc.Address) func(error) {
+ f, used := hb.up(addr)
+ if !used {
+ return f
+ }
+ return func(err error) {
+ // If connected to a black hole endpoint or a killed server, the gRPC ping
+ // timeout will induce a network I/O error, and retrying until success;
+ // finding healthy endpoint on retry could take several timeouts and redials.
+ // To avoid wasting retries, gray-list unhealthy endpoints.
+ hb.mu.Lock()
+ hb.unhealthy[addr.Addr] = time.Now()
+ hb.mu.Unlock()
+ f(err)
+ }
+}
+
+func (hb *healthBalancer) up(addr grpc.Address) (func(error), bool) {
+ if !hb.mayPin(addr) {
+ return func(err error) {}, false
+ }
+ return hb.balancer.up(addr)
+}
+
+func (hb *healthBalancer) Close() error {
+ hb.stopOnce.Do(func() { close(hb.stopc) })
+ hb.wg.Wait()
+ return hb.balancer.Close()
+}
+
+func (hb *healthBalancer) updateAddrs(eps ...string) {
+ addrs, host2ep := eps2addrs(eps), getHost2ep(eps)
+ hb.mu.Lock()
+ hb.addrs, hb.eps, hb.host2ep = addrs, eps, host2ep
+ hb.mu.Unlock()
+ hb.balancer.updateAddrs(eps...)
+}
+
+func (hb *healthBalancer) endpoint(host string) string {
+ hb.mu.RLock()
+ defer hb.mu.RUnlock()
+ return hb.host2ep[host]
+}
+
+func (hb *healthBalancer) endpoints() []string {
+ hb.mu.RLock()
+ defer hb.mu.RUnlock()
+ return hb.eps
+}
+
+func (hb *healthBalancer) updateUnhealthy(timeout time.Duration) {
+ for {
+ select {
+ case <-time.After(timeout):
+ hb.mu.Lock()
+ for k, v := range hb.unhealthy {
+ if time.Since(v) > timeout {
+ delete(hb.unhealthy, k)
+ }
+ }
+ hb.mu.Unlock()
+ eps := []string{}
+ for _, addr := range hb.liveAddrs() {
+ eps = append(eps, hb.endpoint(addr.Addr))
+ }
+ hb.balancer.updateAddrs(eps...)
+ case <-hb.stopc:
+ return
+ }
+ }
+}
+
+func (hb *healthBalancer) liveAddrs() []grpc.Address {
+ hb.mu.RLock()
+ defer hb.mu.RUnlock()
+ hbAddrs := hb.addrs
+ if len(hb.addrs) == 1 || len(hb.unhealthy) == 0 || len(hb.unhealthy) == len(hb.addrs) {
+ return hbAddrs
+ }
+ addrs := make([]grpc.Address, 0, len(hb.addrs)-len(hb.unhealthy))
+ for _, addr := range hb.addrs {
+ if _, unhealthy := hb.unhealthy[addr.Addr]; !unhealthy {
+ addrs = append(addrs, addr)
+ }
+ }
+ return addrs
+}
+
+func (hb *healthBalancer) mayPin(addr grpc.Address) bool {
+ hb.mu.RLock()
+ skip := len(hb.addrs) == 1 || len(hb.unhealthy) == 0
+ _, bad := hb.unhealthy[addr.Addr]
+ hb.mu.RUnlock()
+ if skip || !bad {
+ return true
+ }
+ if ok, _ := hb.healthCheck(addr.Addr); ok {
+ hb.mu.Lock()
+ delete(hb.unhealthy, addr.Addr)
+ hb.mu.Unlock()
+ return true
+ }
+ hb.mu.Lock()
+ hb.unhealthy[addr.Addr] = time.Now()
+ hb.mu.Unlock()
+ return false
+}
+
+func grpcHealthCheck(client *Client, ep string) (bool, error) {
+ conn, err := client.dial(ep)
+ if err != nil {
+ return false, err
+ }
+ defer conn.Close()
+ cli := healthpb.NewHealthClient(conn)
+ ctx, cancel := context.WithTimeout(context.Background(), time.Second)
+ resp, err := cli.Check(ctx, &healthpb.HealthCheckRequest{})
+ cancel()
+ if err != nil {
+ if s, ok := status.FromError(err); ok && s.Code() == codes.Unavailable {
+ if s.Message() == unknownService {
+ // etcd < v3.3.0
+ return true, nil
+ }
+ }
+ return false, err
+ }
+ return resp.Status == healthpb.HealthCheckResponse_SERVING, nil
+}
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/cluster_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/cluster_test.go
index 6397f8a8a..6abe0c513 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/cluster_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/cluster_test.go
@@ -15,13 +15,13 @@
package integration
import (
+ "context"
"reflect"
"testing"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
"github.com/coreos/etcd/pkg/types"
- "golang.org/x/net/context"
)
func TestMemberList(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/dial_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/dial_test.go
index 31e13937b..ec69900b6 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/dial_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/dial_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"math/rand"
"strings"
"testing"
@@ -25,9 +26,6 @@ import (
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
"github.com/coreos/etcd/pkg/transport"
-
- "golang.org/x/net/context"
- "google.golang.org/grpc"
)
var (
@@ -56,14 +54,14 @@ func TestDialTLSExpired(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- // expect remote errors 'tls: bad certificate'
+ // expect remote errors "tls: bad certificate"
_, err = clientv3.New(clientv3.Config{
Endpoints: []string{clus.Members[0].GRPCAddr()},
DialTimeout: 3 * time.Second,
TLS: tls,
})
- if err != grpc.ErrClientConnTimeout {
- t.Fatalf("expected %v, got %v", grpc.ErrClientConnTimeout, err)
+ if err != context.DeadlineExceeded {
+ t.Fatalf("expected %v, got %v", context.DeadlineExceeded, err)
}
}
@@ -73,17 +71,18 @@ func TestDialTLSNoConfig(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1, ClientTLS: &testTLSInfo})
defer clus.Terminate(t)
- // expect 'signed by unknown authority'
+ // expect "signed by unknown authority"
_, err := clientv3.New(clientv3.Config{
Endpoints: []string{clus.Members[0].GRPCAddr()},
DialTimeout: time.Second,
})
- if err != grpc.ErrClientConnTimeout {
- t.Fatalf("expected %v, got %v", grpc.ErrClientConnTimeout, err)
+ if err != context.DeadlineExceeded {
+ t.Fatalf("expected %v, got %v", context.DeadlineExceeded, err)
}
}
-// TestDialSetEndpoints ensures SetEndpoints can replace unavailable endpoints with available ones.
+// TestDialSetEndpointsBeforeFail ensures SetEndpoints can replace unavailable
+// endpoints with available ones.
func TestDialSetEndpointsBeforeFail(t *testing.T) {
testDialSetEndpoints(t, true)
}
@@ -191,7 +190,7 @@ func TestDialForeignEndpoint(t *testing.T) {
}
}
-// TestSetEndpointAndPut checks that a Put following a SetEndpoint
+// TestSetEndpointAndPut checks that a Put following a SetEndpoints
// to a working endpoint will always succeed.
func TestSetEndpointAndPut(t *testing.T) {
defer testutil.AfterTest(t)
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/kv_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/kv_test.go
index ae7d1c6ac..22c71019f 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/kv_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/kv_test.go
@@ -16,6 +16,7 @@ package integration
import (
"bytes"
+ "context"
"math/rand"
"os"
"reflect"
@@ -28,7 +29,7 @@ import (
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
)
@@ -824,8 +825,8 @@ func TestKVPutStoppedServerAndClose(t *testing.T) {
}
}
-// TestKVGetOneEndpointDown ensures a client can connect and get if one endpoint is down
-func TestKVPutOneEndpointDown(t *testing.T) {
+// TestKVGetOneEndpointDown ensures a client can connect and get if one endpoint is down.
+func TestKVGetOneEndpointDown(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3})
defer clus.Terminate(t)
@@ -932,3 +933,29 @@ func TestKVPutAtMostOnce(t *testing.T) {
t.Fatalf("expected version <= 10, got %+v", resp.Kvs[0])
}
}
+
+func TestKVSwitchUnavailable(t *testing.T) {
+ defer testutil.AfterTest(t)
+ clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 3})
+ defer clus.Terminate(t)
+
+ clus.Members[0].InjectPartition(t, clus.Members[1:])
+ // try to connect with dead node in the endpoint list
+ cfg := clientv3.Config{
+ Endpoints: []string{
+ clus.Members[0].GRPCAddr(),
+ clus.Members[1].GRPCAddr(),
+ },
+ DialTimeout: 1 * time.Second}
+ cli, err := clientv3.New(cfg)
+ if err != nil {
+ t.Fatal(err)
+ }
+ defer cli.Close()
+ timeout := 3 * clus.Members[0].ServerConfig.ReqTimeout()
+ ctx, cancel := context.WithTimeout(context.TODO(), timeout)
+ if _, err := cli.Get(ctx, "abc"); err != nil {
+ t.Fatal(err)
+ }
+ cancel()
+}
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/lease_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/lease_test.go
index ec59cf625..360806ef8 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/lease_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/lease_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"reflect"
"sort"
"sync"
@@ -26,7 +27,7 @@ import (
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
)
@@ -233,7 +234,7 @@ type leaseCh struct {
ch <-chan *clientv3.LeaseKeepAliveResponse
}
-// TestLeaseKeepAliveNotFound ensures a revoked lease won't stop other keep alives
+// TestLeaseKeepAliveNotFound ensures a revoked lease won't halt other leases.
func TestLeaseKeepAliveNotFound(t *testing.T) {
defer testutil.AfterTest(t)
@@ -288,9 +289,7 @@ func TestLeaseGrantErrConnClosed(t *testing.T) {
_, err := cli.Grant(context.TODO(), 5)
if err != nil && err != grpc.ErrClientConnClosing && err != context.Canceled {
// grpc.ErrClientConnClosing if grpc-go balancer calls 'Get' after client.Close.
- // context.Canceled if grpc-go balancer calls 'Get' with inflight client.Close,
- // soon transportMonitor selects on ClientTransport.Error() and resetTransport(false)
- // that cancels the context and closes the transport.
+ // context.Canceled if grpc-go balancer calls 'Get' with an inflight client.Close.
t.Fatalf("expected %v or %v, got %v", grpc.ErrClientConnClosing, context.Canceled, err)
}
}()
@@ -364,7 +363,7 @@ func TestLeaseRevokeNewAfterClose(t *testing.T) {
}
}
-// TestLeaseKeepAliveCloseAfterDisconnectExpire ensures the keep alive channel is closed
+// TestLeaseKeepAliveCloseAfterDisconnectRevoke ensures the keep alive channel is closed
// following a disconnection, lease revoke, then reconnect.
func TestLeaseKeepAliveCloseAfterDisconnectRevoke(t *testing.T) {
defer testutil.AfterTest(t)
@@ -399,7 +398,7 @@ func TestLeaseKeepAliveCloseAfterDisconnectRevoke(t *testing.T) {
clus.Members[0].Restart(t)
- // some keep-alives may still be buffered; drain until close
+ // some responses may still be buffered; drain until close
timer := time.After(time.Duration(kresp.TTL) * time.Second)
for kresp != nil {
select {
@@ -555,8 +554,7 @@ func TestLeaseTimeToLiveLeaseNotFound(t *testing.T) {
}
lresp, err := cli.TimeToLive(context.Background(), resp.ID)
- // TimeToLive() doesn't return LeaseNotFound error
- // but return a response with TTL to be -1
+ // TimeToLive() should return a response with TTL=-1.
if err != nil {
t.Fatalf("expected err to be nil")
}
@@ -677,8 +675,8 @@ func TestLeaseKeepAliveLoopExit(t *testing.T) {
}
}
-// TestV3LeaseFailureOverlap issues Grant and Keepalive requests to a cluster
-// before, during, and after quorum loss to confirm Grant/Keepalive tolerates
+// TestV3LeaseFailureOverlap issues Grant and KeepAlive requests to a cluster
+// before, during, and after quorum loss to confirm Grant/KeepAlive tolerates
// transient cluster failure.
func TestV3LeaseFailureOverlap(t *testing.T) {
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 2})
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/leasing_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/leasing_test.go
index ad31c3747..d1758028d 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/leasing_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/leasing_test.go
@@ -157,7 +157,7 @@ func TestLeasingPutInvalidateNew(t *testing.T) {
}
// TestLeasingPutInvalidateExisting checks the leasing KV updates its cache on a Put to an existing key.
-func TestLeasingPutInvalidatExisting(t *testing.T) {
+func TestLeasingPutInvalidateExisting(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1})
defer clus.Terminate(t)
@@ -190,7 +190,7 @@ func TestLeasingPutInvalidatExisting(t *testing.T) {
}
}
-// TestLeasingGetLease checks that keys with TTLs are not leased.
+// TestLeasingGetNoLeaseTTL checks a key with a TTL is not leased.
func TestLeasingGetNoLeaseTTL(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1})
@@ -259,7 +259,7 @@ func TestLeasingGetSerializable(t *testing.T) {
}
}
-// TestLeasingPrevKey checks the cache respects the PrevKV flag on puts.
+// TestLeasingPrevKey checks the cache respects WithPrevKV on puts.
func TestLeasingPrevKey(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 2})
@@ -272,11 +272,10 @@ func TestLeasingPrevKey(t *testing.T) {
if _, err = clus.Client(0).Put(context.TODO(), "k", "abc"); err != nil {
t.Fatal(err)
}
- // fetch without prevkv to acquire leasing key
+ // acquire leasing key
if _, err = lkv.Get(context.TODO(), "k"); err != nil {
t.Fatal(err)
}
- // fetch prevkv via put
resp, err := lkv.Put(context.TODO(), "k", "def", clientv3.WithPrevKV())
if err != nil {
t.Fatal(err)
@@ -772,7 +771,7 @@ func TestLeasingTxnOwnerIf(t *testing.T) {
t.Fatal(terr)
}
if tresp.Succeeded != tt.wSucceeded {
- t.Errorf("#%d: expected succeded %v, got %v", i, tt.wSucceeded, tresp.Succeeded)
+ t.Errorf("#%d: expected succeeded %v, got %v", i, tt.wSucceeded, tresp.Succeeded)
}
if len(tresp.Responses) != tt.wResponses {
t.Errorf("#%d: expected %d responses, got %d", i, tt.wResponses, len(tresp.Responses))
@@ -889,7 +888,7 @@ func TestLeasingTxnNonOwnerPut(t *testing.T) {
}
}
-// TestLeasingTxnRandIfThen randomly leases keys two separate clients, then
+// TestLeasingTxnRandIfThenOrElse randomly leases keys two separate clients, then
// issues a random If/{Then,Else} transaction on those keys to one client.
func TestLeasingTxnRandIfThenOrElse(t *testing.T) {
defer testutil.AfterTest(t)
@@ -1286,7 +1285,7 @@ func TestLeasingPutGetDeleteConcurrent(t *testing.T) {
}
}
-// TestLeasingReconnectRevoke checks that revocation works if
+// TestLeasingReconnectOwnerRevoke checks that revocation works if
// disconnected when trying to submit revoke txn.
func TestLeasingReconnectOwnerRevoke(t *testing.T) {
defer testutil.AfterTest(t)
@@ -1312,7 +1311,7 @@ func TestLeasingReconnectOwnerRevoke(t *testing.T) {
cctx, cancel := context.WithCancel(context.TODO())
sdonec, pdonec := make(chan struct{}), make(chan struct{})
- // make lkv1 connection choppy so txns fail
+ // make lkv1 connection choppy so Txn fails
go func() {
defer close(sdonec)
for i := 0; i < 10 && cctx.Err() == nil; i++ {
@@ -1346,7 +1345,7 @@ func TestLeasingReconnectOwnerRevoke(t *testing.T) {
}
}
-// TestLeasingReconnectRevokeCompaction checks that revocation works if
+// TestLeasingReconnectOwnerRevokeCompact checks that revocation works if
// disconnected and the watch is compacted.
func TestLeasingReconnectOwnerRevokeCompact(t *testing.T) {
defer testutil.AfterTest(t)
@@ -1551,7 +1550,7 @@ func TestLeasingTxnAtomicCache(t *testing.T) {
wgGetters.Wait()
}
-// TestLeasingReconnectTxn checks that txns are resilient to disconnects.
+// TestLeasingReconnectTxn checks that Txn is resilient to disconnects.
func TestLeasingReconnectTxn(t *testing.T) {
defer testutil.AfterTest(t)
clus := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1})
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/metrics_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/metrics_test.go
index 6311fe0d7..54ca206da 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/metrics_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/metrics_test.go
@@ -16,6 +16,7 @@ package integration
import (
"bufio"
+ "context"
"io"
"net"
"net/http"
@@ -31,7 +32,6 @@ import (
grpcprom "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/prometheus/client_golang/prometheus"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/mirror_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/mirror_test.go
index df9911efb..01bfef10a 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/mirror_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/mirror_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"fmt"
"reflect"
"sync"
@@ -25,7 +26,6 @@ import (
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
func TestMirrorSync(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/role_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/role_test.go
index 7814db5eb..5b4fad43c 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/role_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/role_test.go
@@ -15,12 +15,12 @@
package integration
import (
+ "context"
"testing"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
func TestRoleError(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/txn_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/txn_test.go
index e895b5b62..313f0033b 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/txn_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/txn_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"fmt"
"testing"
"time"
@@ -24,7 +25,6 @@ import (
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
func TestTxnError(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/user_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/user_test.go
index 09f352be0..11548123d 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/user_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/user_test.go
@@ -15,13 +15,13 @@
package integration
import (
+ "context"
"testing"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
func TestUserError(t *testing.T) {
@@ -62,7 +62,7 @@ func TestUserErrorAuth(t *testing.T) {
authapi := clus.RandClient()
authSetupRoot(t, authapi.Auth)
- // un-authenticated client
+ // unauthenticated client
if _, err := authapi.UserAdd(context.TODO(), "foo", "bar"); err != rpctypes.ErrUserNotFound {
t.Fatalf("expected %v, got %v", rpctypes.ErrUserNotFound, err)
}
diff --git a/vendor/github.com/coreos/etcd/clientv3/integration/watch_test.go b/vendor/github.com/coreos/etcd/clientv3/integration/watch_test.go
index 059b5beb8..30d166eff 100644
--- a/vendor/github.com/coreos/etcd/clientv3/integration/watch_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/integration/watch_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"fmt"
"math/rand"
"reflect"
@@ -28,7 +29,7 @@ import (
"github.com/coreos/etcd/integration"
mvccpb "github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
)
@@ -52,8 +53,8 @@ func runWatchTest(t *testing.T, f watcherTest) {
wclientMember := rand.Intn(3)
w := clus.Client(wclientMember).Watcher
- // select a different client from wclient so puts succeed if
- // a test knocks out the watcher client
+ // select a different client for KV operations so puts succeed if
+ // a test knocks out the watcher client.
kvMember := rand.Intn(3)
for kvMember == wclientMember {
kvMember = rand.Intn(3)
@@ -804,7 +805,8 @@ func TestWatchWithFilter(t *testing.T) {
}
}
-// TestWatchWithCreatedNotification checks that createdNotification works.
+// TestWatchWithCreatedNotification checks that WithCreatedNotify returns a
+// Created watch response.
func TestWatchWithCreatedNotification(t *testing.T) {
cluster := integration.NewClusterV3(t, &integration.ClusterConfig{Size: 1})
defer cluster.Terminate(t)
@@ -841,8 +843,7 @@ func TestWatchWithCreatedNotificationDropConn(t *testing.T) {
cluster.Members[0].DropConnections()
- // try to receive from watch channel again
- // ensure it doesn't post another createNotify
+ // check watch channel doesn't post another watch response.
select {
case wresp := <-wch:
t.Fatalf("got unexpected watch response: %+v\n", wresp)
@@ -860,7 +861,7 @@ func TestWatchCancelOnServer(t *testing.T) {
client := cluster.RandClient()
numWatches := 10
- // grpcproxy starts watches to detect leadership after the proxy server
+ // The grpc proxy starts watches to detect leadership after the proxy server
// returns as started; to avoid racing on the proxy's internal watches, wait
// until require leader watches get create responses to ensure the leadership
// watches have started.
@@ -966,7 +967,7 @@ func testWatchOverlapContextCancel(t *testing.T, f func(*integration.ClusterV3))
t.Fatalf("unexpected closed channel %p", wch)
}
// may take a second or two to reestablish a watcher because of
- // grpc backoff policies for disconnects
+ // grpc back off policies for disconnects
case <-time.After(5 * time.Second):
t.Errorf("timed out waiting for watch on %p", wch)
}
@@ -990,7 +991,7 @@ func testWatchOverlapContextCancel(t *testing.T, f func(*integration.ClusterV3))
}
}
-// TestWatchCanelAndCloseClient ensures that canceling a watcher then immediately
+// TestWatchCancelAndCloseClient ensures that canceling a watcher then immediately
// closing the client does not return a client closing error.
func TestWatchCancelAndCloseClient(t *testing.T) {
defer testutil.AfterTest(t)
diff --git a/vendor/github.com/coreos/etcd/clientv3/kv.go b/vendor/github.com/coreos/etcd/clientv3/kv.go
index b0557aa29..ead08a082 100644
--- a/vendor/github.com/coreos/etcd/clientv3/kv.go
+++ b/vendor/github.com/coreos/etcd/clientv3/kv.go
@@ -15,8 +15,10 @@
package clientv3
import (
+ "context"
+
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/clientv3/lease.go b/vendor/github.com/coreos/etcd/clientv3/lease.go
index f3c950914..e476db5be 100644
--- a/vendor/github.com/coreos/etcd/clientv3/lease.go
+++ b/vendor/github.com/coreos/etcd/clientv3/lease.go
@@ -15,12 +15,13 @@
package clientv3
import (
+ "context"
"sync"
"time"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
)
@@ -30,7 +31,7 @@ type (
LeaseID int64
)
-// LeaseGrantResponse is used to convert the protobuf grant response.
+// LeaseGrantResponse wraps the protobuf message LeaseGrantResponse.
type LeaseGrantResponse struct {
*pb.ResponseHeader
ID LeaseID
@@ -38,14 +39,14 @@ type LeaseGrantResponse struct {
Error string
}
-// LeaseKeepAliveResponse is used to convert the protobuf keepalive response.
+// LeaseKeepAliveResponse wraps the protobuf message LeaseKeepAliveResponse.
type LeaseKeepAliveResponse struct {
*pb.ResponseHeader
ID LeaseID
TTL int64
}
-// LeaseTimeToLiveResponse is used to convert the protobuf lease timetolive response.
+// LeaseTimeToLiveResponse wraps the protobuf message LeaseTimeToLiveResponse.
type LeaseTimeToLiveResponse struct {
*pb.ResponseHeader
ID LeaseID `json:"id"`
@@ -66,7 +67,7 @@ type LeaseStatus struct {
// TODO: TTL int64
}
-// LeaseLeasesResponse is used to convert the protobuf lease list response.
+// LeaseLeasesResponse wraps the protobuf message LeaseLeasesResponse.
type LeaseLeasesResponse struct {
*pb.ResponseHeader
Leases []LeaseStatus `json:"leases"`
@@ -116,7 +117,7 @@ type Lease interface {
// KeepAlive keeps the given lease alive forever.
KeepAlive(ctx context.Context, id LeaseID) (<-chan *LeaseKeepAliveResponse, error)
- // KeepAliveOnce renews the lease once. In most of the cases, Keepalive
+ // KeepAliveOnce renews the lease once. In most of the cases, KeepAlive
// should be used instead of KeepAliveOnce.
KeepAliveOnce(ctx context.Context, id LeaseID) (*LeaseKeepAliveResponse, error)
@@ -345,7 +346,7 @@ func (l *lessor) keepAliveCtxCloser(id LeaseID, ctx context.Context, donec <-cha
}
}
-// closeRequireLeader scans all keep alives for ctxs that have require leader
+// closeRequireLeader scans keepAlives for ctxs that have require leader
// and closes the associated channels.
func (l *lessor) closeRequireLeader() {
l.mu.Lock()
@@ -457,7 +458,7 @@ func (l *lessor) recvKeepAliveLoop() (gerr error) {
}
}
-// resetRecv opens a new lease stream and starts sending LeaseKeepAliveRequests
+// resetRecv opens a new lease stream and starts sending keep alive requests.
func (l *lessor) resetRecv() (pb.Lease_LeaseKeepAliveClient, error) {
sctx, cancel := context.WithCancel(l.stopCtx)
stream, err := l.remote.LeaseKeepAlive(sctx, grpc.FailFast(false))
@@ -536,7 +537,7 @@ func (l *lessor) deadlineLoop() {
}
}
-// sendKeepAliveLoop sends LeaseKeepAliveRequests for the lifetime of a lease stream
+// sendKeepAliveLoop sends keep alive requests for the lifetime of the given stream.
func (l *lessor) sendKeepAliveLoop(stream pb.Lease_LeaseKeepAliveClient) {
for {
var tosend []LeaseID
diff --git a/vendor/github.com/coreos/etcd/clientv3/leasing/cache.go b/vendor/github.com/coreos/etcd/clientv3/leasing/cache.go
index 8d2c48277..6903a785c 100644
--- a/vendor/github.com/coreos/etcd/clientv3/leasing/cache.go
+++ b/vendor/github.com/coreos/etcd/clientv3/leasing/cache.go
@@ -15,6 +15,7 @@
package leasing
import (
+ "context"
"strings"
"sync"
"time"
@@ -22,7 +23,6 @@ import (
v3 "github.com/coreos/etcd/clientv3"
v3pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
const revokeBackoff = 2 * time.Second
@@ -285,7 +285,7 @@ func (lc *leaseCache) evalOps(ops []v3.Op) ([]*v3pb.ResponseOp, bool) {
resps := make([]*v3pb.ResponseOp, len(ops))
for i, op := range ops {
if !op.IsGet() || isBadOp(op) {
- // TODO: support read-only txns
+ // TODO: support read-only Txn
return nil, false
}
lk := lc.entries[string(op.KeyBytes())]
diff --git a/vendor/github.com/coreos/etcd/clientv3/leasing/doc.go b/vendor/github.com/coreos/etcd/clientv3/leasing/doc.go
index 30c3443df..fc97fc882 100644
--- a/vendor/github.com/coreos/etcd/clientv3/leasing/doc.go
+++ b/vendor/github.com/coreos/etcd/clientv3/leasing/doc.go
@@ -12,34 +12,35 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package leasing is a clientv3 wrapper that provides the client exclusive write access to a key by acquiring a lease and be lineraizably
-// served locally. This leasing layer can either directly wrap the etcd client or
-// it can be exposed through the etcd grace proxy server, granting multiple clients write access.
+// Package leasing serves linearizable reads from a local cache by acquiring
+// exclusive write access to keys through a client-side leasing protocol. This
+// leasing layer can either directly wrap the etcd client or it can be exposed
+// through the etcd grpc proxy server, granting multiple clients write access.
//
-// First, create a leasing client interface:
+// First, create a leasing KV from a clientv3.Client 'cli':
//
-// leasingCli,error = leasing.NewKV(cli.KV, "leasing-prefix")
-// if error != nil {
-// //handle error
-// }
+// lkv, err := leasing.NewKV(cli, "leasing-prefix")
+// if err != nil {
+// // handle error
+// }
//
-// The first range request acquires the lease by adding the leasing key ("leasing-prefix"/key) on the server and stores the key locally.
-// Further linearized read requests using 'cli.leasing' will be served locally as long as the lease exists:
-// cli.Put(context.TODO(), "abc", "123")
+// A range request for a key "abc" tries to acquire a leasing key so it can cache the range's
+// key locally. On the server, the leasing key is stored to "leasing-prefix/abc":
//
-// Lease Acquisition:
-// leasingCli.Get(context.TODO(), "abc")
+// resp, err := lkv.Get(context.TODO(), "abc")
//
-// Local reads:
-// resp,_ := leasingCli.Get(context.TODO(), "abc")
-// fmt.Printf("%s\n", resp.Kvs[0].Value)
-// //Output: 123 (served locally)
+// Future linearized read requests using 'lkv' will be served locally for the lease's lifetime:
//
-// Lease Revocation:
-// If a client writes to the key owned by the leasing client,then the leasing client gives up its lease allowing the client to modify the key.
-// cli.Put(context.TODO(), "abc", "456")
-// resp, _ = leasingCli.Get("abc")
-// fmt.Printf("%s\n", resp.Kvs[0].Value)
-// // Output: 456 (fetched from server)
+// resp, err = lkv.Get(context.TODO(), "abc")
+//
+// If another leasing client writes to a leased key, then the owner relinquishes its exclusive
+// access, permitting the writer to modify the key:
+//
+// lkv2, err := leasing.NewKV(cli, "leasing-prefix")
+// if err != nil {
+// // handle error
+// }
+// lkv2.Put(context.TODO(), "abc", "456")
+// resp, err = lkv.Get("abc")
//
package leasing
diff --git a/vendor/github.com/coreos/etcd/clientv3/leasing/kv.go b/vendor/github.com/coreos/etcd/clientv3/leasing/kv.go
index 91a7d85c7..d44182b10 100644
--- a/vendor/github.com/coreos/etcd/clientv3/leasing/kv.go
+++ b/vendor/github.com/coreos/etcd/clientv3/leasing/kv.go
@@ -15,6 +15,7 @@
package leasing
import (
+ "context"
"strings"
"sync"
"time"
@@ -25,9 +26,8 @@ import (
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
)
type leasingKV struct {
@@ -282,7 +282,10 @@ func (lkv *leasingKV) acquire(ctx context.Context, key string, op v3.Op) (*v3.Tx
return resp, nil
}
// retry if transient error
- if _, ok := err.(rpctypes.EtcdError); ok || grpc.Code(err) != codes.Unavailable {
+ if _, ok := err.(rpctypes.EtcdError); ok {
+ return nil, err
+ }
+ if ev, _ := status.FromError(err); ev.Code() != codes.Unavailable {
return nil, err
}
}
diff --git a/vendor/github.com/coreos/etcd/clientv3/logger.go b/vendor/github.com/coreos/etcd/clientv3/logger.go
index 519db45d8..784c395c7 100644
--- a/vendor/github.com/coreos/etcd/clientv3/logger.go
+++ b/vendor/github.com/coreos/etcd/clientv3/logger.go
@@ -16,36 +16,35 @@ package clientv3
import (
"io/ioutil"
- "log"
"sync"
"google.golang.org/grpc/grpclog"
)
// Logger is the logger used by client library.
-// It implements grpclog.Logger interface.
-type Logger grpclog.Logger
+// It implements grpclog.LoggerV2 interface.
+type Logger grpclog.LoggerV2
var (
logger settableLogger
)
type settableLogger struct {
- l grpclog.Logger
+ l grpclog.LoggerV2
mu sync.RWMutex
}
func init() {
// disable client side logs by default
logger.mu.Lock()
- logger.l = log.New(ioutil.Discard, "", 0)
+ logger.l = grpclog.NewLoggerV2(ioutil.Discard, ioutil.Discard, ioutil.Discard)
// logger has to override the grpclog at initialization so that
// any changes to the grpclog go through logger with locking
// instead of through SetLogger
//
// now updates only happen through settableLogger.set
- grpclog.SetLogger(&logger)
+ grpclog.SetLoggerV2(&logger)
logger.mu.Unlock()
}
@@ -72,11 +71,25 @@ func (s *settableLogger) get() Logger {
return l
}
-// implement the grpclog.Logger interface
+// implement the grpclog.LoggerV2 interface
+func (s *settableLogger) Info(args ...interface{}) { s.get().Info(args...) }
+func (s *settableLogger) Infof(format string, args ...interface{}) { s.get().Infof(format, args...) }
+func (s *settableLogger) Infoln(args ...interface{}) { s.get().Infoln(args...) }
+func (s *settableLogger) Warning(args ...interface{}) { s.get().Warning(args...) }
+func (s *settableLogger) Warningf(format string, args ...interface{}) {
+ s.get().Warningf(format, args...)
+}
+func (s *settableLogger) Warningln(args ...interface{}) { s.get().Warningln(args...) }
+func (s *settableLogger) Error(args ...interface{}) { s.get().Error(args...) }
+func (s *settableLogger) Errorf(format string, args ...interface{}) {
+ s.get().Errorf(format, args...)
+}
+func (s *settableLogger) Errorln(args ...interface{}) { s.get().Errorln(args...) }
func (s *settableLogger) Fatal(args ...interface{}) { s.get().Fatal(args...) }
func (s *settableLogger) Fatalf(format string, args ...interface{}) { s.get().Fatalf(format, args...) }
func (s *settableLogger) Fatalln(args ...interface{}) { s.get().Fatalln(args...) }
-func (s *settableLogger) Print(args ...interface{}) { s.get().Print(args...) }
-func (s *settableLogger) Printf(format string, args ...interface{}) { s.get().Printf(format, args...) }
-func (s *settableLogger) Println(args ...interface{}) { s.get().Println(args...) }
+func (s *settableLogger) Print(args ...interface{}) { s.get().Info(args...) }
+func (s *settableLogger) Printf(format string, args ...interface{}) { s.get().Infof(format, args...) }
+func (s *settableLogger) Println(args ...interface{}) { s.get().Infoln(args...) }
+func (s *settableLogger) V(l int) bool { return s.get().V(l) }
diff --git a/vendor/github.com/coreos/etcd/clientv3/maintenance.go b/vendor/github.com/coreos/etcd/clientv3/maintenance.go
index 33e3553df..988a5f7c2 100644
--- a/vendor/github.com/coreos/etcd/clientv3/maintenance.go
+++ b/vendor/github.com/coreos/etcd/clientv3/maintenance.go
@@ -15,11 +15,11 @@
package clientv3
import (
+ "context"
"io"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
@@ -39,7 +39,7 @@ type Maintenance interface {
// AlarmDisarm disarms a given alarm.
AlarmDisarm(ctx context.Context, m *AlarmMember) (*AlarmResponse, error)
- // Defragment defragments storage backend of the etcd member with given endpoint.
+ // Defragment releases wasted space from internal fragmentation on a given etcd member.
// Defragment is only needed when deleting a large number of keys and want to reclaim
// the resources.
// Defragment is an expensive operation. User should avoid defragmenting multiple members
@@ -56,7 +56,7 @@ type Maintenance interface {
// is non-zero, the hash is computed on all keys at or below the given revision.
HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error)
- // Snapshot provides a reader for a snapshot of a backend.
+ // Snapshot provides a reader for a point-in-time snapshot of etcd.
Snapshot(ctx context.Context) (io.ReadCloser, error)
// MoveLeader requests current leader to transfer its leadership to the transferee.
diff --git a/vendor/github.com/coreos/etcd/clientv3/mirror/syncer.go b/vendor/github.com/coreos/etcd/clientv3/mirror/syncer.go
index f2a8f107f..b82093322 100644
--- a/vendor/github.com/coreos/etcd/clientv3/mirror/syncer.go
+++ b/vendor/github.com/coreos/etcd/clientv3/mirror/syncer.go
@@ -16,8 +16,9 @@
package mirror
import (
+ "context"
+
"github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
const (
diff --git a/vendor/github.com/coreos/etcd/clientv3/namespace/kv.go b/vendor/github.com/coreos/etcd/clientv3/namespace/kv.go
index b5ec5e964..13dd83a24 100644
--- a/vendor/github.com/coreos/etcd/clientv3/namespace/kv.go
+++ b/vendor/github.com/coreos/etcd/clientv3/namespace/kv.go
@@ -15,7 +15,7 @@
package namespace
import (
- "golang.org/x/net/context"
+ "context"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
@@ -180,8 +180,8 @@ func (kv *kvPrefix) unprefixTxnResponse(resp *clientv3.TxnResponse) {
}
}
-func (p *kvPrefix) prefixInterval(key, end []byte) (pfxKey []byte, pfxEnd []byte) {
- return prefixInterval(p.pfx, key, end)
+func (kv *kvPrefix) prefixInterval(key, end []byte) (pfxKey []byte, pfxEnd []byte) {
+ return prefixInterval(kv.pfx, key, end)
}
func (kv *kvPrefix) prefixCmps(cs []clientv3.Cmp) []clientv3.Cmp {
diff --git a/vendor/github.com/coreos/etcd/clientv3/namespace/lease.go b/vendor/github.com/coreos/etcd/clientv3/namespace/lease.go
index fc7c22869..f092106cb 100644
--- a/vendor/github.com/coreos/etcd/clientv3/namespace/lease.go
+++ b/vendor/github.com/coreos/etcd/clientv3/namespace/lease.go
@@ -16,8 +16,7 @@ package namespace
import (
"bytes"
-
- "golang.org/x/net/context"
+ "context"
"github.com/coreos/etcd/clientv3"
)
diff --git a/vendor/github.com/coreos/etcd/clientv3/namespace/watch.go b/vendor/github.com/coreos/etcd/clientv3/namespace/watch.go
index 6257e2968..5a9596df5 100644
--- a/vendor/github.com/coreos/etcd/clientv3/namespace/watch.go
+++ b/vendor/github.com/coreos/etcd/clientv3/namespace/watch.go
@@ -15,10 +15,9 @@
package namespace
import (
+ "context"
"sync"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/clientv3"
)
diff --git a/vendor/github.com/coreos/etcd/clientv3/naming/grpc.go b/vendor/github.com/coreos/etcd/clientv3/naming/grpc.go
index 9bb92ea61..327d9f644 100644
--- a/vendor/github.com/coreos/etcd/clientv3/naming/grpc.go
+++ b/vendor/github.com/coreos/etcd/clientv3/naming/grpc.go
@@ -15,11 +15,11 @@
package naming
import (
+ "context"
"encoding/json"
"fmt"
etcd "github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
diff --git a/vendor/github.com/coreos/etcd/clientv3/naming/grpc_test.go b/vendor/github.com/coreos/etcd/clientv3/naming/grpc_test.go
index ad2d20662..ba53666a9 100644
--- a/vendor/github.com/coreos/etcd/clientv3/naming/grpc_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/naming/grpc_test.go
@@ -15,16 +15,16 @@
package naming
import (
+ "context"
"encoding/json"
"reflect"
"testing"
- "golang.org/x/net/context"
- "google.golang.org/grpc/naming"
-
etcd "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
+
+ "google.golang.org/grpc/naming"
)
func TestGRPCResolver(t *testing.T) {
@@ -83,7 +83,7 @@ func TestGRPCResolver(t *testing.T) {
}
}
-// TestGRPCResolverMultiInit ensures the resolver will initialize
+// TestGRPCResolverMulti ensures the resolver will initialize
// correctly with multiple hosts and correctly receive multiple
// updates in a single revision.
func TestGRPCResolverMulti(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/clientv3/op.go b/vendor/github.com/coreos/etcd/clientv3/op.go
index 8ef043a11..c6ec5bf52 100644
--- a/vendor/github.com/coreos/etcd/clientv3/op.go
+++ b/vendor/github.com/coreos/etcd/clientv3/op.go
@@ -75,7 +75,7 @@ type Op struct {
elseOps []Op
}
-// accesors / mutators
+// accessors / mutators
func (op Op) IsTxn() bool { return op.t == tTxn }
func (op Op) Txn() ([]Cmp, []Op, []Op) { return op.cmps, op.thenOps, op.elseOps }
@@ -104,30 +104,24 @@ func (op Op) IsDelete() bool { return op.t == tDeleteRange }
// IsSerializable returns true if the serializable field is true.
func (op Op) IsSerializable() bool { return op.serializable == true }
-// IsKeysOnly returns true if the keysonly field is true.
+// IsKeysOnly returns whether keysOnly is set.
func (op Op) IsKeysOnly() bool { return op.keysOnly == true }
-// IsCountOnly returns true if the countonly field is true.
+// IsCountOnly returns whether countOnly is set.
func (op Op) IsCountOnly() bool { return op.countOnly == true }
-// MinModRev returns if field is populated.
+// MinModRev returns the operation's minimum modify revision.
func (op Op) MinModRev() int64 { return op.minModRev }
-// MaxModRev returns if field is populated.
+// MaxModRev returns the operation's maximum modify revision.
func (op Op) MaxModRev() int64 { return op.maxModRev }
-// MinCreateRev returns if field is populated.
+// MinCreateRev returns the operation's minimum create revision.
func (op Op) MinCreateRev() int64 { return op.minCreateRev }
-// MaxCreateRev returns if field is populated.
+// MaxCreateRev returns the operation's maximum create revision.
func (op Op) MaxCreateRev() int64 { return op.maxCreateRev }
-// Limit returns if field is populated.
-func (op Op) retLimit() int64 { return op.limit }
-
-// Sort returns if field is populated.
-func (op Op) retSort() bool { return op.sort != nil }
-
// WithRangeBytes sets the byte slice for the Op's range end.
func (op *Op) WithRangeBytes(end []byte) { op.end = end }
@@ -330,9 +324,9 @@ func WithSort(target SortTarget, order SortOrder) OpOption {
if target == SortByKey && order == SortAscend {
// If order != SortNone, server fetches the entire key-space,
// and then applies the sort and limit, if provided.
- // Since current mvcc.Range implementation returns results
- // sorted by keys in lexicographically ascending order,
- // client should ignore SortOrder if the target is SortByKey.
+ // Since by default the server returns results sorted by keys
+ // in lexicographically ascending order, the client should ignore
+ // SortOrder if the target is SortByKey.
order = SortNone
}
op.sort = &SortOption{target, order}
@@ -473,7 +467,7 @@ func WithPrevKV() OpOption {
}
// WithIgnoreValue updates the key using its current value.
-// Empty value should be passed when ignore_value is set.
+// This option can not be combined with non-empty values.
// Returns an error if the key does not exist.
func WithIgnoreValue() OpOption {
return func(op *Op) {
@@ -482,7 +476,7 @@ func WithIgnoreValue() OpOption {
}
// WithIgnoreLease updates the key using its current lease.
-// Empty lease should be passed when ignore_lease is set.
+// This option can not be combined with WithLease.
// Returns an error if the key does not exist.
func WithIgnoreLease() OpOption {
return func(op *Op) {
@@ -507,8 +501,7 @@ func (op *LeaseOp) applyOpts(opts []LeaseOption) {
}
}
-// WithAttachedKeys requests lease timetolive API to return
-// attached keys of given lease ID.
+// WithAttachedKeys makes TimeToLive list the keys attached to the given lease ID.
func WithAttachedKeys() LeaseOption {
return func(op *LeaseOp) { op.attachedKeys = true }
}
diff --git a/vendor/github.com/coreos/etcd/clientv3/ordering/kv.go b/vendor/github.com/coreos/etcd/clientv3/ordering/kv.go
index 0001ce013..e8bf07b8c 100644
--- a/vendor/github.com/coreos/etcd/clientv3/ordering/kv.go
+++ b/vendor/github.com/coreos/etcd/clientv3/ordering/kv.go
@@ -15,10 +15,10 @@
package ordering
import (
+ "context"
"sync"
"github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
// kvOrdering ensures that serialized requests do not return
diff --git a/vendor/github.com/coreos/etcd/clientv3/ordering/kv_test.go b/vendor/github.com/coreos/etcd/clientv3/ordering/kv_test.go
index d6ec597b6..5c68cc787 100644
--- a/vendor/github.com/coreos/etcd/clientv3/ordering/kv_test.go
+++ b/vendor/github.com/coreos/etcd/clientv3/ordering/kv_test.go
@@ -16,6 +16,7 @@ package ordering
import (
"context"
+ gContext "context"
"errors"
"sync"
"testing"
@@ -25,7 +26,6 @@ import (
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
- gContext "golang.org/x/net/context"
)
func TestDetectKvOrderViolation(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/clientv3/ordering/util.go b/vendor/github.com/coreos/etcd/clientv3/ordering/util.go
index 7b151e78e..190a5919a 100644
--- a/vendor/github.com/coreos/etcd/clientv3/ordering/util.go
+++ b/vendor/github.com/coreos/etcd/clientv3/ordering/util.go
@@ -36,11 +36,12 @@ func NewOrderViolationSwitchEndpointClosure(c clientv3.Client) OrderViolationFun
mu.Lock()
defer mu.Unlock()
eps := c.Endpoints()
- // force client to connect to the specificied endpoint by limiting to a single endpoint
+ // force client to connect to given endpoint by limiting to a single endpoint
c.SetEndpoints(eps[violationCount%len(eps)])
- time.Sleep(1 * time.Second) // give enough time for operation
- // set available endpoints back to all endpoints in order to enure
- // that the client has access to all the endpoints.
+ // give enough time for operation
+ time.Sleep(1 * time.Second)
+ // set available endpoints back to all endpoints in to ensure
+ // the client has access to all the endpoints.
c.SetEndpoints(eps...)
violationCount++
return nil
diff --git a/vendor/github.com/coreos/etcd/clientv3/retry.go b/vendor/github.com/coreos/etcd/clientv3/retry.go
index b4b8b3d38..aab2c9235 100644
--- a/vendor/github.com/coreos/etcd/clientv3/retry.go
+++ b/vendor/github.com/coreos/etcd/clientv3/retry.go
@@ -15,11 +15,14 @@
package clientv3
import (
+ "context"
+
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
)
type rpcFunc func(ctx context.Context) error
@@ -33,22 +36,34 @@ func isReadStopError(err error) bool {
return true
}
// only retry if unavailable
- return grpc.Code(err) != codes.Unavailable
+ ev, _ := status.FromError(err)
+ return ev.Code() != codes.Unavailable
}
func isWriteStopError(err error) bool {
- return grpc.Code(err) != codes.Unavailable ||
- grpc.ErrorDesc(err) != "there is no address available"
+ ev, _ := status.FromError(err)
+ if ev.Code() != codes.Unavailable {
+ return true
+ }
+ return rpctypes.ErrorDesc(err) != "there is no address available"
}
func (c *Client) newRetryWrapper(isStop retryStopErrFunc) retryRpcFunc {
return func(rpcCtx context.Context, f rpcFunc) error {
for {
- if err := f(rpcCtx); err == nil || isStop(err) {
+ err := f(rpcCtx)
+ if err == nil {
+ return nil
+ }
+ notify := c.balancer.ConnectNotify()
+ if s, ok := status.FromError(err); ok && s.Code() == codes.Unavailable {
+ c.balancer.next()
+ }
+ if isStop(err) {
return err
}
select {
- case <-c.balancer.ConnectNotify():
+ case <-notify:
case <-rpcCtx.Done():
return rpcCtx.Err()
case <-c.ctx.Done():
diff --git a/vendor/github.com/coreos/etcd/clientv3/txn.go b/vendor/github.com/coreos/etcd/clientv3/txn.go
index 7bde6fd72..ea4ec6160 100644
--- a/vendor/github.com/coreos/etcd/clientv3/txn.go
+++ b/vendor/github.com/coreos/etcd/clientv3/txn.go
@@ -15,16 +15,17 @@
package clientv3
import (
+ "context"
"sync"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
)
// Txn is the interface that wraps mini-transactions.
//
-// Tx.If(
+// Txn(context.TODO()).If(
// Compare(Value(k1), ">", v1),
// Compare(Version(k1), "=", 2)
// ).Then(
diff --git a/vendor/github.com/coreos/etcd/clientv3/watch.go b/vendor/github.com/coreos/etcd/clientv3/watch.go
index 0af38a64c..cfa478126 100644
--- a/vendor/github.com/coreos/etcd/clientv3/watch.go
+++ b/vendor/github.com/coreos/etcd/clientv3/watch.go
@@ -15,6 +15,7 @@
package clientv3
import (
+ "context"
"fmt"
"sync"
"time"
@@ -22,7 +23,7 @@ import (
v3rpc "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
mvccpb "github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
+
"google.golang.org/grpc"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
@@ -135,7 +136,7 @@ type watchGrpcStream struct {
respc chan *pb.WatchResponse
// donec closes to broadcast shutdown
donec chan struct{}
- // errc transmits errors from grpc Recv to the watch stream reconn logic
+ // errc transmits errors from grpc Recv to the watch stream reconnect logic
errc chan error
// closingc gets the watcherStream of closing watchers
closingc chan *watcherStream
@@ -434,7 +435,7 @@ func (w *watchGrpcStream) run() {
initReq: *wreq,
id: -1,
outc: outc,
- // unbufffered so resumes won't cause repeat events
+ // unbuffered so resumes won't cause repeat events
recvc: make(chan *WatchResponse),
}
@@ -486,7 +487,7 @@ func (w *watchGrpcStream) run() {
req := &pb.WatchRequest{RequestUnion: cr}
wc.Send(req)
}
- // watch client failed to recv; spawn another if possible
+ // watch client failed on Recv; spawn another if possible
case err := <-w.errc:
if isHaltErr(w.ctx, err) || toErr(w.ctx, err) == v3rpc.ErrNoLeader {
closeErr = err
@@ -748,7 +749,7 @@ func (w *watchGrpcStream) waitCancelSubstreams(stopc <-chan struct{}) <-chan str
return donec
}
-// joinSubstream waits for all substream goroutines to complete
+// joinSubstreams waits for all substream goroutines to complete.
func (w *watchGrpcStream) joinSubstreams() {
for _, ws := range w.substreams {
<-ws.donec
@@ -760,7 +761,7 @@ func (w *watchGrpcStream) joinSubstreams() {
}
}
-// openWatchClient retries opening a watchclient until retryConnection fails
+// openWatchClient retries opening a watch client until success or halt.
func (w *watchGrpcStream) openWatchClient() (ws pb.Watch_WatchClient, err error) {
for {
select {
@@ -781,7 +782,7 @@ func (w *watchGrpcStream) openWatchClient() (ws pb.Watch_WatchClient, err error)
return ws, nil
}
-// toPB converts an internal watch request structure to its protobuf messagefunc (wr *watchRequest)
+// toPB converts an internal watch request structure to its protobuf WatchRequest structure.
func (wr *watchRequest) toPB() *pb.WatchRequest {
req := &pb.WatchCreateRequest{
StartRevision: wr.rev,
diff --git a/vendor/github.com/coreos/etcd/compactor/compactor.go b/vendor/github.com/coreos/etcd/compactor/compactor.go
index e25fd7e41..5a83d13f8 100644
--- a/vendor/github.com/coreos/etcd/compactor/compactor.go
+++ b/vendor/github.com/coreos/etcd/compactor/compactor.go
@@ -15,13 +15,13 @@
package compactor
import (
+ "context"
"fmt"
"time"
- "github.com/coreos/pkg/capnslog"
- "golang.org/x/net/context"
-
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
+
+ "github.com/coreos/pkg/capnslog"
)
var (
diff --git a/vendor/github.com/coreos/etcd/compactor/compactor_test.go b/vendor/github.com/coreos/etcd/compactor/compactor_test.go
index c38ef4b2e..c3db1c1f8 100644
--- a/vendor/github.com/coreos/etcd/compactor/compactor_test.go
+++ b/vendor/github.com/coreos/etcd/compactor/compactor_test.go
@@ -15,11 +15,11 @@
package compactor
import (
+ "context"
"sync/atomic"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
type fakeCompactable struct {
diff --git a/vendor/github.com/coreos/etcd/compactor/periodic.go b/vendor/github.com/coreos/etcd/compactor/periodic.go
index 7eb7cf7a8..784cef7c1 100644
--- a/vendor/github.com/coreos/etcd/compactor/periodic.go
+++ b/vendor/github.com/coreos/etcd/compactor/periodic.go
@@ -15,14 +15,14 @@
package compactor
import (
+ "context"
"sync"
"time"
- "github.com/jonboulle/clockwork"
- "golang.org/x/net/context"
-
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc"
+
+ "github.com/jonboulle/clockwork"
)
// Periodic compacts the log by purging revisions older than
diff --git a/vendor/github.com/coreos/etcd/compactor/revision.go b/vendor/github.com/coreos/etcd/compactor/revision.go
index fd80c278d..14baec970 100644
--- a/vendor/github.com/coreos/etcd/compactor/revision.go
+++ b/vendor/github.com/coreos/etcd/compactor/revision.go
@@ -15,13 +15,13 @@
package compactor
import (
+ "context"
"sync"
- "github.com/jonboulle/clockwork"
- "golang.org/x/net/context"
-
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc"
+
+ "github.com/jonboulle/clockwork"
)
// Revision compacts the log by purging revisions older than
diff --git a/vendor/github.com/coreos/etcd/contrib/raftexample/raft.go b/vendor/github.com/coreos/etcd/contrib/raftexample/raft.go
index b212dcb7c..b50c5d008 100644
--- a/vendor/github.com/coreos/etcd/contrib/raftexample/raft.go
+++ b/vendor/github.com/coreos/etcd/contrib/raftexample/raft.go
@@ -15,15 +15,15 @@
package main
import (
+ "context"
"fmt"
"log"
+ "net/http"
+ "net/url"
"os"
"strconv"
"time"
- "net/http"
- "net/url"
-
"github.com/coreos/etcd/etcdserver/stats"
"github.com/coreos/etcd/pkg/fileutil"
"github.com/coreos/etcd/pkg/types"
@@ -33,7 +33,6 @@ import (
"github.com/coreos/etcd/snap"
"github.com/coreos/etcd/wal"
"github.com/coreos/etcd/wal/walpb"
- "golang.org/x/net/context"
)
// A key-value stream backed by raft
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/barrier.go b/vendor/github.com/coreos/etcd/contrib/recipes/barrier.go
index 33aedf6c5..6e9281721 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/barrier.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/barrier.go
@@ -15,9 +15,10 @@
package recipe
import (
+ "context"
+
v3 "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
// Barrier creates a key in etcd to block processes, then deletes the key to
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/client.go b/vendor/github.com/coreos/etcd/contrib/recipes/client.go
index 30d7389c9..111b0b40c 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/client.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/client.go
@@ -15,11 +15,11 @@
package recipe
import (
+ "context"
"errors"
v3 "github.com/coreos/etcd/clientv3"
spb "github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/double_barrier.go b/vendor/github.com/coreos/etcd/contrib/recipes/double_barrier.go
index 7690ba1d4..93cc61b4f 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/double_barrier.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/double_barrier.go
@@ -15,10 +15,11 @@
package recipe
import (
+ "context"
+
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
// DoubleBarrier blocks processes on Enter until an expected count enters, then
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/key.go b/vendor/github.com/coreos/etcd/contrib/recipes/key.go
index b6df53235..aea00059a 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/key.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/key.go
@@ -15,13 +15,13 @@
package recipe
import (
+ "context"
"fmt"
"strings"
"time"
v3 "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
- "golang.org/x/net/context"
)
// RemoteKV is a key/revision pair created by the client and stored on etcd
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/priority_queue.go b/vendor/github.com/coreos/etcd/contrib/recipes/priority_queue.go
index a62fb02af..2378ce2f8 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/priority_queue.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/priority_queue.go
@@ -15,11 +15,11 @@
package recipe
import (
+ "context"
"fmt"
v3 "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
// PriorityQueue implements a multi-reader, multi-writer distributed queue.
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/queue.go b/vendor/github.com/coreos/etcd/contrib/recipes/queue.go
index 714c40604..5d0423a42 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/queue.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/queue.go
@@ -15,9 +15,10 @@
package recipe
import (
+ "context"
+
v3 "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
// Queue implements a multi-reader, multi-writer distributed queue.
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/rwmutex.go b/vendor/github.com/coreos/etcd/contrib/recipes/rwmutex.go
index 2714305df..1213b7e42 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/rwmutex.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/rwmutex.go
@@ -15,10 +15,11 @@
package recipe
import (
+ "context"
+
v3 "github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
type RWMutex struct {
diff --git a/vendor/github.com/coreos/etcd/contrib/recipes/watch.go b/vendor/github.com/coreos/etcd/contrib/recipes/watch.go
index 1c4619d33..536787227 100644
--- a/vendor/github.com/coreos/etcd/contrib/recipes/watch.go
+++ b/vendor/github.com/coreos/etcd/contrib/recipes/watch.go
@@ -15,9 +15,10 @@
package recipe
import (
+ "context"
+
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/mvcc/mvccpb"
- "golang.org/x/net/context"
)
// WaitEvents waits on a key until it observes the given events and returns the final one.
diff --git a/vendor/github.com/coreos/etcd/discovery/discovery.go b/vendor/github.com/coreos/etcd/discovery/discovery.go
index edc842ffb..7d1fa0d05 100644
--- a/vendor/github.com/coreos/etcd/discovery/discovery.go
+++ b/vendor/github.com/coreos/etcd/discovery/discovery.go
@@ -17,6 +17,7 @@
package discovery
import (
+ "context"
"errors"
"fmt"
"math"
@@ -31,9 +32,9 @@ import (
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/pkg/transport"
"github.com/coreos/etcd/pkg/types"
+
"github.com/coreos/pkg/capnslog"
"github.com/jonboulle/clockwork"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/discovery/discovery_test.go b/vendor/github.com/coreos/etcd/discovery/discovery_test.go
index bf0636af8..89897266f 100644
--- a/vendor/github.com/coreos/etcd/discovery/discovery_test.go
+++ b/vendor/github.com/coreos/etcd/discovery/discovery_test.go
@@ -15,6 +15,7 @@
package discovery
import (
+ "context"
"errors"
"math"
"math/rand"
@@ -25,10 +26,9 @@ import (
"testing"
"time"
- "github.com/jonboulle/clockwork"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/client"
+
+ "github.com/jonboulle/clockwork"
)
const (
diff --git a/vendor/github.com/coreos/etcd/e2e/ctl_v2_test.go b/vendor/github.com/coreos/etcd/e2e/ctl_v2_test.go
index f986eb1f3..60d9ce74c 100644
--- a/vendor/github.com/coreos/etcd/e2e/ctl_v2_test.go
+++ b/vendor/github.com/coreos/etcd/e2e/ctl_v2_test.go
@@ -226,7 +226,13 @@ func TestCtlV2RoleList(t *testing.T) {
}
}
-func TestCtlV2Backup(t *testing.T) { // For https://github.com/coreos/etcd/issues/5360
+func TestCtlV2Backup(t *testing.T) { testCtlV2Backup(t, 0, false) }
+func TestCtlV2BackupSnapshot(t *testing.T) { testCtlV2Backup(t, 1, false) }
+
+func TestCtlV2BackupV3(t *testing.T) { testCtlV2Backup(t, 0, true) }
+func TestCtlV2BackupV3Snapshot(t *testing.T) { testCtlV2Backup(t, 1, true) }
+
+func testCtlV2Backup(t *testing.T, snapCount int, v3 bool) {
defer testutil.AfterTest(t)
backupDir, err := ioutil.TempDir("", "testbackup0.etcd")
@@ -235,15 +241,29 @@ func TestCtlV2Backup(t *testing.T) { // For https://github.com/coreos/etcd/issue
}
defer os.RemoveAll(backupDir)
- epc1 := setupEtcdctlTest(t, &configNoTLS, false)
+ etcdCfg := configNoTLS
+ etcdCfg.snapCount = snapCount
+ epc1 := setupEtcdctlTest(t, &etcdCfg, false)
+
+ // v3 put before v2 set so snapshot happens after v3 operations to confirm
+ // v3 data is preserved after snapshot.
+ if err := ctlV3Put(ctlCtx{t: t, epc: epc1}, "v3key", "123", ""); err != nil {
+ t.Fatal(err)
+ }
+
if err := etcdctlSet(epc1, "foo1", "bar"); err != nil {
t.Fatal(err)
}
- if err := etcdctlBackup(epc1, epc1.procs[0].Config().dataDirPath, backupDir); err != nil {
+ if v3 {
+ // v3 must lock the db to backup, so stop process
+ if err := epc1.Stop(); err != nil {
+ t.Fatal(err)
+ }
+ }
+ if err := etcdctlBackup(epc1, epc1.procs[0].Config().dataDirPath, backupDir, v3); err != nil {
t.Fatal(err)
}
-
if err := epc1.Close(); err != nil {
t.Fatalf("error closing etcd processes (%v)", err)
}
@@ -260,6 +280,17 @@ func TestCtlV2Backup(t *testing.T) { // For https://github.com/coreos/etcd/issue
t.Fatal(err)
}
+ ctx2 := ctlCtx{t: t, epc: epc2}
+ if v3 {
+ if err := ctlV3Get(ctx2, []string{"v3key"}, kv{"v3key", "123"}); err != nil {
+ t.Fatal(err)
+ }
+ } else {
+ if err := ctlV3Get(ctx2, []string{"v3key"}); err != nil {
+ t.Fatal(err)
+ }
+ }
+
// check if it can serve client requests
if err := etcdctlSet(epc2, "foo2", "bar"); err != nil {
t.Fatal(err)
@@ -451,9 +482,16 @@ func etcdctlAuthEnable(clus *etcdProcessCluster) error {
return spawnWithExpect(cmdArgs, "Authentication Enabled")
}
-func etcdctlBackup(clus *etcdProcessCluster, dataDir, backupDir string) error {
+func etcdctlBackup(clus *etcdProcessCluster, dataDir, backupDir string, v3 bool) error {
cmdArgs := append(etcdctlPrefixArgs(clus), "backup", "--data-dir", dataDir, "--backup-dir", backupDir)
- return spawnWithExpects(cmdArgs)
+ if v3 {
+ cmdArgs = append(cmdArgs, "--with-v3")
+ }
+ proc, err := spawnCmd(cmdArgs)
+ if err != nil {
+ return err
+ }
+ return proc.Close()
}
func mustEtcdctl(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/e2e/ctl_v3_alarm_test.go b/vendor/github.com/coreos/etcd/e2e/ctl_v3_alarm_test.go
index 912620e81..395ac297a 100644
--- a/vendor/github.com/coreos/etcd/e2e/ctl_v3_alarm_test.go
+++ b/vendor/github.com/coreos/etcd/e2e/ctl_v3_alarm_test.go
@@ -15,13 +15,13 @@
package e2e
import (
+ "context"
"os"
"strings"
"testing"
"time"
"github.com/coreos/etcd/clientv3"
- "golang.org/x/net/context"
)
func TestCtlV3Alarm(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/e2e/ctl_v3_auth_test.go b/vendor/github.com/coreos/etcd/e2e/ctl_v3_auth_test.go
index e8fc31f81..3b2b74c5e 100644
--- a/vendor/github.com/coreos/etcd/e2e/ctl_v3_auth_test.go
+++ b/vendor/github.com/coreos/etcd/e2e/ctl_v3_auth_test.go
@@ -32,7 +32,7 @@ func TestCtlV3AuthRoleUpdate(t *testing.T) { testCtl(t, authRoleUpdateT
func TestCtlV3AuthUserDeleteDuringOps(t *testing.T) { testCtl(t, authUserDeleteDuringOpsTest) }
func TestCtlV3AuthRoleRevokeDuringOps(t *testing.T) { testCtl(t, authRoleRevokeDuringOpsTest) }
func TestCtlV3AuthTxn(t *testing.T) { testCtl(t, authTestTxn) }
-func TestCtlV3AuthPerfixPerm(t *testing.T) { testCtl(t, authTestPrefixPerm) }
+func TestCtlV3AuthPrefixPerm(t *testing.T) { testCtl(t, authTestPrefixPerm) }
func TestCtlV3AuthMemberAdd(t *testing.T) { testCtl(t, authTestMemberAdd) }
func TestCtlV3AuthMemberRemove(t *testing.T) {
testCtl(t, authTestMemberRemove, withQuorum(), withNoStrictReconfig())
@@ -469,6 +469,21 @@ func authTestPrefixPerm(cx ctlCtx) {
if err := ctlV3PutFailPerm(cx, clientv3.GetPrefixRangeEnd(prefix), "baz"); err != nil {
cx.t.Fatal(err)
}
+
+ // grant the entire keys to test-user
+ cx.user, cx.pass = "root", "root"
+ if err := ctlV3RoleGrantPermission(cx, "test-role", grantingPerm{true, true, "", "", true}); err != nil {
+ cx.t.Fatal(err)
+ }
+
+ prefix2 := "/prefix2/"
+ cx.user, cx.pass = "test-user", "pass"
+ for i := 0; i < 10; i++ {
+ key := fmt.Sprintf("%s%d", prefix2, i)
+ if err := ctlV3Put(cx, key, "val", ""); err != nil {
+ cx.t.Fatal(err)
+ }
+ }
}
func authTestMemberAdd(cx ctlCtx) {
@@ -675,6 +690,36 @@ func authTestFromKeyPerm(cx ctlCtx) {
cx.t.Fatal(err)
}
}
+
+ // grant the entire keys
+ cx.user, cx.pass = "root", "root"
+ if err := ctlV3RoleGrantPermission(cx, "test-role", grantingPerm{true, true, "", "\x00", false}); err != nil {
+ cx.t.Fatal(err)
+ }
+
+ // try keys, of course it must be allowed because test-role has a permission of the entire keys
+ cx.user, cx.pass = "test-user", "pass"
+ for i := 0; i < 10; i++ {
+ key := fmt.Sprintf("z%d", i)
+ if err := ctlV3Put(cx, key, "val", ""); err != nil {
+ cx.t.Fatal(err)
+ }
+ }
+
+ // revoke the entire keys
+ cx.user, cx.pass = "root", "root"
+ if err := ctlV3RoleRevokePermission(cx, "test-role", "", "", true); err != nil {
+ cx.t.Fatal(err)
+ }
+
+ // try the revoked entire key permission
+ cx.user, cx.pass = "test-user", "pass"
+ for i := 0; i < 10; i++ {
+ key := fmt.Sprintf("z%d", i)
+ if err := ctlV3PutFailPerm(cx, key, "val"); err != nil {
+ cx.t.Fatal(err)
+ }
+ }
}
func authTestWatch(cx ctlCtx) {
diff --git a/vendor/github.com/coreos/etcd/e2e/ctl_v3_kv_test.go b/vendor/github.com/coreos/etcd/e2e/ctl_v3_kv_test.go
index d05a69ccf..2e14bea64 100644
--- a/vendor/github.com/coreos/etcd/e2e/ctl_v3_kv_test.go
+++ b/vendor/github.com/coreos/etcd/e2e/ctl_v3_kv_test.go
@@ -222,21 +222,15 @@ func getRevTest(cx ctlCtx) {
}
func getKeysOnlyTest(cx ctlCtx) {
- var (
- kvs = []kv{{"key1", "val1"}}
- )
- for i := range kvs {
- if err := ctlV3Put(cx, kvs[i].key, kvs[i].val, ""); err != nil {
- cx.t.Fatalf("getKeysOnlyTest #%d: ctlV3Put error (%v)", i, err)
- }
+ if err := ctlV3Put(cx, "key", "val", ""); err != nil {
+ cx.t.Fatal(err)
}
-
- cmdArgs := append(cx.PrefixArgs(), "get")
- cmdArgs = append(cmdArgs, []string{"--prefix", "--keys-only", "key"}...)
-
- err := spawnWithExpects(cmdArgs, []string{"key1", ""}...)
- if err != nil {
- cx.t.Fatalf("getKeysOnlyTest : error (%v)", err)
+ cmdArgs := append(cx.PrefixArgs(), []string{"get", "--keys-only", "key"}...)
+ if err := spawnWithExpect(cmdArgs, "key"); err != nil {
+ cx.t.Fatal(err)
+ }
+ if err := spawnWithExpects(cmdArgs, "val"); err == nil {
+ cx.t.Fatalf("got value but passed --keys-only")
}
}
diff --git a/vendor/github.com/coreos/etcd/e2e/ctl_v3_migrate_test.go b/vendor/github.com/coreos/etcd/e2e/ctl_v3_migrate_test.go
index 7252fe0a3..1bad8c439 100644
--- a/vendor/github.com/coreos/etcd/e2e/ctl_v3_migrate_test.go
+++ b/vendor/github.com/coreos/etcd/e2e/ctl_v3_migrate_test.go
@@ -15,13 +15,12 @@
package e2e
import (
+ "context"
"fmt"
"os"
"testing"
"time"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/pkg/testutil"
)
diff --git a/vendor/github.com/coreos/etcd/e2e/ctl_v3_test.go b/vendor/github.com/coreos/etcd/e2e/ctl_v3_test.go
index 45e2abeec..28b88b762 100644
--- a/vendor/github.com/coreos/etcd/e2e/ctl_v3_test.go
+++ b/vendor/github.com/coreos/etcd/e2e/ctl_v3_test.go
@@ -123,7 +123,6 @@ func testCtl(t *testing.T, testFunc func(ctlCtx), opts ...ctlOption) {
}
ret.applyOpts(opts)
- os.Setenv("ETCDCTL_API", "3")
mustEtcdctl(t)
if !ret.quorum {
ret.cfg = *configStandalone(ret.cfg)
@@ -140,7 +139,6 @@ func testCtl(t *testing.T, testFunc func(ctlCtx), opts ...ctlOption) {
ret.epc = epc
defer func() {
- os.Unsetenv("ETCDCTL_API")
if ret.envMap != nil {
for k := range ret.envMap {
os.Unsetenv(k)
@@ -192,7 +190,7 @@ func (cx *ctlCtx) prefixArgs(eps []string) []string {
useEnv := cx.envMap != nil
- cmdArgs := []string{ctlBinPath}
+ cmdArgs := []string{ctlBinPath + "3"}
for k, v := range fmap {
if useEnv {
ek := flags.FlagToEnv("ETCDCTL", k)
diff --git a/vendor/github.com/coreos/etcd/e2e/etcd_process.go b/vendor/github.com/coreos/etcd/e2e/etcd_process.go
index 3ae710563..3663d248a 100644
--- a/vendor/github.com/coreos/etcd/e2e/etcd_process.go
+++ b/vendor/github.com/coreos/etcd/e2e/etcd_process.go
@@ -23,7 +23,11 @@ import (
"github.com/coreos/etcd/pkg/fileutil"
)
-var etcdServerReadyLines = []string{"enabled capabilities for version", "published"}
+var (
+ etcdServerReadyLines = []string{"enabled capabilities for version", "published"}
+ binPath string
+ ctlBinPath string
+)
// etcdProcess is a process that serves etcd requests.
type etcdProcess interface {
diff --git a/vendor/github.com/coreos/etcd/e2e/etcd_spawn_cov.go b/vendor/github.com/coreos/etcd/e2e/etcd_spawn_cov.go
index ca45a571e..e3098caa2 100644
--- a/vendor/github.com/coreos/etcd/e2e/etcd_spawn_cov.go
+++ b/vendor/github.com/coreos/etcd/e2e/etcd_spawn_cov.go
@@ -35,21 +35,24 @@ func spawnCmd(args []string) (*expect.ExpectProcess, error) {
if args[0] == binPath {
return spawnEtcd(args)
}
+ if args[0] == ctlBinPath || args[0] == ctlBinPath+"3" {
+ // avoid test flag conflicts in coverage enabled etcdctl by putting flags in ETCDCTL_ARGS
+ env := []string{
+ // was \xff, but that's used for testing boundary conditions; 0xe7cd should be safe
+ "ETCDCTL_ARGS=" + strings.Join(args, "\xe7\xcd"),
+ }
+ if args[0] == ctlBinPath+"3" {
+ env = append(env, "ETCDCTL_API=3")
+ }
- if args[0] == ctlBinPath {
covArgs, err := getCovArgs()
if err != nil {
return nil, err
}
- // avoid test flag conflicts in coverage enabled etcdctl by putting flags in ETCDCTL_ARGS
- ctl_cov_env := []string{
- // was \xff, but that's used for testing boundary conditions; 0xe7cd should be safe
- "ETCDCTL_ARGS=" + strings.Join(args, "\xe7\xcd"),
- }
// when withFlagByEnv() is used in testCtl(), env variables for ctl is set to os.env.
// they must be included in ctl_cov_env.
- ctl_cov_env = append(ctl_cov_env, os.Environ()...)
- ep, err := expect.NewExpectWithEnv(binDir+"/etcdctl_test", covArgs, ctl_cov_env)
+ env = append(env, os.Environ()...)
+ ep, err := expect.NewExpectWithEnv(binDir+"/etcdctl_test", covArgs, env)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/coreos/etcd/e2e/etcd_spawn_nocov.go b/vendor/github.com/coreos/etcd/e2e/etcd_spawn_nocov.go
index 82243e7e0..49d41822e 100644
--- a/vendor/github.com/coreos/etcd/e2e/etcd_spawn_nocov.go
+++ b/vendor/github.com/coreos/etcd/e2e/etcd_spawn_nocov.go
@@ -16,10 +16,18 @@
package e2e
-import "github.com/coreos/etcd/pkg/expect"
+import (
+ "os"
+
+ "github.com/coreos/etcd/pkg/expect"
+)
const noOutputLineCount = 0 // regular binaries emit no extra lines
func spawnCmd(args []string) (*expect.ExpectProcess, error) {
+ if args[0] == ctlBinPath+"3" {
+ env := append(os.Environ(), "ETCDCTL_API=3")
+ return expect.NewExpectWithEnv(ctlBinPath, args[1:], env)
+ }
return expect.NewExpect(args[0], args[1:]...)
}
diff --git a/vendor/github.com/coreos/etcd/e2e/main_test.go b/vendor/github.com/coreos/etcd/e2e/main_test.go
index 858018a26..47691a9b3 100644
--- a/vendor/github.com/coreos/etcd/e2e/main_test.go
+++ b/vendor/github.com/coreos/etcd/e2e/main_test.go
@@ -17,8 +17,6 @@ var (
binDir string
certDir string
- binPath string
- ctlBinPath string
certPath string
privateKeyPath string
caPath string
diff --git a/vendor/github.com/coreos/etcd/embed/serve.go b/vendor/github.com/coreos/etcd/embed/serve.go
index 6af237432..501d5f253 100644
--- a/vendor/github.com/coreos/etcd/embed/serve.go
+++ b/vendor/github.com/coreos/etcd/embed/serve.go
@@ -15,6 +15,7 @@
package embed
import (
+ "context"
"io/ioutil"
defaultLog "log"
"net"
@@ -36,7 +37,6 @@ import (
gw "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/soheilhy/cmux"
- "golang.org/x/net/context"
"golang.org/x/net/trace"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials"
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/backup_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/backup_command.go
index feda4b191..82e61d8ab 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/backup_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/backup_command.go
@@ -15,18 +15,25 @@
package command
import (
- "fmt"
+ "encoding/binary"
"log"
+ "os"
+ "path"
"path/filepath"
+ "regexp"
"time"
"github.com/coreos/etcd/etcdserver/etcdserverpb"
+ "github.com/coreos/etcd/etcdserver/membership"
"github.com/coreos/etcd/pkg/fileutil"
"github.com/coreos/etcd/pkg/idutil"
"github.com/coreos/etcd/pkg/pbutil"
+ "github.com/coreos/etcd/raft/raftpb"
"github.com/coreos/etcd/snap"
"github.com/coreos/etcd/wal"
"github.com/coreos/etcd/wal/walpb"
+
+ bolt "github.com/coreos/bbolt"
"github.com/urfave/cli"
)
@@ -40,6 +47,7 @@ func NewBackupCommand() cli.Command {
cli.StringFlag{Name: "wal-dir", Value: "", Usage: "Path to the etcd wal dir"},
cli.StringFlag{Name: "backup-dir", Value: "", Usage: "Path to the backup dir"},
cli.StringFlag{Name: "backup-wal-dir", Value: "", Usage: "Path to the backup wal dir"},
+ cli.BoolFlag{Name: "with-v3", Usage: "Backup v3 backend data"},
},
Action: handleBackup,
}
@@ -50,6 +58,7 @@ func handleBackup(c *cli.Context) error {
var srcWAL string
var destWAL string
+ withV3 := c.Bool("with-v3")
srcSnap := filepath.Join(c.String("data-dir"), "member", "snap")
destSnap := filepath.Join(c.String("backup-dir"), "member", "snap")
@@ -68,36 +77,11 @@ func handleBackup(c *cli.Context) error {
if err := fileutil.CreateDirAll(destSnap); err != nil {
log.Fatalf("failed creating backup snapshot dir %v: %v", destSnap, err)
}
- ss := snap.New(srcSnap)
- snapshot, err := ss.Load()
- if err != nil && err != snap.ErrNoSnapshot {
- log.Fatal(err)
- }
- var walsnap walpb.Snapshot
- if snapshot != nil {
- walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term
- newss := snap.New(destSnap)
- if err = newss.SaveSnap(*snapshot); err != nil {
- log.Fatal(err)
- }
- }
- w, err := wal.OpenForRead(srcWAL, walsnap)
- if err != nil {
- log.Fatal(err)
- }
- defer w.Close()
- wmetadata, state, ents, err := w.ReadAll()
- switch err {
- case nil:
- case wal.ErrSnapshotNotFound:
- fmt.Printf("Failed to find the match snapshot record %+v in wal %v.", walsnap, srcWAL)
- fmt.Printf("etcdctl will add it back. Start auto fixing...")
- default:
- log.Fatal(err)
- }
- var metadata etcdserverpb.Metadata
- pbutil.MustUnmarshal(&metadata, wmetadata)
+ walsnap := saveSnap(destSnap, srcSnap)
+ metadata, state, ents := loadWAL(srcWAL, walsnap, withV3)
+ saveDB(filepath.Join(destSnap, "db"), filepath.Join(srcSnap, "db"), state.Commit, withV3)
+
idgen := idutil.NewGenerator(0, time.Now())
metadata.NodeID = idgen.Next()
metadata.ClusterID = idgen.Next()
@@ -116,3 +100,157 @@ func handleBackup(c *cli.Context) error {
return nil
}
+
+func saveSnap(destSnap, srcSnap string) (walsnap walpb.Snapshot) {
+ ss := snap.New(srcSnap)
+ snapshot, err := ss.Load()
+ if err != nil && err != snap.ErrNoSnapshot {
+ log.Fatal(err)
+ }
+ if snapshot != nil {
+ walsnap.Index, walsnap.Term = snapshot.Metadata.Index, snapshot.Metadata.Term
+ newss := snap.New(destSnap)
+ if err = newss.SaveSnap(*snapshot); err != nil {
+ log.Fatal(err)
+ }
+ }
+ return walsnap
+}
+
+func loadWAL(srcWAL string, walsnap walpb.Snapshot, v3 bool) (etcdserverpb.Metadata, raftpb.HardState, []raftpb.Entry) {
+ w, err := wal.OpenForRead(srcWAL, walsnap)
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer w.Close()
+ wmetadata, state, ents, err := w.ReadAll()
+ switch err {
+ case nil:
+ case wal.ErrSnapshotNotFound:
+ log.Printf("Failed to find the match snapshot record %+v in wal %v.", walsnap, srcWAL)
+ log.Printf("etcdctl will add it back. Start auto fixing...")
+ default:
+ log.Fatal(err)
+ }
+
+ re := path.Join(membership.StoreMembersPrefix, "[[:xdigit:]]{1,16}", "attributes")
+ memberAttrRE := regexp.MustCompile(re)
+
+ removed := uint64(0)
+ i := 0
+ remove := func() {
+ ents = append(ents[:i], ents[i+1:]...)
+ removed++
+ i--
+ }
+ for i = 0; i < len(ents); i++ {
+ ents[i].Index -= removed
+ if ents[i].Type == raftpb.EntryConfChange {
+ log.Println("ignoring EntryConfChange raft entry")
+ remove()
+ continue
+ }
+
+ var raftReq etcdserverpb.InternalRaftRequest
+ var v2Req *etcdserverpb.Request
+ if pbutil.MaybeUnmarshal(&raftReq, ents[i].Data) {
+ v2Req = raftReq.V2
+ } else {
+ v2Req = &etcdserverpb.Request{}
+ pbutil.MustUnmarshal(v2Req, ents[i].Data)
+ }
+
+ if v2Req != nil && v2Req.Method == "PUT" && memberAttrRE.MatchString(v2Req.Path) {
+ log.Println("ignoring member attribute update on", v2Req.Path)
+ remove()
+ continue
+ }
+
+ if v2Req != nil {
+ continue
+ }
+
+ if v3 || raftReq.Header == nil {
+ continue
+ }
+ log.Println("ignoring v3 raft entry")
+ remove()
+ }
+ state.Commit -= removed
+ var metadata etcdserverpb.Metadata
+ pbutil.MustUnmarshal(&metadata, wmetadata)
+ return metadata, state, ents
+}
+
+// saveDB copies the v3 backend and strips cluster information.
+func saveDB(destDB, srcDB string, idx uint64, v3 bool) {
+ // open src db to safely copy db state
+ if v3 {
+ var src *bolt.DB
+ ch := make(chan *bolt.DB, 1)
+ go func() {
+ src, err := bolt.Open(srcDB, 0444, &bolt.Options{ReadOnly: true})
+ if err != nil {
+ log.Fatal(err)
+ }
+ ch <- src
+ }()
+ select {
+ case src = <-ch:
+ case <-time.After(time.Second):
+ log.Println("waiting to acquire lock on", srcDB)
+ src = <-ch
+ }
+ defer src.Close()
+
+ tx, err := src.Begin(false)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // copy srcDB to destDB
+ dest, err := os.Create(destDB)
+ if err != nil {
+ log.Fatal(err)
+ }
+ if _, err := tx.WriteTo(dest); err != nil {
+ log.Fatal(err)
+ }
+ dest.Close()
+ if err := tx.Rollback(); err != nil {
+ log.Fatal(err)
+ }
+ }
+
+ db, err := bolt.Open(destDB, 0644, &bolt.Options{})
+ if err != nil {
+ log.Fatal(err)
+ }
+ tx, err := db.Begin(true)
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // remove membership information; should be clobbered by --force-new-cluster
+ for _, bucket := range []string{"members", "members_removed", "cluster"} {
+ tx.DeleteBucket([]byte(bucket))
+ }
+
+ // update consistent index to match hard state
+ if !v3 {
+ idxBytes := make([]byte, 8)
+ binary.BigEndian.PutUint64(idxBytes, idx)
+ b, err := tx.CreateBucketIfNotExists([]byte("meta"))
+ if err != nil {
+ log.Fatal(err)
+ }
+ b.Put([]byte("consistent_index"), idxBytes)
+ }
+
+ if err := tx.Commit(); err != nil {
+ log.Fatal(err)
+ }
+ if err := db.Close(); err != nil {
+ log.Fatal(err)
+ }
+}
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/cluster_health.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/cluster_health.go
index d1429649a..ec0bb241d 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/cluster_health.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/cluster_health.go
@@ -15,6 +15,7 @@
package command
import (
+ "context"
"encoding/json"
"fmt"
"io/ioutil"
@@ -24,8 +25,8 @@ import (
"time"
"github.com/coreos/etcd/client"
+
"github.com/urfave/cli"
- "golang.org/x/net/context"
)
func NewClusterHealthCommand() cli.Command {
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/exec_watch_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/exec_watch_command.go
index 5ae245245..cc3478cc3 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/exec_watch_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/exec_watch_command.go
@@ -15,6 +15,7 @@
package command
import (
+ "context"
"errors"
"fmt"
"os"
@@ -22,8 +23,8 @@ import (
"os/signal"
"github.com/coreos/etcd/client"
+
"github.com/urfave/cli"
- "golang.org/x/net/context"
)
// NewExecWatchCommand returns the CLI command for "exec-watch".
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/util.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/util.go
index d6a58145c..e4719d77a 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/util.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/util.go
@@ -15,6 +15,7 @@
package command
import (
+ "context"
"errors"
"fmt"
"io"
@@ -27,11 +28,11 @@ import (
"syscall"
"time"
- "github.com/bgentry/speakeasy"
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/pkg/transport"
+
+ "github.com/bgentry/speakeasy"
"github.com/urfave/cli"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/watch_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/watch_command.go
index 71f4c014c..eac63b040 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/watch_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv2/command/watch_command.go
@@ -15,14 +15,15 @@
package command
import (
+ "context"
"errors"
"fmt"
"os"
"os/signal"
"github.com/coreos/etcd/client"
+
"github.com/urfave/cli"
- "golang.org/x/net/context"
)
// NewWatchCommand returns the CLI command for "watch".
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/elect_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/elect_command.go
index 74216f3e6..ace4f1197 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/elect_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/elect_command.go
@@ -15,6 +15,7 @@
package command
import (
+ "context"
"errors"
"os"
"os/signal"
@@ -22,8 +23,8 @@ import (
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
+
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/global.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/global.go
index 616d32e21..eeef3ddb3 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/global.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/global.go
@@ -17,9 +17,9 @@ package command
import (
"crypto/tls"
"errors"
+ "fmt"
"io"
"io/ioutil"
- "log"
"os"
"strings"
"time"
@@ -27,8 +27,10 @@ import (
"github.com/bgentry/speakeasy"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/pkg/flags"
+ "github.com/coreos/etcd/pkg/srv"
"github.com/coreos/etcd/pkg/transport"
"github.com/spf13/cobra"
+ "google.golang.org/grpc/grpclog"
)
// GlobalFlags are flags that defined globally
@@ -36,6 +38,7 @@ import (
type GlobalFlags struct {
Insecure bool
InsecureSkipVerify bool
+ InsecureDiscovery bool
Endpoints []string
DialTimeout time.Duration
CommandTimeOut time.Duration
@@ -51,9 +54,10 @@ type GlobalFlags struct {
}
type secureCfg struct {
- cert string
- key string
- cacert string
+ cert string
+ key string
+ cacert string
+ serverName string
insecureTransport bool
insecureSkipVerify bool
@@ -64,6 +68,11 @@ type authCfg struct {
password string
}
+type discoveryCfg struct {
+ domain string
+ insecure bool
+}
+
var display printer = &simplePrinter{}
func initDisplayFromCmd(cmd *cobra.Command) {
@@ -88,10 +97,10 @@ func mustClientFromCmd(cmd *cobra.Command) *clientv3.Client {
ExitWithError(ExitError, derr)
}
if debug {
- clientv3.SetLogger(log.New(os.Stderr, "grpc: ", 0))
+ clientv3.SetLogger(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
}
- endpoints, err := cmd.Flags().GetStringSlice("endpoints")
+ endpoints, err := endpointsFromCmd(cmd)
if err != nil {
ExitWithError(ExitError, err)
}
@@ -137,6 +146,11 @@ func newClientCfg(endpoints []string, dialTimeout time.Duration, scfg *secureCfg
cfgtls = &tlsinfo
}
+ if scfg.serverName != "" {
+ tlsinfo.ServerName = scfg.serverName
+ cfgtls = &tlsinfo
+ }
+
cfg := &clientv3.Config{
Endpoints: endpoints,
DialTimeout: dialTimeout,
@@ -192,11 +206,17 @@ func secureCfgFromCmd(cmd *cobra.Command) *secureCfg {
cert, key, cacert := keyAndCertFromCmd(cmd)
insecureTr := insecureTransportFromCmd(cmd)
skipVerify := insecureSkipVerifyFromCmd(cmd)
+ discoveryCfg := discoveryCfgFromCmd(cmd)
+
+ if discoveryCfg.insecure {
+ discoveryCfg.domain = ""
+ }
return &secureCfg{
- cert: cert,
- key: key,
- cacert: cacert,
+ cert: cert,
+ key: key,
+ cacert: cacert,
+ serverName: discoveryCfg.domain,
insecureTransport: insecureTr,
insecureSkipVerify: skipVerify,
@@ -268,3 +288,66 @@ func authCfgFromCmd(cmd *cobra.Command) *authCfg {
return &cfg
}
+
+func insecureDiscoveryFromCmd(cmd *cobra.Command) bool {
+ discovery, err := cmd.Flags().GetBool("insecure-discovery")
+ if err != nil {
+ ExitWithError(ExitError, err)
+ }
+ return discovery
+}
+
+func discoverySrvFromCmd(cmd *cobra.Command) string {
+ domainStr, err := cmd.Flags().GetString("discovery-srv")
+ if err != nil {
+ ExitWithError(ExitBadArgs, err)
+ }
+ return domainStr
+}
+
+func discoveryCfgFromCmd(cmd *cobra.Command) *discoveryCfg {
+ return &discoveryCfg{
+ domain: discoverySrvFromCmd(cmd),
+ insecure: insecureDiscoveryFromCmd(cmd),
+ }
+}
+
+func endpointsFromCmd(cmd *cobra.Command) ([]string, error) {
+ eps, err := endpointsFromFlagValue(cmd)
+ if err != nil {
+ return nil, err
+ }
+ // If domain discovery returns no endpoints, check endpoints flag
+ if len(eps) == 0 {
+ eps, err = cmd.Flags().GetStringSlice("endpoints")
+ }
+ return eps, err
+}
+
+func endpointsFromFlagValue(cmd *cobra.Command) ([]string, error) {
+ discoveryCfg := discoveryCfgFromCmd(cmd)
+
+ // If we still don't have domain discovery, return nothing
+ if discoveryCfg.domain == "" {
+ return []string{}, nil
+ }
+
+ srvs, err := srv.GetClient("etcd-client", discoveryCfg.domain)
+ if err != nil {
+ return nil, err
+ }
+ eps := srvs.Endpoints
+ if discoveryCfg.insecure {
+ return eps, err
+ }
+ // strip insecure connections
+ ret := []string{}
+ for _, ep := range eps {
+ if strings.HasPrefix("http://", ep) {
+ fmt.Fprintf(os.Stderr, "ignoring discovered insecure endpoint %q\n", ep)
+ continue
+ }
+ ret = append(ret, ep)
+ }
+ return ret, err
+}
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lease_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lease_command.go
index fe6fa3634..28c9a0ada 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lease_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lease_command.go
@@ -15,12 +15,13 @@
package command
import (
+ "context"
"fmt"
"strconv"
v3 "github.com/coreos/etcd/clientv3"
+
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
// NewLeaseCommand returns the cobra command for "lease".
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lock_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lock_command.go
index 13d3a7c78..74ebac81e 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lock_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/lock_command.go
@@ -15,6 +15,7 @@
package command
import (
+ "context"
"errors"
"fmt"
"os"
@@ -24,8 +25,8 @@ import (
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
+
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
var lockTTL = 10
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/make_mirror_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/make_mirror_command.go
index e333c9994..502406441 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/make_mirror_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/make_mirror_command.go
@@ -15,6 +15,7 @@
package command
import (
+ "context"
"errors"
"fmt"
"strings"
@@ -25,8 +26,8 @@ import (
"github.com/coreos/etcd/clientv3/mirror"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
"github.com/coreos/etcd/mvcc/mvccpb"
+
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/role_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/role_command.go
index b467a5632..39c52d313 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/role_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/role_command.go
@@ -15,11 +15,11 @@
package command
import (
+ "context"
"fmt"
"github.com/coreos/etcd/clientv3"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
var (
@@ -170,11 +170,8 @@ func roleGrantPermissionCommandFunc(cmd *cobra.Command, args []string) {
ExitWithError(ExitBadArgs, err)
}
- rangeEnd, rerr := rangeEndFromPermFlags(args[2:])
- if rerr != nil {
- ExitWithError(ExitBadArgs, rerr)
- }
- resp, err := mustClientFromCmd(cmd).Auth.RoleGrantPermission(context.TODO(), args[0], args[2], rangeEnd, perm)
+ key, rangeEnd := permRange(args[2:])
+ resp, err := mustClientFromCmd(cmd).Auth.RoleGrantPermission(context.TODO(), args[0], key, rangeEnd, perm)
if err != nil {
ExitWithError(ExitError, err)
}
@@ -188,17 +185,41 @@ func roleRevokePermissionCommandFunc(cmd *cobra.Command, args []string) {
ExitWithError(ExitBadArgs, fmt.Errorf("role revoke-permission command requires role name and key [endkey] as its argument."))
}
- rangeEnd, rerr := rangeEndFromPermFlags(args[1:])
- if rerr != nil {
- ExitWithError(ExitBadArgs, rerr)
- }
- resp, err := mustClientFromCmd(cmd).Auth.RoleRevokePermission(context.TODO(), args[0], args[1], rangeEnd)
+ key, rangeEnd := permRange(args[1:])
+ resp, err := mustClientFromCmd(cmd).Auth.RoleRevokePermission(context.TODO(), args[0], key, rangeEnd)
if err != nil {
ExitWithError(ExitError, err)
}
display.RoleRevokePermission(args[0], args[1], rangeEnd, *resp)
}
+func permRange(args []string) (string, string) {
+ key := args[0]
+ var rangeEnd string
+ if len(key) == 0 {
+ if rolePermPrefix && rolePermFromKey {
+ ExitWithError(ExitBadArgs, fmt.Errorf("--from-key and --prefix flags are mutually exclusive"))
+ }
+
+ // Range permission is expressed as adt.BytesAffineInterval,
+ // so the empty prefix which should be matched with every key must be like this ["\x00", ).
+ key = "\x00"
+ if rolePermPrefix || rolePermFromKey {
+ // For the both cases of prefix and from-key, a permission with an empty key
+ // should allow access to the entire key space.
+ // 0x00 will be treated as open ended in server side.
+ rangeEnd = "\x00"
+ }
+ } else {
+ var err error
+ rangeEnd, err = rangeEndFromPermFlags(args[0:])
+ if err != nil {
+ ExitWithError(ExitBadArgs, err)
+ }
+ }
+ return key, rangeEnd
+}
+
func rangeEndFromPermFlags(args []string) (string, error) {
if len(args) == 1 {
if rolePermPrefix {
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/snapshot_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/snapshot_command.go
index db12df50a..3c59ec70c 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/snapshot_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/snapshot_command.go
@@ -15,6 +15,7 @@
package command
import (
+ "context"
"crypto/sha256"
"encoding/binary"
"encoding/json"
@@ -27,7 +28,6 @@ import (
"reflect"
"strings"
- bolt "github.com/coreos/bbolt"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/etcdserver/membership"
@@ -42,8 +42,9 @@ import (
"github.com/coreos/etcd/store"
"github.com/coreos/etcd/wal"
"github.com/coreos/etcd/wal/walpb"
+
+ bolt "github.com/coreos/bbolt"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
const (
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/txn_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/txn_command.go
index f809ec88c..eec1e0916 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/txn_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/txn_command.go
@@ -16,6 +16,7 @@ package command
import (
"bufio"
+ "context"
"fmt"
"os"
"strconv"
@@ -23,8 +24,8 @@ import (
"github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
+
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/user_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/user_command.go
index 8a157e2a6..4df56f720 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/user_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/user_command.go
@@ -15,12 +15,12 @@
package command
import (
+ "context"
"fmt"
"strings"
"github.com/bgentry/speakeasy"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/util.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/util.go
index c9201c7be..addd023db 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/util.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/util.go
@@ -15,13 +15,14 @@
package command
import (
+ "context"
"encoding/hex"
"fmt"
"regexp"
pb "github.com/coreos/etcd/mvcc/mvccpb"
+
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
func printKV(isHex bool, valueOnly bool, kv *pb.KeyValue) {
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/watch_command.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/watch_command.go
index 17b670e9d..4adf547e9 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/watch_command.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/command/watch_command.go
@@ -16,13 +16,14 @@ package command
import (
"bufio"
+ "context"
"fmt"
"os"
"strings"
"github.com/coreos/etcd/clientv3"
+
"github.com/spf13/cobra"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/ctl.go b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/ctl.go
index 2ca2b4096..a24a51480 100644
--- a/vendor/github.com/coreos/etcd/etcdctl/ctlv3/ctl.go
+++ b/vendor/github.com/coreos/etcd/etcdctl/ctlv3/ctl.go
@@ -54,11 +54,13 @@ func init() {
// TODO: secure by default when etcd enables secure gRPC by default.
rootCmd.PersistentFlags().BoolVar(&globalFlags.Insecure, "insecure-transport", true, "disable transport security for client connections")
+ rootCmd.PersistentFlags().BoolVar(&globalFlags.InsecureDiscovery, "insecure-discovery", true, "accept insecure SRV records describing cluster endpoints")
rootCmd.PersistentFlags().BoolVar(&globalFlags.InsecureSkipVerify, "insecure-skip-tls-verify", false, "skip server certificate verification")
rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CertFile, "cert", "", "identify secure client using this TLS certificate file")
rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.KeyFile, "key", "", "identify secure client using this TLS key file")
rootCmd.PersistentFlags().StringVar(&globalFlags.TLS.CAFile, "cacert", "", "verify certificates of TLS-enabled secure servers using this CA bundle")
rootCmd.PersistentFlags().StringVar(&globalFlags.User, "user", "", "username[:password] for authentication (prompt if password is not supplied)")
+ rootCmd.PersistentFlags().StringVarP(&globalFlags.TLS.ServerName, "discovery-srv", "d", "", "domain name to query for SRV records describing cluster endpoints")
rootCmd.AddCommand(
command.NewGetCommand(),
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client.go b/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client.go
index c9d86508e..d23375297 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client.go
@@ -15,6 +15,7 @@
package v2http
import (
+ "context"
"encoding/json"
"errors"
"fmt"
@@ -37,8 +38,8 @@ import (
"github.com/coreos/etcd/etcdserver/stats"
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/store"
+
"github.com/jonboulle/clockwork"
- "golang.org/x/net/context"
)
const (
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client_test.go b/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client_test.go
index 0a58082a4..44448d0bf 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client_test.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v2http/client_test.go
@@ -16,6 +16,7 @@ package v2http
import (
"bytes"
+ "context"
"encoding/json"
"errors"
"io/ioutil"
@@ -38,9 +39,9 @@ import (
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/raft/raftpb"
"github.com/coreos/etcd/store"
+
"github.com/coreos/go-semver/semver"
"github.com/jonboulle/clockwork"
- "golang.org/x/net/context"
)
func mustMarshalEvent(t *testing.T, ev *store.Event) string {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v2http/http_test.go b/vendor/github.com/coreos/etcd/etcdserver/api/v2http/http_test.go
index 5b68a49a5..e9d8dc00d 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v2http/http_test.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v2http/http_test.go
@@ -15,6 +15,7 @@
package v2http
import (
+ "context"
"errors"
"net/http"
"net/http/httptest"
@@ -27,8 +28,8 @@ import (
"github.com/coreos/etcd/etcdserver/membership"
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/raft/raftpb"
+
"github.com/coreos/go-semver/semver"
- "golang.org/x/net/context"
)
type fakeCluster struct {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v2v3/server.go b/vendor/github.com/coreos/etcd/etcdserver/api/v2v3/server.go
index dae457ccf..2ef63ce68 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v2v3/server.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v2v3/server.go
@@ -15,6 +15,7 @@
package v2v3
import (
+ "context"
"net/http"
"time"
@@ -26,7 +27,6 @@ import (
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/go-semver/semver"
- "golang.org/x/net/context" // TODO: replace with context in go1.9
)
type fakeStats struct{}
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go
index cc4147d2f..6f943184f 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3client/v3client.go
@@ -15,14 +15,13 @@
package v3client
import (
+ "context"
"time"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc"
"github.com/coreos/etcd/proxy/grpcproxy/adapter"
-
- "golang.org/x/net/context"
)
// New creates a clientv3 client that wraps an in-process EtcdServer. Instead
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3election/election.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3election/election.go
index f9061c079..51e181446 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3election/election.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3election/election.go
@@ -15,7 +15,7 @@
package v3election
import (
- "golang.org/x/net/context"
+ "context"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go
index 66465bf13..a5efcbab5 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3lock/lock.go
@@ -15,7 +15,7 @@
package v3lock
import (
- "golang.org/x/net/context"
+ "context"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go
index e66c5261d..ca8e53ad0 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/auth.go
@@ -15,9 +15,10 @@
package v3rpc
import (
+ "context"
+
"github.com/coreos/etcd/etcdserver"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
)
type AuthServer struct {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go
index 3f7cea8ee..862a7dd3e 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/grpc.go
@@ -17,6 +17,7 @@ package v3rpc
import (
"crypto/tls"
"math"
+ "os"
"github.com/coreos/etcd/etcdserver"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
@@ -35,7 +36,7 @@ const (
)
func init() {
- grpclog.SetLogger(plog)
+ grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
}
func Server(s *etcdserver.EtcdServer, tls *tls.Config) *grpc.Server {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go
index de9470a89..f38dc4a99 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/interceptor.go
@@ -15,6 +15,7 @@
package v3rpc
import (
+ "context"
"sync"
"time"
@@ -25,7 +26,6 @@ import (
"github.com/coreos/etcd/raft"
prometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
- "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
)
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go
index 973346592..9781bddda 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/key.go
@@ -16,12 +16,14 @@
package v3rpc
import (
+ "context"
+
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/adt"
+
"github.com/coreos/pkg/capnslog"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go
index 6c267da75..7b5e17ca2 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/lease.go
@@ -15,13 +15,13 @@
package v3rpc
import (
+ "context"
"io"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/lease"
- "golang.org/x/net/context"
)
type LeaseServer struct {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go
index a88aec995..c9df1800d 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/maintenance.go
@@ -15,6 +15,7 @@
package v3rpc
import (
+ "context"
"crypto/sha256"
"io"
@@ -26,7 +27,6 @@ import (
"github.com/coreos/etcd/mvcc/backend"
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/version"
- "golang.org/x/net/context"
)
type KVGetter interface {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go
index ff271e8dd..cbe7b470a 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/member.go
@@ -15,6 +15,7 @@
package v3rpc
import (
+ "context"
"time"
"github.com/coreos/etcd/etcdserver"
@@ -23,7 +24,6 @@ import (
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/etcdserver/membership"
"github.com/coreos/etcd/pkg/types"
- "golang.org/x/net/context"
)
type ClusterServer struct {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go
index 836f2fd3f..02d99609d 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/quota.go
@@ -15,11 +15,12 @@
package v3rpc
import (
+ "context"
+
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/types"
- "golang.org/x/net/context"
)
type quotaKVServer struct {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go
index cc8ebbdb8..b4f74e780 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error.go
@@ -15,110 +15,112 @@
package rpctypes
import (
- "google.golang.org/grpc"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
)
+// server-side error
var (
- // server-side error
- ErrGRPCEmptyKey = grpc.Errorf(codes.InvalidArgument, "etcdserver: key is not provided")
- ErrGRPCKeyNotFound = grpc.Errorf(codes.InvalidArgument, "etcdserver: key not found")
- ErrGRPCValueProvided = grpc.Errorf(codes.InvalidArgument, "etcdserver: value is provided")
- ErrGRPCLeaseProvided = grpc.Errorf(codes.InvalidArgument, "etcdserver: lease is provided")
- ErrGRPCTooManyOps = grpc.Errorf(codes.InvalidArgument, "etcdserver: too many operations in txn request")
- ErrGRPCDuplicateKey = grpc.Errorf(codes.InvalidArgument, "etcdserver: duplicate key given in txn request")
- ErrGRPCCompacted = grpc.Errorf(codes.OutOfRange, "etcdserver: mvcc: required revision has been compacted")
- ErrGRPCFutureRev = grpc.Errorf(codes.OutOfRange, "etcdserver: mvcc: required revision is a future revision")
- ErrGRPCNoSpace = grpc.Errorf(codes.ResourceExhausted, "etcdserver: mvcc: database space exceeded")
+ ErrGRPCEmptyKey = status.New(codes.InvalidArgument, "etcdserver: key is not provided").Err()
+ ErrGRPCKeyNotFound = status.New(codes.InvalidArgument, "etcdserver: key not found").Err()
+ ErrGRPCValueProvided = status.New(codes.InvalidArgument, "etcdserver: value is provided").Err()
+ ErrGRPCLeaseProvided = status.New(codes.InvalidArgument, "etcdserver: lease is provided").Err()
+ ErrGRPCTooManyOps = status.New(codes.InvalidArgument, "etcdserver: too many operations in txn request").Err()
+ ErrGRPCDuplicateKey = status.New(codes.InvalidArgument, "etcdserver: duplicate key given in txn request").Err()
+ ErrGRPCCompacted = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision has been compacted").Err()
+ ErrGRPCFutureRev = status.New(codes.OutOfRange, "etcdserver: mvcc: required revision is a future revision").Err()
+ ErrGRPCNoSpace = status.New(codes.ResourceExhausted, "etcdserver: mvcc: database space exceeded").Err()
- ErrGRPCLeaseNotFound = grpc.Errorf(codes.NotFound, "etcdserver: requested lease not found")
- ErrGRPCLeaseExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: lease already exists")
+ ErrGRPCLeaseNotFound = status.New(codes.NotFound, "etcdserver: requested lease not found").Err()
+ ErrGRPCLeaseExist = status.New(codes.FailedPrecondition, "etcdserver: lease already exists").Err()
- ErrGRPCMemberExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: member ID already exist")
- ErrGRPCPeerURLExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: Peer URLs already exists")
- ErrGRPCMemberNotEnoughStarted = grpc.Errorf(codes.FailedPrecondition, "etcdserver: re-configuration failed due to not enough started members")
- ErrGRPCMemberBadURLs = grpc.Errorf(codes.InvalidArgument, "etcdserver: given member URLs are invalid")
- ErrGRPCMemberNotFound = grpc.Errorf(codes.NotFound, "etcdserver: member not found")
+ ErrGRPCMemberExist = status.New(codes.FailedPrecondition, "etcdserver: member ID already exist").Err()
+ ErrGRPCPeerURLExist = status.New(codes.FailedPrecondition, "etcdserver: Peer URLs already exists").Err()
+ ErrGRPCMemberNotEnoughStarted = status.New(codes.FailedPrecondition, "etcdserver: re-configuration failed due to not enough started members").Err()
+ ErrGRPCMemberBadURLs = status.New(codes.InvalidArgument, "etcdserver: given member URLs are invalid").Err()
+ ErrGRPCMemberNotFound = status.New(codes.NotFound, "etcdserver: member not found").Err()
- ErrGRPCRequestTooLarge = grpc.Errorf(codes.InvalidArgument, "etcdserver: request is too large")
- ErrGRPCRequestTooManyRequests = grpc.Errorf(codes.ResourceExhausted, "etcdserver: too many requests")
+ ErrGRPCRequestTooLarge = status.New(codes.InvalidArgument, "etcdserver: request is too large").Err()
+ ErrGRPCRequestTooManyRequests = status.New(codes.ResourceExhausted, "etcdserver: too many requests").Err()
- ErrGRPCRootUserNotExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: root user does not exist")
- ErrGRPCRootRoleNotExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: root user does not have root role")
- ErrGRPCUserAlreadyExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: user name already exists")
- ErrGRPCUserEmpty = grpc.Errorf(codes.InvalidArgument, "etcdserver: user name is empty")
- ErrGRPCUserNotFound = grpc.Errorf(codes.FailedPrecondition, "etcdserver: user name not found")
- ErrGRPCRoleAlreadyExist = grpc.Errorf(codes.FailedPrecondition, "etcdserver: role name already exists")
- ErrGRPCRoleNotFound = grpc.Errorf(codes.FailedPrecondition, "etcdserver: role name not found")
- ErrGRPCAuthFailed = grpc.Errorf(codes.InvalidArgument, "etcdserver: authentication failed, invalid user ID or password")
- ErrGRPCPermissionDenied = grpc.Errorf(codes.PermissionDenied, "etcdserver: permission denied")
- ErrGRPCRoleNotGranted = grpc.Errorf(codes.FailedPrecondition, "etcdserver: role is not granted to the user")
- ErrGRPCPermissionNotGranted = grpc.Errorf(codes.FailedPrecondition, "etcdserver: permission is not granted to the role")
- ErrGRPCAuthNotEnabled = grpc.Errorf(codes.FailedPrecondition, "etcdserver: authentication is not enabled")
- ErrGRPCInvalidAuthToken = grpc.Errorf(codes.Unauthenticated, "etcdserver: invalid auth token")
- ErrGRPCInvalidAuthMgmt = grpc.Errorf(codes.InvalidArgument, "etcdserver: invalid auth management")
+ ErrGRPCRootUserNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not exist").Err()
+ ErrGRPCRootRoleNotExist = status.New(codes.FailedPrecondition, "etcdserver: root user does not have root role").Err()
+ ErrGRPCUserAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: user name already exists").Err()
+ ErrGRPCUserEmpty = status.New(codes.InvalidArgument, "etcdserver: user name is empty").Err()
+ ErrGRPCUserNotFound = status.New(codes.FailedPrecondition, "etcdserver: user name not found").Err()
+ ErrGRPCRoleAlreadyExist = status.New(codes.FailedPrecondition, "etcdserver: role name already exists").Err()
+ ErrGRPCRoleNotFound = status.New(codes.FailedPrecondition, "etcdserver: role name not found").Err()
+ ErrGRPCAuthFailed = status.New(codes.InvalidArgument, "etcdserver: authentication failed, invalid user ID or password").Err()
+ ErrGRPCPermissionDenied = status.New(codes.PermissionDenied, "etcdserver: permission denied").Err()
+ ErrGRPCRoleNotGranted = status.New(codes.FailedPrecondition, "etcdserver: role is not granted to the user").Err()
+ ErrGRPCPermissionNotGranted = status.New(codes.FailedPrecondition, "etcdserver: permission is not granted to the role").Err()
+ ErrGRPCAuthNotEnabled = status.New(codes.FailedPrecondition, "etcdserver: authentication is not enabled").Err()
+ ErrGRPCInvalidAuthToken = status.New(codes.Unauthenticated, "etcdserver: invalid auth token").Err()
+ ErrGRPCInvalidAuthMgmt = status.New(codes.InvalidArgument, "etcdserver: invalid auth management").Err()
- ErrGRPCNoLeader = grpc.Errorf(codes.Unavailable, "etcdserver: no leader")
- ErrGRPCNotLeader = grpc.Errorf(codes.Unavailable, "etcdserver: not leader")
- ErrGRPCNotCapable = grpc.Errorf(codes.Unavailable, "etcdserver: not capable")
- ErrGRPCStopped = grpc.Errorf(codes.Unavailable, "etcdserver: server stopped")
- ErrGRPCTimeout = grpc.Errorf(codes.Unavailable, "etcdserver: request timed out")
- ErrGRPCTimeoutDueToLeaderFail = grpc.Errorf(codes.Unavailable, "etcdserver: request timed out, possibly due to previous leader failure")
- ErrGRPCTimeoutDueToConnectionLost = grpc.Errorf(codes.Unavailable, "etcdserver: request timed out, possibly due to connection lost")
- ErrGRPCUnhealthy = grpc.Errorf(codes.Unavailable, "etcdserver: unhealthy cluster")
- ErrGRPCCorrupt = grpc.Errorf(codes.DataLoss, "etcdserver: corrupt cluster")
+ ErrGRPCNoLeader = status.New(codes.Unavailable, "etcdserver: no leader").Err()
+ ErrGRPCNotLeader = status.New(codes.Unavailable, "etcdserver: not leader").Err()
+ ErrGRPCNotCapable = status.New(codes.Unavailable, "etcdserver: not capable").Err()
+ ErrGRPCStopped = status.New(codes.Unavailable, "etcdserver: server stopped").Err()
+ ErrGRPCTimeout = status.New(codes.Unavailable, "etcdserver: request timed out").Err()
+ ErrGRPCTimeoutDueToLeaderFail = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to previous leader failure").Err()
+ ErrGRPCTimeoutDueToConnectionLost = status.New(codes.Unavailable, "etcdserver: request timed out, possibly due to connection lost").Err()
+ ErrGRPCUnhealthy = status.New(codes.Unavailable, "etcdserver: unhealthy cluster").Err()
+ ErrGRPCCorrupt = status.New(codes.DataLoss, "etcdserver: corrupt cluster").Err()
errStringToError = map[string]error{
- grpc.ErrorDesc(ErrGRPCEmptyKey): ErrGRPCEmptyKey,
- grpc.ErrorDesc(ErrGRPCKeyNotFound): ErrGRPCKeyNotFound,
- grpc.ErrorDesc(ErrGRPCValueProvided): ErrGRPCValueProvided,
- grpc.ErrorDesc(ErrGRPCLeaseProvided): ErrGRPCLeaseProvided,
+ ErrorDesc(ErrGRPCEmptyKey): ErrGRPCEmptyKey,
+ ErrorDesc(ErrGRPCKeyNotFound): ErrGRPCKeyNotFound,
+ ErrorDesc(ErrGRPCValueProvided): ErrGRPCValueProvided,
+ ErrorDesc(ErrGRPCLeaseProvided): ErrGRPCLeaseProvided,
- grpc.ErrorDesc(ErrGRPCTooManyOps): ErrGRPCTooManyOps,
- grpc.ErrorDesc(ErrGRPCDuplicateKey): ErrGRPCDuplicateKey,
- grpc.ErrorDesc(ErrGRPCCompacted): ErrGRPCCompacted,
- grpc.ErrorDesc(ErrGRPCFutureRev): ErrGRPCFutureRev,
- grpc.ErrorDesc(ErrGRPCNoSpace): ErrGRPCNoSpace,
+ ErrorDesc(ErrGRPCTooManyOps): ErrGRPCTooManyOps,
+ ErrorDesc(ErrGRPCDuplicateKey): ErrGRPCDuplicateKey,
+ ErrorDesc(ErrGRPCCompacted): ErrGRPCCompacted,
+ ErrorDesc(ErrGRPCFutureRev): ErrGRPCFutureRev,
+ ErrorDesc(ErrGRPCNoSpace): ErrGRPCNoSpace,
- grpc.ErrorDesc(ErrGRPCLeaseNotFound): ErrGRPCLeaseNotFound,
- grpc.ErrorDesc(ErrGRPCLeaseExist): ErrGRPCLeaseExist,
+ ErrorDesc(ErrGRPCLeaseNotFound): ErrGRPCLeaseNotFound,
+ ErrorDesc(ErrGRPCLeaseExist): ErrGRPCLeaseExist,
- grpc.ErrorDesc(ErrGRPCMemberExist): ErrGRPCMemberExist,
- grpc.ErrorDesc(ErrGRPCPeerURLExist): ErrGRPCPeerURLExist,
- grpc.ErrorDesc(ErrGRPCMemberNotEnoughStarted): ErrGRPCMemberNotEnoughStarted,
- grpc.ErrorDesc(ErrGRPCMemberBadURLs): ErrGRPCMemberBadURLs,
- grpc.ErrorDesc(ErrGRPCMemberNotFound): ErrGRPCMemberNotFound,
+ ErrorDesc(ErrGRPCMemberExist): ErrGRPCMemberExist,
+ ErrorDesc(ErrGRPCPeerURLExist): ErrGRPCPeerURLExist,
+ ErrorDesc(ErrGRPCMemberNotEnoughStarted): ErrGRPCMemberNotEnoughStarted,
+ ErrorDesc(ErrGRPCMemberBadURLs): ErrGRPCMemberBadURLs,
+ ErrorDesc(ErrGRPCMemberNotFound): ErrGRPCMemberNotFound,
- grpc.ErrorDesc(ErrGRPCRequestTooLarge): ErrGRPCRequestTooLarge,
- grpc.ErrorDesc(ErrGRPCRequestTooManyRequests): ErrGRPCRequestTooManyRequests,
+ ErrorDesc(ErrGRPCRequestTooLarge): ErrGRPCRequestTooLarge,
+ ErrorDesc(ErrGRPCRequestTooManyRequests): ErrGRPCRequestTooManyRequests,
- grpc.ErrorDesc(ErrGRPCRootUserNotExist): ErrGRPCRootUserNotExist,
- grpc.ErrorDesc(ErrGRPCRootRoleNotExist): ErrGRPCRootRoleNotExist,
- grpc.ErrorDesc(ErrGRPCUserAlreadyExist): ErrGRPCUserAlreadyExist,
- grpc.ErrorDesc(ErrGRPCUserEmpty): ErrGRPCUserEmpty,
- grpc.ErrorDesc(ErrGRPCUserNotFound): ErrGRPCUserNotFound,
- grpc.ErrorDesc(ErrGRPCRoleAlreadyExist): ErrGRPCRoleAlreadyExist,
- grpc.ErrorDesc(ErrGRPCRoleNotFound): ErrGRPCRoleNotFound,
- grpc.ErrorDesc(ErrGRPCAuthFailed): ErrGRPCAuthFailed,
- grpc.ErrorDesc(ErrGRPCPermissionDenied): ErrGRPCPermissionDenied,
- grpc.ErrorDesc(ErrGRPCRoleNotGranted): ErrGRPCRoleNotGranted,
- grpc.ErrorDesc(ErrGRPCPermissionNotGranted): ErrGRPCPermissionNotGranted,
- grpc.ErrorDesc(ErrGRPCAuthNotEnabled): ErrGRPCAuthNotEnabled,
- grpc.ErrorDesc(ErrGRPCInvalidAuthToken): ErrGRPCInvalidAuthToken,
- grpc.ErrorDesc(ErrGRPCInvalidAuthMgmt): ErrGRPCInvalidAuthMgmt,
+ ErrorDesc(ErrGRPCRootUserNotExist): ErrGRPCRootUserNotExist,
+ ErrorDesc(ErrGRPCRootRoleNotExist): ErrGRPCRootRoleNotExist,
+ ErrorDesc(ErrGRPCUserAlreadyExist): ErrGRPCUserAlreadyExist,
+ ErrorDesc(ErrGRPCUserEmpty): ErrGRPCUserEmpty,
+ ErrorDesc(ErrGRPCUserNotFound): ErrGRPCUserNotFound,
+ ErrorDesc(ErrGRPCRoleAlreadyExist): ErrGRPCRoleAlreadyExist,
+ ErrorDesc(ErrGRPCRoleNotFound): ErrGRPCRoleNotFound,
+ ErrorDesc(ErrGRPCAuthFailed): ErrGRPCAuthFailed,
+ ErrorDesc(ErrGRPCPermissionDenied): ErrGRPCPermissionDenied,
+ ErrorDesc(ErrGRPCRoleNotGranted): ErrGRPCRoleNotGranted,
+ ErrorDesc(ErrGRPCPermissionNotGranted): ErrGRPCPermissionNotGranted,
+ ErrorDesc(ErrGRPCAuthNotEnabled): ErrGRPCAuthNotEnabled,
+ ErrorDesc(ErrGRPCInvalidAuthToken): ErrGRPCInvalidAuthToken,
+ ErrorDesc(ErrGRPCInvalidAuthMgmt): ErrGRPCInvalidAuthMgmt,
- grpc.ErrorDesc(ErrGRPCNoLeader): ErrGRPCNoLeader,
- grpc.ErrorDesc(ErrGRPCNotLeader): ErrGRPCNotLeader,
- grpc.ErrorDesc(ErrGRPCNotCapable): ErrGRPCNotCapable,
- grpc.ErrorDesc(ErrGRPCStopped): ErrGRPCStopped,
- grpc.ErrorDesc(ErrGRPCTimeout): ErrGRPCTimeout,
- grpc.ErrorDesc(ErrGRPCTimeoutDueToLeaderFail): ErrGRPCTimeoutDueToLeaderFail,
- grpc.ErrorDesc(ErrGRPCTimeoutDueToConnectionLost): ErrGRPCTimeoutDueToConnectionLost,
- grpc.ErrorDesc(ErrGRPCUnhealthy): ErrGRPCUnhealthy,
- grpc.ErrorDesc(ErrGRPCCorrupt): ErrGRPCCorrupt,
+ ErrorDesc(ErrGRPCNoLeader): ErrGRPCNoLeader,
+ ErrorDesc(ErrGRPCNotLeader): ErrGRPCNotLeader,
+ ErrorDesc(ErrGRPCNotCapable): ErrGRPCNotCapable,
+ ErrorDesc(ErrGRPCStopped): ErrGRPCStopped,
+ ErrorDesc(ErrGRPCTimeout): ErrGRPCTimeout,
+ ErrorDesc(ErrGRPCTimeoutDueToLeaderFail): ErrGRPCTimeoutDueToLeaderFail,
+ ErrorDesc(ErrGRPCTimeoutDueToConnectionLost): ErrGRPCTimeoutDueToConnectionLost,
+ ErrorDesc(ErrGRPCUnhealthy): ErrGRPCUnhealthy,
+ ErrorDesc(ErrGRPCCorrupt): ErrGRPCCorrupt,
}
+)
- // client-side error
+// client-side error
+var (
ErrEmptyKey = Error(ErrGRPCEmptyKey)
ErrKeyNotFound = Error(ErrGRPCKeyNotFound)
ErrValueProvided = Error(ErrGRPCValueProvided)
@@ -188,9 +190,23 @@ func Error(err error) error {
if err == nil {
return nil
}
- verr, ok := errStringToError[grpc.ErrorDesc(err)]
+ verr, ok := errStringToError[ErrorDesc(err)]
if !ok { // not gRPC error
return err
}
- return EtcdError{code: grpc.Code(verr), desc: grpc.ErrorDesc(verr)}
+ ev, ok := status.FromError(verr)
+ var desc string
+ if ok {
+ desc = ev.Message()
+ } else {
+ desc = verr.Error()
+ }
+ return EtcdError{code: ev.Code(), desc: desc}
+}
+
+func ErrorDesc(err error) string {
+ if s, ok := status.FromError(err); ok {
+ return s.Message()
+ }
+ return err.Error()
}
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error_test.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error_test.go
index b1097c338..e1b396822 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error_test.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes/error_test.go
@@ -17,26 +17,28 @@ package rpctypes
import (
"testing"
- "google.golang.org/grpc"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
)
func TestConvert(t *testing.T) {
- e1 := grpc.Errorf(codes.InvalidArgument, "etcdserver: key is not provided")
+ e1 := status.New(codes.InvalidArgument, "etcdserver: key is not provided").Err()
e2 := ErrGRPCEmptyKey
e3 := ErrEmptyKey
if e1.Error() != e2.Error() {
t.Fatalf("expected %q == %q", e1.Error(), e2.Error())
}
- if grpc.Code(e1) != e3.(EtcdError).Code() {
- t.Fatalf("expected them to be equal, got %v / %v", grpc.Code(e1), e3.(EtcdError).Code())
+ ev1, _ := status.FromError(e1)
+ if ev1.Code() != e3.(EtcdError).Code() {
+ t.Fatalf("expected them to be equal, got %v / %v", ev1.Code(), e3.(EtcdError).Code())
}
if e1.Error() == e3.Error() {
t.Fatalf("expected %q != %q", e1.Error(), e3.Error())
}
- if grpc.Code(e2) != e3.(EtcdError).Code() {
- t.Fatalf("expected them to be equal, got %v / %v", grpc.Code(e2), e3.(EtcdError).Code())
+ ev2, _ := status.FromError(e2)
+ if ev2.Code() != e3.(EtcdError).Code() {
+ t.Fatalf("expected them to be equal, got %v / %v", ev2.Code(), e3.(EtcdError).Code())
}
}
diff --git a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go
index a456307fe..c796c3386 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/api/v3rpc/watch.go
@@ -15,12 +15,11 @@
package v3rpc
import (
+ "context"
"io"
"sync"
"time"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/auth"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
diff --git a/vendor/github.com/coreos/etcd/etcdserver/apply.go b/vendor/github.com/coreos/etcd/etcdserver/apply.go
index 26b17f141..23f21b3ae 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/apply.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/apply.go
@@ -16,6 +16,7 @@ package etcdserver
import (
"bytes"
+ "context"
"sort"
"time"
@@ -24,8 +25,8 @@ import (
"github.com/coreos/etcd/mvcc"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/types"
+
"github.com/gogo/protobuf/proto"
- "golang.org/x/net/context"
)
const (
@@ -423,7 +424,7 @@ func applyCompares(rv mvcc.ReadView, cmps []*pb.Compare) bool {
// applyCompare applies the compare request.
// If the comparison succeeds, it returns true. Otherwise, returns false.
func applyCompare(rv mvcc.ReadView, c *pb.Compare) bool {
- // TOOD: possible optimizations
+ // TODO: possible optimizations
// * chunk reads for large ranges to conserve memory
// * rewrite rules for common patterns:
// ex. "[a, b) createrev > 0" => "limit 1 /\ kvs > 0"
diff --git a/vendor/github.com/coreos/etcd/etcdserver/auth/auth.go b/vendor/github.com/coreos/etcd/etcdserver/auth/auth.go
index 19e96d57c..8991675cc 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/auth/auth.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/auth/auth.go
@@ -16,6 +16,7 @@
package auth
import (
+ "context"
"encoding/json"
"fmt"
"net/http"
@@ -30,8 +31,8 @@ import (
"github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/pkg/capnslog"
+
"golang.org/x/crypto/bcrypt"
- "golang.org/x/net/context"
)
const (
diff --git a/vendor/github.com/coreos/etcd/etcdserver/auth/auth_requests.go b/vendor/github.com/coreos/etcd/etcdserver/auth/auth_requests.go
index eec700acc..2464828e6 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/auth/auth_requests.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/auth/auth_requests.go
@@ -15,13 +15,13 @@
package auth
import (
+ "context"
"encoding/json"
"path"
etcderr "github.com/coreos/etcd/error"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
)
func (s *store) ensureAuthDirectories() error {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/auth/auth_test.go b/vendor/github.com/coreos/etcd/etcdserver/auth/auth_test.go
index 2d81d9246..ad32260de 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/auth/auth_test.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/auth/auth_test.go
@@ -15,6 +15,7 @@
package auth
import (
+ "context"
"reflect"
"testing"
"time"
@@ -23,7 +24,6 @@ import (
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/etcdserverpb"
etcdstore "github.com/coreos/etcd/store"
- "golang.org/x/net/context"
)
type fakeDoer struct{}
diff --git a/vendor/github.com/coreos/etcd/etcdserver/config.go b/vendor/github.com/coreos/etcd/etcdserver/config.go
index 1e3936902..cac4fb010 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/config.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/config.go
@@ -15,14 +15,13 @@
package etcdserver
import (
+ "context"
"fmt"
"path/filepath"
"sort"
"strings"
"time"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/pkg/netutil"
"github.com/coreos/etcd/pkg/transport"
"github.com/coreos/etcd/pkg/types"
diff --git a/vendor/github.com/coreos/etcd/etcdserver/corrupt.go b/vendor/github.com/coreos/etcd/etcdserver/corrupt.go
index b1602de1e..ea6149543 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/corrupt.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/corrupt.go
@@ -15,14 +15,13 @@
package etcdserver
import (
+ "context"
"time"
"github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc"
"github.com/coreos/etcd/pkg/types"
-
- "golang.org/x/net/context"
)
func (s *EtcdServer) monitorKVHash() {
diff --git a/vendor/github.com/coreos/etcd/etcdserver/membership/cluster.go b/vendor/github.com/coreos/etcd/etcdserver/membership/cluster.go
index 2330219f1..565354402 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/membership/cluster.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/membership/cluster.go
@@ -16,6 +16,7 @@ package membership
import (
"bytes"
+ "context"
"crypto/sha1"
"encoding/binary"
"encoding/json"
@@ -26,8 +27,6 @@ import (
"sync"
"time"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/mvcc/backend"
"github.com/coreos/etcd/pkg/netutil"
"github.com/coreos/etcd/pkg/types"
@@ -35,6 +34,7 @@ import (
"github.com/coreos/etcd/raft/raftpb"
"github.com/coreos/etcd/store"
"github.com/coreos/etcd/version"
+
"github.com/coreos/go-semver/semver"
)
diff --git a/vendor/github.com/coreos/etcd/etcdserver/server.go b/vendor/github.com/coreos/etcd/etcdserver/server.go
index ffeaf88cc..20f8a7166 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/server.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/server.go
@@ -15,6 +15,7 @@
package etcdserver
import (
+ "context"
"encoding/json"
"expvar"
"fmt"
@@ -55,9 +56,9 @@ import (
"github.com/coreos/etcd/store"
"github.com/coreos/etcd/version"
"github.com/coreos/etcd/wal"
+
"github.com/coreos/go-semver/semver"
"github.com/coreos/pkg/capnslog"
- "golang.org/x/net/context"
)
const (
diff --git a/vendor/github.com/coreos/etcd/etcdserver/server_test.go b/vendor/github.com/coreos/etcd/etcdserver/server_test.go
index c2bd0045f..e3ea0f925 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/server_test.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/server_test.go
@@ -15,6 +15,7 @@
package etcdserver
import (
+ "context"
"encoding/json"
"fmt"
"io/ioutil"
@@ -44,7 +45,6 @@ import (
"github.com/coreos/etcd/rafthttp"
"github.com/coreos/etcd/snap"
"github.com/coreos/etcd/store"
- "golang.org/x/net/context"
)
// TestDoLocalAction tests requests which do not need to go through raft to be applied,
@@ -741,8 +741,9 @@ func TestDoProposalTimeout(t *testing.T) {
}
srv.applyV2 = &applierV2store{store: srv.store, cluster: srv.cluster}
- ctx, _ := context.WithTimeout(context.Background(), 0)
+ ctx, cancel := context.WithTimeout(context.Background(), 0)
_, err := srv.Do(ctx, pb.Request{Method: "PUT"})
+ cancel()
if err != ErrTimeout {
t.Fatalf("err = %v, want %v", err, ErrTimeout)
}
diff --git a/vendor/github.com/coreos/etcd/etcdserver/v2_server.go b/vendor/github.com/coreos/etcd/etcdserver/v2_server.go
index 6c4aa8baf..4b027f18d 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/v2_server.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/v2_server.go
@@ -15,11 +15,11 @@
package etcdserver
import (
+ "context"
"time"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/store"
- "golang.org/x/net/context"
)
type RequestV2 pb.Request
diff --git a/vendor/github.com/coreos/etcd/etcdserver/v3_server.go b/vendor/github.com/coreos/etcd/etcdserver/v3_server.go
index 6b80468f4..451d3de41 100644
--- a/vendor/github.com/coreos/etcd/etcdserver/v3_server.go
+++ b/vendor/github.com/coreos/etcd/etcdserver/v3_server.go
@@ -16,11 +16,10 @@ package etcdserver
import (
"bytes"
+ "context"
"encoding/binary"
"time"
- "github.com/gogo/protobuf/proto"
-
"github.com/coreos/etcd/auth"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/etcdserver/membership"
@@ -29,7 +28,7 @@ import (
"github.com/coreos/etcd/mvcc"
"github.com/coreos/etcd/raft"
- "golang.org/x/net/context"
+ "github.com/gogo/protobuf/proto"
)
const (
diff --git a/vendor/github.com/coreos/etcd/glide.lock b/vendor/github.com/coreos/etcd/glide.lock
index c7f71d4d9..37a3eb6c5 100644
--- a/vendor/github.com/coreos/etcd/glide.lock
+++ b/vendor/github.com/coreos/etcd/glide.lock
@@ -1,5 +1,5 @@
-hash: b0a745e42cc5c2bfb0d21ee80a9efaf646fbe179aa3561c0bd7a73179d57a3f0
-updated: 2017-08-22T11:01:08.044444615-07:00
+hash: f12c87d509e99534547e948533b8e8a88043c2261c0be08f155a26cd920b5fd4
+updated: 2017-09-11T14:52:48.727295105-07:00
imports:
- name: github.com/beorn7/perks
version: 4c0e84591b9aa9e6dcfdf3e020114cd81f89d5f9
@@ -7,8 +7,6 @@ imports:
- quantile
- name: github.com/bgentry/speakeasy
version: 4aabc24848ce5fd31929f7d1e4ea74d3709c14cd
-- name: github.com/cockroachdb/cmux
- version: 112f0506e7743d64a6eb8fedbcff13d9979bbf92
- name: github.com/coreos/bbolt
version: e1c92081e510bb6b2bbfc93e7e6bd0b6dabd3e12
- name: github.com/coreos/go-semver
@@ -16,7 +14,7 @@ imports:
subpackages:
- semver
- name: github.com/coreos/go-systemd
- version: 48702e0da86bd25e76cfef347e2adeb434a0d0a6
+ version: d2196463941895ee908e13531a23a39feb9e1243
subpackages:
- daemon
- journal
@@ -27,7 +25,7 @@ imports:
- capnslog
- dlopen
- name: github.com/cpuguy83/go-md2man
- version: 23709d0847197db6021a51fdb193e66e9222d4e7
+ version: 1d903dcb749992f3741d744c0f8376b4bd7eb3e1
subpackages:
- md2man
- name: github.com/dgrijalva/jwt-go
@@ -117,7 +115,7 @@ imports:
- bcrypt
- blowfish
- name: golang.org/x/net
- version: c8c74377599bd978aee1cf3b9b63a8634051cec2
+ version: 66aacef3dd8a676686c7ae3716979581e8b03c47
subpackages:
- context
- http2
diff --git a/vendor/github.com/coreos/etcd/glide.yaml b/vendor/github.com/coreos/etcd/glide.yaml
index 7a37090c2..3a935d098 100644
--- a/vendor/github.com/coreos/etcd/glide.yaml
+++ b/vendor/github.com/coreos/etcd/glide.yaml
@@ -6,14 +6,12 @@ import:
version: v0.1.0
- package: github.com/coreos/bbolt
version: v1.3.1-coreos.1
-- package: github.com/cockroachdb/cmux
- version: 112f0506e7743d64a6eb8fedbcff13d9979bbf92
- package: github.com/coreos/go-semver
version: v0.2.0
subpackages:
- semver
- package: github.com/coreos/go-systemd
- version: v14
+ version: v15
subpackages:
- daemon
- journal
@@ -85,7 +83,7 @@ import:
- bcrypt
- blowfish
- package: golang.org/x/net
- version: c8c74377599bd978aee1cf3b9b63a8634051cec2
+ version: 66aacef3dd8a676686c7ae3716979581e8b03c47
subpackages:
- context
- http2
diff --git a/vendor/github.com/coreos/etcd/integration/cluster.go b/vendor/github.com/coreos/etcd/integration/cluster.go
index 01a2aa6ad..ec9a9f493 100644
--- a/vendor/github.com/coreos/etcd/integration/cluster.go
+++ b/vendor/github.com/coreos/etcd/integration/cluster.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"crypto/tls"
"fmt"
"io/ioutil"
@@ -31,10 +32,6 @@ import (
"testing"
"time"
- "github.com/soheilhy/cmux"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
-
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/embed"
@@ -52,7 +49,10 @@ import (
"github.com/coreos/etcd/pkg/transport"
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/rafthttp"
+
"github.com/coreos/pkg/capnslog"
+ "github.com/soheilhy/cmux"
+ "google.golang.org/grpc"
)
const (
@@ -277,10 +277,11 @@ func (c *cluster) addMemberByURL(t *testing.T, clientURL, peerURL string) error
cc := MustNewHTTPClient(t, []string{clientURL}, c.cfg.ClientTLS)
ma := client.NewMembersAPI(cc)
ctx, cancel := context.WithTimeout(context.Background(), requestTimeout)
- if _, err := ma.Add(ctx, peerURL); err != nil {
+ _, err := ma.Add(ctx, peerURL)
+ cancel()
+ if err != nil {
return err
}
- cancel()
// wait for the add node entry applied in the cluster
members := append(c.HTTPMembers(), client.Member{PeerURLs: []string{peerURL}, ClientURLs: []string{}})
diff --git a/vendor/github.com/coreos/etcd/integration/cluster_test.go b/vendor/github.com/coreos/etcd/integration/cluster_test.go
index 14549dac0..e7475abaa 100644
--- a/vendor/github.com/coreos/etcd/integration/cluster_test.go
+++ b/vendor/github.com/coreos/etcd/integration/cluster_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"fmt"
"log"
"math/rand"
@@ -27,9 +28,8 @@ import (
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/pkg/testutil"
- "github.com/coreos/pkg/capnslog"
- "golang.org/x/net/context"
+ "github.com/coreos/pkg/capnslog"
)
func init() {
diff --git a/vendor/github.com/coreos/etcd/integration/member_test.go b/vendor/github.com/coreos/etcd/integration/member_test.go
index 501d91838..539adfec9 100644
--- a/vendor/github.com/coreos/etcd/integration/member_test.go
+++ b/vendor/github.com/coreos/etcd/integration/member_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"fmt"
"io/ioutil"
"os"
@@ -23,7 +24,6 @@ import (
"github.com/coreos/etcd/client"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
func TestPauseMember(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/integration/v3_alarm_test.go b/vendor/github.com/coreos/etcd/integration/v3_alarm_test.go
index 9c735231d..0dbaf6b7f 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_alarm_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_alarm_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"os"
"path/filepath"
"sync"
@@ -26,7 +27,6 @@ import (
"github.com/coreos/etcd/mvcc"
"github.com/coreos/etcd/mvcc/backend"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
// TestV3StorageQuotaApply tests the V3 server respects quotas during apply
diff --git a/vendor/github.com/coreos/etcd/integration/v3_auth_test.go b/vendor/github.com/coreos/etcd/integration/v3_auth_test.go
index 03ea88cd9..5d883d0c6 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_auth_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_auth_test.go
@@ -15,13 +15,12 @@
package integration
import (
+ "context"
"fmt"
"sync"
"testing"
"time"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/auth/authpb"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
diff --git a/vendor/github.com/coreos/etcd/integration/v3_election_test.go b/vendor/github.com/coreos/etcd/integration/v3_election_test.go
index 95f5b4949..341430df5 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_election_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_election_test.go
@@ -15,13 +15,13 @@
package integration
import (
+ "context"
"fmt"
"testing"
"time"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/concurrency"
- "golang.org/x/net/context"
)
// TestElectionWait tests if followers can correctly wait for elections.
diff --git a/vendor/github.com/coreos/etcd/integration/v3_grpc_inflight_test.go b/vendor/github.com/coreos/etcd/integration/v3_grpc_inflight_test.go
index 1994af06d..dd0d180cc 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_grpc_inflight_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_grpc_inflight_test.go
@@ -15,14 +15,15 @@
package integration
import (
+ "context"
"sync"
"testing"
"time"
+ "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
@@ -79,8 +80,10 @@ func TestV3KVInflightRangeRequests(t *testing.T) {
go func() {
defer wg.Done()
_, err := kvc.Range(ctx, &pb.RangeRequest{Key: []byte("foo"), Serializable: true}, grpc.FailFast(false))
- if err != nil && grpc.ErrorDesc(err) != context.Canceled.Error() {
- t.Fatalf("inflight request should be canceld with %v, got %v", context.Canceled, err)
+ if err != nil {
+ if err != nil && rpctypes.ErrorDesc(err) != context.Canceled.Error() {
+ t.Fatalf("inflight request should be canceld with %v, got %v", context.Canceled, err)
+ }
}
}()
}
diff --git a/vendor/github.com/coreos/etcd/integration/v3_grpc_test.go b/vendor/github.com/coreos/etcd/integration/v3_grpc_test.go
index fb131f090..b063124f9 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_grpc_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_grpc_test.go
@@ -16,6 +16,7 @@ package integration
import (
"bytes"
+ "context"
"fmt"
"io/ioutil"
"math/rand"
@@ -30,7 +31,6 @@ import (
"github.com/coreos/etcd/pkg/testutil"
"github.com/coreos/etcd/pkg/transport"
- "golang.org/x/net/context"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
)
@@ -1537,7 +1537,7 @@ func TestTLSGRPCRejectInsecureClient(t *testing.T) {
// nil out TLS field so client will use an insecure connection
clus.Members[0].ClientTLSInfo = nil
client, err := NewClientV3(clus.Members[0])
- if err != nil && err != grpc.ErrClientConnTimeout {
+ if err != nil && err != context.DeadlineExceeded {
t.Fatalf("unexpected error (%v)", err)
} else if client == nil {
// Ideally, no client would be returned. However, grpc will
@@ -1573,7 +1573,7 @@ func TestTLSGRPCRejectSecureClient(t *testing.T) {
client, err := NewClientV3(clus.Members[0])
if client != nil || err == nil {
t.Fatalf("expected no client")
- } else if err != grpc.ErrClientConnTimeout {
+ } else if err != context.DeadlineExceeded {
t.Fatalf("unexpected error (%v)", err)
}
}
@@ -1730,8 +1730,8 @@ func testTLSReload(t *testing.T, cloneFunc func() transport.TLSInfo, replaceFunc
// 5. expect dial time-out when loading expired certs
select {
case gerr := <-errc:
- if gerr != grpc.ErrClientConnTimeout {
- t.Fatalf("expected %v, got %v", grpc.ErrClientConnTimeout, gerr)
+ if gerr != context.DeadlineExceeded {
+ t.Fatalf("expected %v, got %v", context.DeadlineExceeded, gerr)
}
case <-time.After(5 * time.Second):
t.Fatal("failed to receive dial timeout error")
@@ -1778,7 +1778,7 @@ func TestGRPCRequireLeader(t *testing.T) {
md := metadata.Pairs(rpctypes.MetadataRequireLeaderKey, rpctypes.MetadataHasLeader)
ctx := metadata.NewOutgoingContext(context.Background(), md)
reqput := &pb.PutRequest{Key: []byte("foo"), Value: []byte("bar")}
- if _, err := toGRPC(client).KV.Put(ctx, reqput); grpc.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
+ if _, err := toGRPC(client).KV.Put(ctx, reqput); rpctypes.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
t.Errorf("err = %v, want %v", err, rpctypes.ErrNoLeader)
}
}
@@ -1809,7 +1809,7 @@ func TestGRPCStreamRequireLeader(t *testing.T) {
// existing stream should be rejected
_, err = wStream.Recv()
- if grpc.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
+ if rpctypes.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
t.Errorf("err = %v, want %v", err, rpctypes.ErrNoLeader)
}
@@ -1819,7 +1819,7 @@ func TestGRPCStreamRequireLeader(t *testing.T) {
t.Fatalf("wAPI.Watch error: %v", err)
}
_, err = wStream.Recv()
- if grpc.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
+ if rpctypes.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
t.Errorf("err = %v, want %v", err, rpctypes.ErrNoLeader)
}
diff --git a/vendor/github.com/coreos/etcd/integration/v3_lease_test.go b/vendor/github.com/coreos/etcd/integration/v3_lease_test.go
index 7ea873f86..82f9be24f 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_lease_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_lease_test.go
@@ -15,18 +15,17 @@
package integration
import (
+ "context"
"fmt"
"testing"
"time"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
- "google.golang.org/grpc/metadata"
-
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/testutil"
+
+ "google.golang.org/grpc/metadata"
)
// TestV3LeasePrmote ensures the newly elected leader can promote itself
@@ -560,7 +559,7 @@ func TestV3LeaseRequireLeader(t *testing.T) {
if err == nil {
t.Fatalf("got response %+v, expected error", resp)
}
- if grpc.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
+ if rpctypes.ErrorDesc(err) != rpctypes.ErrNoLeader.Error() {
t.Errorf("err = %v, want %v", err, rpctypes.ErrNoLeader)
}
}()
diff --git a/vendor/github.com/coreos/etcd/integration/v3_lock_test.go b/vendor/github.com/coreos/etcd/integration/v3_lock_test.go
index e2f37afe2..889a6ef1f 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_lock_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_lock_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"math/rand"
"sync"
"testing"
@@ -25,7 +26,6 @@ import (
"github.com/coreos/etcd/contrib/recipes"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
func TestMutexSingleNode(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/integration/v3_watch_test.go b/vendor/github.com/coreos/etcd/integration/v3_watch_test.go
index 92fc98ef3..c91f4df65 100644
--- a/vendor/github.com/coreos/etcd/integration/v3_watch_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3_watch_test.go
@@ -16,6 +16,7 @@ package integration
import (
"bytes"
+ "context"
"fmt"
"reflect"
"sort"
@@ -27,7 +28,6 @@ import (
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
// TestV3WatchFromCurrentRevision tests Watch APIs from current revision.
diff --git a/vendor/github.com/coreos/etcd/integration/v3election_grpc_test.go b/vendor/github.com/coreos/etcd/integration/v3election_grpc_test.go
index be320286e..12a0908b7 100644
--- a/vendor/github.com/coreos/etcd/integration/v3election_grpc_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3election_grpc_test.go
@@ -15,6 +15,7 @@
package integration
import (
+ "context"
"fmt"
"testing"
"time"
@@ -22,7 +23,6 @@ import (
epb "github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
// TestV3ElectionCampaign checks that Campaign will not give
diff --git a/vendor/github.com/coreos/etcd/integration/v3lock_grpc_test.go b/vendor/github.com/coreos/etcd/integration/v3lock_grpc_test.go
index a66a8cf46..ccaf0a9cc 100644
--- a/vendor/github.com/coreos/etcd/integration/v3lock_grpc_test.go
+++ b/vendor/github.com/coreos/etcd/integration/v3lock_grpc_test.go
@@ -15,13 +15,13 @@
package integration
import (
+ "context"
"testing"
"time"
lockpb "github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
)
// TestV3LockLockWaiter tests that a client will wait for a lock, then acquire it
diff --git a/vendor/github.com/coreos/etcd/lease/doc.go b/vendor/github.com/coreos/etcd/lease/doc.go
index 73e7d0ec5..a74eaf76f 100644
--- a/vendor/github.com/coreos/etcd/lease/doc.go
+++ b/vendor/github.com/coreos/etcd/lease/doc.go
@@ -12,5 +12,5 @@
// See the License for the specific language governing permissions and
// limitations under the License.
-// Package lease provides an interface and implemetation for time-limited leases over arbitrary resources.
+// Package lease provides an interface and implementation for time-limited leases over arbitrary resources.
package lease
diff --git a/vendor/github.com/coreos/etcd/lease/leasehttp/http_test.go b/vendor/github.com/coreos/etcd/lease/leasehttp/http_test.go
index 413208104..367cd8e64 100644
--- a/vendor/github.com/coreos/etcd/lease/leasehttp/http_test.go
+++ b/vendor/github.com/coreos/etcd/lease/leasehttp/http_test.go
@@ -15,6 +15,7 @@
package leasehttp
import (
+ "context"
"net/http"
"net/http/httptest"
"os"
@@ -24,8 +25,6 @@ import (
"github.com/coreos/etcd/lease"
"github.com/coreos/etcd/mvcc/backend"
-
- "golang.org/x/net/context"
)
func TestRenewHTTP(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/lease/lessor.go b/vendor/github.com/coreos/etcd/lease/lessor.go
index 815e10c0f..29a012416 100644
--- a/vendor/github.com/coreos/etcd/lease/lessor.go
+++ b/vendor/github.com/coreos/etcd/lease/lessor.go
@@ -20,22 +20,18 @@ import (
"math"
"sort"
"sync"
- "sync/atomic"
"time"
"github.com/coreos/etcd/lease/leasepb"
"github.com/coreos/etcd/mvcc/backend"
- "github.com/coreos/etcd/pkg/monotime"
)
-const (
- // NoLease is a special LeaseID representing the absence of a lease.
- NoLease = LeaseID(0)
-
- forever = monotime.Time(math.MaxInt64)
-)
+// NoLease is a special LeaseID representing the absence of a lease.
+const NoLease = LeaseID(0)
var (
+ forever = time.Time{}
+
leaseBucketName = []byte("lease")
// maximum number of leases to revoke per second; configurable for tests
@@ -478,17 +474,16 @@ func (le *lessor) runLoop() {
for {
var ls []*Lease
+ // rate limit
+ revokeLimit := leaseRevokeRate / 2
+
le.mu.Lock()
if le.isPrimary() {
- ls = le.findExpiredLeases()
+ ls = le.findExpiredLeases(revokeLimit)
}
le.mu.Unlock()
if len(ls) != 0 {
- // rate limit
- if len(ls) > leaseRevokeRate/2 {
- ls = ls[:leaseRevokeRate/2]
- }
select {
case <-le.stopC:
return
@@ -508,9 +503,9 @@ func (le *lessor) runLoop() {
}
}
-// findExpiredLeases loops all the leases in the leaseMap and returns the expired
-// leases that needed to be revoked.
-func (le *lessor) findExpiredLeases() []*Lease {
+// findExpiredLeases loops leases in the leaseMap until reaching expired limit
+// and returns the expired leases that needed to be revoked.
+func (le *lessor) findExpiredLeases(limit int) []*Lease {
leases := make([]*Lease, 0, 16)
for _, l := range le.leaseMap {
@@ -518,6 +513,11 @@ func (le *lessor) findExpiredLeases() []*Lease {
// make up committing latency.
if l.expired() {
leases = append(leases, l)
+
+ // reach expired limit
+ if len(leases) == limit {
+ break
+ }
}
}
@@ -560,8 +560,10 @@ func (le *lessor) initAndRecover() {
type Lease struct {
ID LeaseID
ttl int64 // time to live in seconds
- // expiry is time when lease should expire; must be 64-bit aligned.
- expiry monotime.Time
+ // expiryMu protects concurrent accesses to expiry
+ expiryMu sync.RWMutex
+ // expiry is time when lease should expire. no expiration when expiry.IsZero() is true
+ expiry time.Time
// mu protects concurrent accesses to itemSet
mu sync.RWMutex
@@ -594,12 +596,18 @@ func (l *Lease) TTL() int64 {
// refresh refreshes the expiry of the lease.
func (l *Lease) refresh(extend time.Duration) {
- t := monotime.Now().Add(extend + time.Duration(l.ttl)*time.Second)
- atomic.StoreUint64((*uint64)(&l.expiry), uint64(t))
+ newExpiry := time.Now().Add(extend + time.Duration(l.ttl)*time.Second)
+ l.expiryMu.Lock()
+ defer l.expiryMu.Unlock()
+ l.expiry = newExpiry
}
// forever sets the expiry of lease to be forever.
-func (l *Lease) forever() { atomic.StoreUint64((*uint64)(&l.expiry), uint64(forever)) }
+func (l *Lease) forever() {
+ l.expiryMu.Lock()
+ defer l.expiryMu.Unlock()
+ l.expiry = forever
+}
// Keys returns all the keys attached to the lease.
func (l *Lease) Keys() []string {
@@ -614,8 +622,12 @@ func (l *Lease) Keys() []string {
// Remaining returns the remaining time of the lease.
func (l *Lease) Remaining() time.Duration {
- t := monotime.Time(atomic.LoadUint64((*uint64)(&l.expiry)))
- return time.Duration(t - monotime.Now())
+ l.expiryMu.RLock()
+ defer l.expiryMu.RUnlock()
+ if l.expiry.IsZero() {
+ return time.Duration(math.MaxInt64)
+ }
+ return time.Until(l.expiry)
}
type LeaseItem struct {
@@ -649,9 +661,9 @@ func (fl *FakeLessor) Demote() {}
func (fl *FakeLessor) Renew(id LeaseID) (int64, error) { return 10, nil }
-func (le *FakeLessor) Lookup(id LeaseID) *Lease { return nil }
+func (fl *FakeLessor) Lookup(id LeaseID) *Lease { return nil }
-func (le *FakeLessor) Leases() []*Lease { return nil }
+func (fl *FakeLessor) Leases() []*Lease { return nil }
func (fl *FakeLessor) ExpiredLeasesC() <-chan []*Lease { return nil }
diff --git a/vendor/github.com/coreos/etcd/lease/lessor_test.go b/vendor/github.com/coreos/etcd/lease/lessor_test.go
index 4d040a246..6ae807d43 100644
--- a/vendor/github.com/coreos/etcd/lease/lessor_test.go
+++ b/vendor/github.com/coreos/etcd/lease/lessor_test.go
@@ -49,6 +49,10 @@ func TestLessorGrant(t *testing.T) {
if err != nil {
t.Fatalf("could not grant lease 1 (%v)", err)
}
+ if l.ttl != minLeaseTTL {
+ t.Fatalf("ttl = %v, expect minLeaseTTL %v", l.ttl, minLeaseTTL)
+ }
+
gl := le.Lookup(l.ID)
if !reflect.DeepEqual(gl, l) {
diff --git a/vendor/github.com/coreos/etcd/mvcc/index.go b/vendor/github.com/coreos/etcd/mvcc/index.go
index 13a350c19..237dde630 100644
--- a/vendor/github.com/coreos/etcd/mvcc/index.go
+++ b/vendor/github.com/coreos/etcd/mvcc/index.go
@@ -221,16 +221,16 @@ func compactIndex(rev int64, available map[revision]struct{}, emptyki *[]*keyInd
}
}
-func (a *treeIndex) Equal(bi index) bool {
+func (ti *treeIndex) Equal(bi index) bool {
b := bi.(*treeIndex)
- if a.tree.Len() != b.tree.Len() {
+ if ti.tree.Len() != b.tree.Len() {
return false
}
equal := true
- a.tree.Ascend(func(item btree.Item) bool {
+ ti.tree.Ascend(func(item btree.Item) bool {
aki := item.(*keyIndex)
bki := b.tree.Get(item).(*keyIndex)
if !aki.equal(bki) {
diff --git a/vendor/github.com/coreos/etcd/mvcc/kvstore.go b/vendor/github.com/coreos/etcd/mvcc/kvstore.go
index 9d972311a..1a695e3ab 100644
--- a/vendor/github.com/coreos/etcd/mvcc/kvstore.go
+++ b/vendor/github.com/coreos/etcd/mvcc/kvstore.go
@@ -15,6 +15,7 @@
package mvcc
import (
+ "context"
"encoding/binary"
"errors"
"hash/crc32"
@@ -28,7 +29,6 @@ import (
"github.com/coreos/etcd/mvcc/mvccpb"
"github.com/coreos/etcd/pkg/schedule"
"github.com/coreos/pkg/capnslog"
- "golang.org/x/net/context"
)
var (
diff --git a/vendor/github.com/coreos/etcd/pkg/monotime/issue15006.s b/vendor/github.com/coreos/etcd/pkg/monotime/issue15006.s
deleted file mode 100644
index c3132a1f0..000000000
--- a/vendor/github.com/coreos/etcd/pkg/monotime/issue15006.s
+++ /dev/null
@@ -1,6 +0,0 @@
-// Copyright (C) 2016 Arista Networks, Inc.
-// Use of this source code is governed by the Apache License 2.0
-// that can be found in the COPYING file.
-
-// This file is intentionally empty.
-// It's a workaround for https://github.com/golang/go/issues/15006
\ No newline at end of file
diff --git a/vendor/github.com/coreos/etcd/pkg/monotime/monotime.go b/vendor/github.com/coreos/etcd/pkg/monotime/monotime.go
deleted file mode 100644
index a5e16ce1d..000000000
--- a/vendor/github.com/coreos/etcd/pkg/monotime/monotime.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright 2016 The etcd 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 monotime
-
-import (
- "time"
-)
-
-// Time represents a point in monotonic time
-type Time uint64
-
-func (t Time) Add(d time.Duration) Time {
- return Time(uint64(t) + uint64(d.Nanoseconds()))
-}
diff --git a/vendor/github.com/coreos/etcd/pkg/monotime/nanotime.go b/vendor/github.com/coreos/etcd/pkg/monotime/nanotime.go
deleted file mode 100644
index e3fc846ef..000000000
--- a/vendor/github.com/coreos/etcd/pkg/monotime/nanotime.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright (C) 2016 Arista Networks, Inc.
-// Use of this source code is governed by the Apache License 2.0
-// that can be found in the COPYING file.
-
-// Package monotime provides a fast monotonic clock source.
-package monotime
-
-import (
- _ "unsafe" // required to use //go:linkname
-)
-
-//go:noescape
-//go:linkname nanotime runtime.nanotime
-func nanotime() int64
-
-// Now returns the current time in nanoseconds from a monotonic clock.
-// The time returned is based on some arbitrary platform-specific point in the
-// past. The time returned is guaranteed to increase monotonically at a
-// constant rate, unlike time.Now() from the Go standard library, which may
-// slow down, speed up, jump forward or backward, due to NTP activity or leap
-// seconds.
-func Now() Time {
- return Time(nanotime())
-}
diff --git a/vendor/github.com/coreos/etcd/pkg/monotime/nanotime_test.go b/vendor/github.com/coreos/etcd/pkg/monotime/nanotime_test.go
deleted file mode 100644
index c22b328b1..000000000
--- a/vendor/github.com/coreos/etcd/pkg/monotime/nanotime_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (C) 2016 Arista Networks, Inc.
-// Use of this source code is governed by the Apache License 2.0
-
-// Package monotime provides a fast monotonic clock source.
-
-package monotime
-
-import (
- "testing"
-)
-
-func TestNow(t *testing.T) {
- for i := 0; i < 100; i++ {
- t1 := Now()
- t2 := Now()
- // I honestly thought that we needed >= here, but in some environments
- // two consecutive calls can return the same value!
- if t1 > t2 {
- t.Fatalf("t1=%d should have been less than or equal to t2=%d", t1, t2)
- }
- }
-}
diff --git a/vendor/github.com/coreos/etcd/pkg/report/timeseries.go b/vendor/github.com/coreos/etcd/pkg/report/timeseries.go
index ee401eb94..bc1493b2c 100644
--- a/vendor/github.com/coreos/etcd/pkg/report/timeseries.go
+++ b/vendor/github.com/coreos/etcd/pkg/report/timeseries.go
@@ -118,20 +118,20 @@ func (sp *secondPoints) getTimeSeries() TimeSeries {
return tslice
}
-func (ts TimeSeries) String() string {
+func (t TimeSeries) String() string {
buf := new(bytes.Buffer)
wr := csv.NewWriter(buf)
if err := wr.Write([]string{"UNIX-SECOND", "MIN-LATENCY-MS", "AVG-LATENCY-MS", "MAX-LATENCY-MS", "AVG-THROUGHPUT"}); err != nil {
log.Fatal(err)
}
rows := [][]string{}
- for i := range ts {
+ for i := range t {
row := []string{
- fmt.Sprintf("%d", ts[i].Timestamp),
- ts[i].MinLatency.String(),
- ts[i].AvgLatency.String(),
- ts[i].MaxLatency.String(),
- fmt.Sprintf("%d", ts[i].ThroughPut),
+ fmt.Sprintf("%d", t[i].Timestamp),
+ t[i].MinLatency.String(),
+ t[i].AvgLatency.String(),
+ t[i].MaxLatency.String(),
+ fmt.Sprintf("%d", t[i].ThroughPut),
}
rows = append(rows, row)
}
diff --git a/vendor/github.com/coreos/etcd/pkg/schedule/schedule.go b/vendor/github.com/coreos/etcd/pkg/schedule/schedule.go
index bf8528b75..234d01989 100644
--- a/vendor/github.com/coreos/etcd/pkg/schedule/schedule.go
+++ b/vendor/github.com/coreos/etcd/pkg/schedule/schedule.go
@@ -15,9 +15,8 @@
package schedule
import (
+ "context"
"sync"
-
- "golang.org/x/net/context"
)
type Job func(context.Context)
diff --git a/vendor/github.com/coreos/etcd/pkg/schedule/schedule_test.go b/vendor/github.com/coreos/etcd/pkg/schedule/schedule_test.go
index 88c5bf3c9..aa9c709f8 100644
--- a/vendor/github.com/coreos/etcd/pkg/schedule/schedule_test.go
+++ b/vendor/github.com/coreos/etcd/pkg/schedule/schedule_test.go
@@ -15,9 +15,8 @@
package schedule
import (
+ "context"
"testing"
-
- "golang.org/x/net/context"
)
func TestFIFOSchedule(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/auth_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/auth_client_adapter.go
index 7f38a9ac7..33dc91f01 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/auth_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/auth_client_adapter.go
@@ -15,8 +15,10 @@
package adapter
import (
+ "context"
+
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
grpc "google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go
index 3aa01f205..82e341193 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/chan_stream.go
@@ -15,7 +15,7 @@
package adapter
import (
- "golang.org/x/net/context"
+ "context"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go
index 4ddf78e15..6c0340998 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/cluster_client_adapter.go
@@ -15,9 +15,10 @@
package adapter
import (
+ "context"
+
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go
index 383c1b9d8..a2ebf138f 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/election_client_adapter.go
@@ -15,9 +15,10 @@
package adapter
import (
+ "context"
+
"github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go
index fec401d9d..acd5673d0 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/kv_client_adapter.go
@@ -15,8 +15,10 @@
package adapter
import (
+ "context"
+
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
grpc "google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go
index c8c67ce6e..84c48b591 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lease_client_adapter.go
@@ -15,9 +15,10 @@
package adapter
import (
- "golang.org/x/net/context"
+ "context"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
+
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go
index 05e5cb020..9ce7913a3 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/lock_client_adapter.go
@@ -15,9 +15,10 @@
package adapter
import (
+ "context"
+
"github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go
index 66aaabba1..92d9dfd20 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/maintenance_client_adapter.go
@@ -15,9 +15,10 @@
package adapter
import (
+ "context"
+
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go
index af4a13c41..afe61e837 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/adapter/watch_client_adapter.go
@@ -15,10 +15,10 @@
package adapter
import (
+ "context"
"errors"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/auth.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/auth.go
index c1b75e36d..0ed8d246d 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/auth.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/auth.go
@@ -15,7 +15,7 @@
package grpcproxy
import (
- "golang.org/x/net/context"
+ "context"
"github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster.go
index 899fb9be6..6e8d3c85b 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster.go
@@ -15,17 +15,17 @@
package grpcproxy
import (
+ "context"
"fmt"
"os"
"sync"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/clientv3/naming"
+ "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
"golang.org/x/time/rate"
- "google.golang.org/grpc"
gnaming "google.golang.org/grpc/naming"
)
@@ -89,7 +89,7 @@ func (cp *clusterProxy) monitor(wa gnaming.Watcher) {
ups, err := wa.Next()
if err != nil {
plog.Warningf("clusterProxy watcher error (%v)", err)
- if grpc.ErrorDesc(err) == naming.ErrWatcherClosed.Error() {
+ if rpctypes.ErrorDesc(err) == naming.ErrWatcherClosed.Error() {
return
}
}
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster_test.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster_test.go
index e36234c19..f2c0af3f0 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster_test.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/cluster_test.go
@@ -15,6 +15,7 @@
package grpcproxy
import (
+ "context"
"net"
"testing"
"time"
@@ -24,7 +25,6 @@ import (
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/election.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/election.go
index 27115a81d..4b4a4cc42 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/election.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/election.go
@@ -15,7 +15,7 @@
package grpcproxy
import (
- "golang.org/x/net/context"
+ "context"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3election/v3electionpb"
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/health.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/health.go
index e660800e9..9e2c93ca8 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/health.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/health.go
@@ -15,14 +15,13 @@
package grpcproxy
import (
+ "context"
"net/http"
"time"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/etcdhttp"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
-
- "golang.org/x/net/context"
)
// HandleHealth registers health handler on '/health'.
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv.go
index 4e6b03661..1c9860f98 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv.go
@@ -15,11 +15,11 @@
package grpcproxy
import (
+ "context"
+
"github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/proxy/grpcproxy/cache"
-
- "golang.org/x/net/context"
)
type kvProxy struct {
@@ -179,7 +179,9 @@ func RangeRequestToOp(r *pb.RangeRequest) clientv3.Op {
if r.CountOnly {
opts = append(opts, clientv3.WithCountOnly())
}
-
+ if r.KeysOnly {
+ opts = append(opts, clientv3.WithKeysOnly())
+ }
if r.Serializable {
opts = append(opts, clientv3.WithSerializable())
}
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv_test.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv_test.go
index b0fecc37a..33fb597c0 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv_test.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/kv_test.go
@@ -15,6 +15,7 @@
package grpcproxy
import (
+ "context"
"net"
"testing"
"time"
@@ -24,7 +25,6 @@ import (
"github.com/coreos/etcd/integration"
"github.com/coreos/etcd/pkg/testutil"
- "golang.org/x/net/context"
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/leader.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/leader.go
index 86afdb707..042c949b7 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/leader.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/leader.go
@@ -15,14 +15,15 @@
package grpcproxy
import (
+ "context"
"math"
"sync"
- "golang.org/x/net/context"
+ "github.com/coreos/etcd/clientv3"
+ "github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
+
"golang.org/x/time/rate"
"google.golang.org/grpc"
-
- "github.com/coreos/etcd/clientv3"
)
const (
@@ -68,7 +69,7 @@ func (l *leader) recvLoop() {
}
if cresp.Err() != nil {
l.loseLeader()
- if grpc.ErrorDesc(cresp.Err()) == grpc.ErrClientConnClosing.Error() {
+ if rpctypes.ErrorDesc(cresp.Err()) == grpc.ErrClientConnClosing.Error() {
close(l.disconnc)
return
}
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/lease.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/lease.go
index cad013f6f..65f68b0ea 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/lease.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/lease.go
@@ -15,19 +15,18 @@
package grpcproxy
import (
+ "context"
"io"
"sync"
"sync/atomic"
"time"
- "google.golang.org/grpc"
- "google.golang.org/grpc/metadata"
-
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/metadata"
)
type leaseProxy struct {
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/lock.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/lock.go
index 804aff64a..ceef26f0a 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/lock.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/lock.go
@@ -15,7 +15,7 @@
package grpcproxy
import (
- "golang.org/x/net/context"
+ "context"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3lock/v3lockpb"
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go
index b32a573b4..21fe79fa5 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/maintenance.go
@@ -15,10 +15,9 @@
package grpcproxy
import (
+ "context"
"io"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
)
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch.go
index b960c9476..c93cfc38d 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch.go
@@ -15,16 +15,16 @@
package grpcproxy
import (
+ "context"
"sync"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
- "google.golang.org/grpc/metadata"
-
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
+
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/metadata"
)
type watchProxy struct {
diff --git a/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go b/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go
index 5e750bdb0..ce45f8770 100644
--- a/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go
+++ b/vendor/github.com/coreos/etcd/proxy/grpcproxy/watch_broadcast.go
@@ -15,10 +15,9 @@
package grpcproxy
import (
+ "context"
"sync"
- "golang.org/x/net/context"
-
"github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
)
diff --git a/vendor/github.com/coreos/etcd/raft/README.md b/vendor/github.com/coreos/etcd/raft/README.md
index 4702fd80c..fde22b165 100644
--- a/vendor/github.com/coreos/etcd/raft/README.md
+++ b/vendor/github.com/coreos/etcd/raft/README.md
@@ -25,12 +25,12 @@ This raft implementation is a full feature implementation of Raft protocol. Feat
- Membership changes
- Leadership transfer extension
- Efficient linearizable read-only queries served by both the leader and followers
- - leader checks with quorum and bypasses Raft log before processing read-only queries
- - followers asks leader to get a safe read index before processing read-only queries
+ - leader checks with quorum and bypasses Raft log before processing read-only queries
+ - followers asks leader to get a safe read index before processing read-only queries
- More efficient lease-based linearizable read-only queries served by both the leader and followers
- - leader bypasses Raft log and processing read-only queries locally
- - followers asks leader to get a safe read index before processing read-only queries
- - this approach relies on the clock of the all the machines in raft group
+ - leader bypasses Raft log and processing read-only queries locally
+ - followers asks leader to get a safe read index before processing read-only queries
+ - this approach relies on the clock of the all the machines in raft group
This raft implementation also includes a few optional enhancements:
diff --git a/vendor/github.com/coreos/etcd/raft/node.go b/vendor/github.com/coreos/etcd/raft/node.go
index 5da1c1193..ba25b7ddd 100644
--- a/vendor/github.com/coreos/etcd/raft/node.go
+++ b/vendor/github.com/coreos/etcd/raft/node.go
@@ -15,10 +15,10 @@
package raft
import (
+ "context"
"errors"
pb "github.com/coreos/etcd/raft/raftpb"
- "golang.org/x/net/context"
)
type SnapshotStatus int
diff --git a/vendor/github.com/coreos/etcd/raft/node_bench_test.go b/vendor/github.com/coreos/etcd/raft/node_bench_test.go
index 4e60634a2..c3fc89f3f 100644
--- a/vendor/github.com/coreos/etcd/raft/node_bench_test.go
+++ b/vendor/github.com/coreos/etcd/raft/node_bench_test.go
@@ -15,10 +15,9 @@
package raft
import (
+ "context"
"testing"
"time"
-
- "golang.org/x/net/context"
)
func BenchmarkOneNode(b *testing.B) {
diff --git a/vendor/github.com/coreos/etcd/raft/node_test.go b/vendor/github.com/coreos/etcd/raft/node_test.go
index f4c726ea8..4401412e7 100644
--- a/vendor/github.com/coreos/etcd/raft/node_test.go
+++ b/vendor/github.com/coreos/etcd/raft/node_test.go
@@ -16,13 +16,13 @@ package raft
import (
"bytes"
+ "context"
"reflect"
"testing"
"time"
"github.com/coreos/etcd/pkg/testutil"
"github.com/coreos/etcd/raft/raftpb"
- "golang.org/x/net/context"
)
// TestNodeStep ensures that node.Step sends msgProp to propc chan
diff --git a/vendor/github.com/coreos/etcd/raft/raft.go b/vendor/github.com/coreos/etcd/raft/raft.go
index f408a326b..3e9ca2759 100644
--- a/vendor/github.com/coreos/etcd/raft/raft.go
+++ b/vendor/github.com/coreos/etcd/raft/raft.go
@@ -171,6 +171,7 @@ type Config struct {
// If the clock drift is unbounded, leader might keep the lease longer than it
// should (clock can move backward/pause without any bound). ReadIndex is not safe
// in that case.
+ // CheckQuorum MUST be enabled if ReadOnlyOption is ReadOnlyLeaseBased.
ReadOnlyOption ReadOnlyOption
// Logger is the logger used for raft log. For multinode which can host
@@ -213,6 +214,10 @@ func (c *Config) validate() error {
c.Logger = raftLogger
}
+ if c.ReadOnlyOption == ReadOnlyLeaseBased && !c.CheckQuorum {
+ return errors.New("CheckQuorum must be enabled when ReadOnlyOption is ReadOnlyLeaseBased")
+ }
+
return nil
}
@@ -705,7 +710,6 @@ func (r *raft) Step(m pb.Message) error {
case m.Term == 0:
// local message
case m.Term > r.Term:
- lead := m.From
if m.Type == pb.MsgVote || m.Type == pb.MsgPreVote {
force := bytes.Equal(m.Context, []byte(campaignTransfer))
inLease := r.checkQuorum && r.lead != None && r.electionElapsed < r.electionTimeout
@@ -716,7 +720,6 @@ func (r *raft) Step(m pb.Message) error {
r.id, r.raftLog.lastTerm(), r.raftLog.lastIndex(), r.Vote, m.Type, m.From, m.LogTerm, m.Index, r.Term, r.electionTimeout-r.electionElapsed)
return nil
}
- lead = None
}
switch {
case m.Type == pb.MsgPreVote:
@@ -730,7 +733,11 @@ func (r *raft) Step(m pb.Message) error {
default:
r.logger.Infof("%x [term: %d] received a %s message with higher term from %x [term: %d]",
r.id, r.Term, m.Type, m.From, m.Term)
- r.becomeFollower(m.Term, lead)
+ if m.Type == pb.MsgApp || m.Type == pb.MsgHeartbeat || m.Type == pb.MsgSnap {
+ r.becomeFollower(m.Term, m.From)
+ } else {
+ r.becomeFollower(m.Term, None)
+ }
}
case m.Term < r.Term:
@@ -868,10 +875,7 @@ func stepLeader(r *raft, m pb.Message) {
r.readOnly.addRequest(r.raftLog.committed, m)
r.bcastHeartbeatWithCtx(m.Entries[0].Data)
case ReadOnlyLeaseBased:
- var ri uint64
- if r.checkQuorum {
- ri = r.raftLog.committed
- }
+ ri := r.raftLog.committed
if m.From == None || m.From == r.id { // from local member
r.readStates = append(r.readStates, ReadState{Index: r.raftLog.committed, RequestCtx: m.Entries[0].Data})
} else {
diff --git a/vendor/github.com/coreos/etcd/raft/raft_test.go b/vendor/github.com/coreos/etcd/raft/raft_test.go
index 357e9bdf6..efd511f72 100644
--- a/vendor/github.com/coreos/etcd/raft/raft_test.go
+++ b/vendor/github.com/coreos/etcd/raft/raft_test.go
@@ -1361,6 +1361,10 @@ func TestRecvMsgVote(t *testing.T) {
testRecvMsgVote(t, pb.MsgVote)
}
+func TestRecvMsgPreVote(t *testing.T) {
+ testRecvMsgVote(t, pb.MsgPreVote)
+}
+
func testRecvMsgVote(t *testing.T, msgType pb.MessageType) {
tests := []struct {
state StateType
@@ -1751,6 +1755,13 @@ func TestFreeStuckCandidateWithCheckQuorum(t *testing.T) {
if c.Term != a.Term {
t.Errorf("term = %d, want %d", c.Term, a.Term)
}
+
+ // Vote again, should become leader this time
+ nt.send(pb.Message{From: 3, To: 3, Type: pb.MsgHup})
+
+ if c.state != StateLeader {
+ t.Errorf("peer 3 state: %s, want %s", c.state, StateLeader)
+ }
}
func TestNonPromotableVoterWithCheckQuorum(t *testing.T) {
@@ -1898,30 +1909,6 @@ func TestReadOnlyOptionLease(t *testing.T) {
}
}
-func TestReadOnlyOptionLeaseWithoutCheckQuorum(t *testing.T) {
- a := newTestRaft(1, []uint64{1, 2, 3}, 10, 1, NewMemoryStorage())
- b := newTestRaft(2, []uint64{1, 2, 3}, 10, 1, NewMemoryStorage())
- c := newTestRaft(3, []uint64{1, 2, 3}, 10, 1, NewMemoryStorage())
- a.readOnly.option = ReadOnlyLeaseBased
- b.readOnly.option = ReadOnlyLeaseBased
- c.readOnly.option = ReadOnlyLeaseBased
-
- nt := newNetwork(a, b, c)
- nt.send(pb.Message{From: 1, To: 1, Type: pb.MsgHup})
-
- ctx := []byte("ctx1")
- nt.send(pb.Message{From: 2, To: 2, Type: pb.MsgReadIndex, Entries: []pb.Entry{{Data: ctx}}})
-
- rs := b.readStates[0]
- if rs.Index != None {
- t.Errorf("readIndex = %d, want %d", rs.Index, None)
- }
-
- if !bytes.Equal(rs.RequestCtx, ctx) {
- t.Errorf("requestCtx = %v, want %v", rs.RequestCtx, ctx)
- }
-}
-
// TestReadOnlyForNewLeader ensures that a leader only accepts MsgReadIndex message
// when it commits at least one log entry at it term.
func TestReadOnlyForNewLeader(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/raft/rafttest/node.go b/vendor/github.com/coreos/etcd/raft/rafttest/node.go
index a37a16839..0c47bb2f9 100644
--- a/vendor/github.com/coreos/etcd/raft/rafttest/node.go
+++ b/vendor/github.com/coreos/etcd/raft/rafttest/node.go
@@ -15,13 +15,13 @@
package rafttest
import (
+ "context"
"log"
"sync"
"time"
"github.com/coreos/etcd/raft"
"github.com/coreos/etcd/raft/raftpb"
- "golang.org/x/net/context"
)
type node struct {
diff --git a/vendor/github.com/coreos/etcd/raft/rafttest/node_bench_test.go b/vendor/github.com/coreos/etcd/raft/rafttest/node_bench_test.go
index 1aa13c7b6..17cce6767 100644
--- a/vendor/github.com/coreos/etcd/raft/rafttest/node_bench_test.go
+++ b/vendor/github.com/coreos/etcd/raft/rafttest/node_bench_test.go
@@ -15,11 +15,11 @@
package rafttest
import (
+ "context"
"testing"
"time"
"github.com/coreos/etcd/raft"
- "golang.org/x/net/context"
)
func BenchmarkProposal3Nodes(b *testing.B) {
diff --git a/vendor/github.com/coreos/etcd/raft/rafttest/node_test.go b/vendor/github.com/coreos/etcd/raft/rafttest/node_test.go
index c4f98de22..6a81c8b4f 100644
--- a/vendor/github.com/coreos/etcd/raft/rafttest/node_test.go
+++ b/vendor/github.com/coreos/etcd/raft/rafttest/node_test.go
@@ -15,11 +15,11 @@
package rafttest
import (
+ "context"
"testing"
"time"
"github.com/coreos/etcd/raft"
- "golang.org/x/net/context"
)
func TestBasicProgress(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/rafthttp/functional_test.go b/vendor/github.com/coreos/etcd/rafthttp/functional_test.go
index b4f04d3eb..2a04a91cd 100644
--- a/vendor/github.com/coreos/etcd/rafthttp/functional_test.go
+++ b/vendor/github.com/coreos/etcd/rafthttp/functional_test.go
@@ -15,6 +15,7 @@
package rafthttp
import (
+ "context"
"net/http/httptest"
"reflect"
"testing"
@@ -24,7 +25,6 @@ import (
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/raft"
"github.com/coreos/etcd/raft/raftpb"
- "golang.org/x/net/context"
)
func TestSendMessage(t *testing.T) {
diff --git a/vendor/github.com/coreos/etcd/rafthttp/http.go b/vendor/github.com/coreos/etcd/rafthttp/http.go
index 55df26e9b..cc89e171e 100644
--- a/vendor/github.com/coreos/etcd/rafthttp/http.go
+++ b/vendor/github.com/coreos/etcd/rafthttp/http.go
@@ -15,6 +15,7 @@
package rafthttp
import (
+ "context"
"errors"
"fmt"
"io/ioutil"
@@ -27,7 +28,6 @@ import (
"github.com/coreos/etcd/raft/raftpb"
"github.com/coreos/etcd/snap"
"github.com/coreos/etcd/version"
- "golang.org/x/net/context"
)
const (
@@ -91,11 +91,7 @@ func (h *pipelineHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
- if from, err := types.IDFromString(r.Header.Get("X-Server-From")); err != nil {
- if urls := r.Header.Get("X-PeerURLs"); urls != "" {
- h.tr.AddRemote(from, strings.Split(urls, ","))
- }
- }
+ addRemoteFromRequest(h.tr, r)
// Limit the data size that could be read from the request body, which ensures that read from
// connection will not time out accidentally due to possible blocking in underlying implementation.
@@ -176,11 +172,7 @@ func (h *snapshotHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}
- if from, err := types.IDFromString(r.Header.Get("X-Server-From")); err != nil {
- if urls := r.Header.Get("X-PeerURLs"); urls != "" {
- h.tr.AddRemote(from, strings.Split(urls, ","))
- }
- }
+ addRemoteFromRequest(h.tr, r)
dec := &messageDecoder{r: r.Body}
// let snapshots be very large since they can exceed 512MB for large installations
diff --git a/vendor/github.com/coreos/etcd/rafthttp/peer.go b/vendor/github.com/coreos/etcd/rafthttp/peer.go
index b8de635aa..9aee4dbc9 100644
--- a/vendor/github.com/coreos/etcd/rafthttp/peer.go
+++ b/vendor/github.com/coreos/etcd/rafthttp/peer.go
@@ -15,6 +15,7 @@
package rafthttp
import (
+ "context"
"sync"
"time"
@@ -23,7 +24,7 @@ import (
"github.com/coreos/etcd/raft"
"github.com/coreos/etcd/raft/raftpb"
"github.com/coreos/etcd/snap"
- "golang.org/x/net/context"
+
"golang.org/x/time/rate"
)
diff --git a/vendor/github.com/coreos/etcd/rafthttp/transport.go b/vendor/github.com/coreos/etcd/rafthttp/transport.go
index 50219db71..51574ba5e 100644
--- a/vendor/github.com/coreos/etcd/rafthttp/transport.go
+++ b/vendor/github.com/coreos/etcd/rafthttp/transport.go
@@ -15,6 +15,7 @@
package rafthttp
import (
+ "context"
"net/http"
"sync"
"time"
@@ -26,9 +27,9 @@ import (
"github.com/coreos/etcd/raft"
"github.com/coreos/etcd/raft/raftpb"
"github.com/coreos/etcd/snap"
+
"github.com/coreos/pkg/capnslog"
"github.com/xiang90/probing"
- "golang.org/x/net/context"
"golang.org/x/time/rate"
)
@@ -141,7 +142,7 @@ func (t *Transport) Start() error {
t.peers = make(map[types.ID]Peer)
t.prober = probing.NewProber(t.pipelineRt)
- // If client didn't provide dial retry frequence, use the default
+ // If client didn't provide dial retry frequency, use the default
// (100ms backoff between attempts to create a new stream),
// so it doesn't bring too much overhead when retry.
if t.DialRetryFrequency == 0 {
diff --git a/vendor/github.com/coreos/etcd/rafthttp/transport_bench_test.go b/vendor/github.com/coreos/etcd/rafthttp/transport_bench_test.go
index 620e0dbf7..cd586461f 100644
--- a/vendor/github.com/coreos/etcd/rafthttp/transport_bench_test.go
+++ b/vendor/github.com/coreos/etcd/rafthttp/transport_bench_test.go
@@ -15,6 +15,7 @@
package rafthttp
import (
+ "context"
"net/http/httptest"
"sync"
"testing"
@@ -24,7 +25,6 @@ import (
"github.com/coreos/etcd/pkg/types"
"github.com/coreos/etcd/raft"
"github.com/coreos/etcd/raft/raftpb"
- "golang.org/x/net/context"
)
func BenchmarkSendingMsgApp(b *testing.B) {
diff --git a/vendor/github.com/coreos/etcd/rafthttp/util.go b/vendor/github.com/coreos/etcd/rafthttp/util.go
index 12e548c77..6ec3641aa 100644
--- a/vendor/github.com/coreos/etcd/rafthttp/util.go
+++ b/vendor/github.com/coreos/etcd/rafthttp/util.go
@@ -175,3 +175,12 @@ func setPeerURLsHeader(req *http.Request, urls types.URLs) {
}
req.Header.Set("X-PeerURLs", strings.Join(peerURLs, ","))
}
+
+// addRemoteFromRequest adds a remote peer according to an http request header
+func addRemoteFromRequest(tr Transporter, r *http.Request) {
+ if from, err := types.IDFromString(r.Header.Get("X-Server-From")); err == nil {
+ if urls := r.Header.Get("X-PeerURLs"); urls != "" {
+ tr.AddRemote(from, strings.Split(urls, ","))
+ }
+ }
+}
diff --git a/vendor/github.com/coreos/etcd/scripts/build-aci b/vendor/github.com/coreos/etcd/scripts/build-aci
index 7a4cff93b..60f7c4cb3 100755
--- a/vendor/github.com/coreos/etcd/scripts/build-aci
+++ b/vendor/github.com/coreos/etcd/scripts/build-aci
@@ -18,12 +18,12 @@ go2aci() {
esac
}
-if ! command -v $ACBUILD >/dev/null; then
+if ! command -v "${ACBUILD}" >/dev/null; then
echo "acbuild ($ACBUILD) is not executable"
exit 1
fi
-if [ ! -x $BINARYDIR/etcd ] ; then
+if [ ! -x "${BINARYDIR}"/etcd ] ; then
echo "$BINARYDIR/etcd not found. Is it compiled?"
exit 1
fi
@@ -36,7 +36,7 @@ fi
acbuild --debug begin
TMPHOSTS="$(mktemp)"
-ACI_ARCH="$(go2aci ${GOARCH})"
+ACI_ARCH=$(go2aci "${GOARCH}")
acbuildEnd() {
rm "$TMPHOSTS"
@@ -45,15 +45,15 @@ acbuildEnd() {
}
trap acbuildEnd EXIT
-cat < $TMPHOSTS
+cat < "$TMPHOSTS"
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
DF
acbuild --debug set-name coreos.com/etcd
acbuild --debug annotation add appc.io/executor/supports-systemd-notify true
-acbuild --debug copy $BINARYDIR/etcd /usr/local/bin/etcd
-acbuild --debug copy $BINARYDIR/etcdctl /usr/local/bin/etcdctl
+acbuild --debug copy "${BINARYDIR}"/etcd /usr/local/bin/etcd
+acbuild --debug copy "${BINARYDIR}"/etcdctl /usr/local/bin/etcdctl
acbuild --debug copy README.md README.md
acbuild --debug copy etcdctl/README.md README-etcdctl.md
@@ -81,4 +81,4 @@ mkdir -p .acbuild/currentaci/rootfs/var/lib/etcd
ln -s ./usr/local/bin/etcd .acbuild/currentaci/rootfs/etcd
ln -s ./usr/local/bin/etcdctl .acbuild/currentaci/rootfs/etcdctl
-acbuild --debug write --overwrite $BUILDDIR/etcd-${1}-linux-${ACI_ARCH}.aci
+acbuild --debug write --overwrite "${BUILDDIR}/etcd-${1}-linux-${ACI_ARCH}.aci"
diff --git a/vendor/github.com/coreos/etcd/scripts/build-binary b/vendor/github.com/coreos/etcd/scripts/build-binary
index 3b4b763de..6780b1511 100755
--- a/vendor/github.com/coreos/etcd/scripts/build-binary
+++ b/vendor/github.com/coreos/etcd/scripts/build-binary
@@ -16,15 +16,15 @@ function setup_env {
local proj=${1}
local ver=${2}
- if [ ! -d ${proj} ]; then
- git clone https://github.com/coreos/${proj}
+ if [ ! -d "${proj}" ]; then
+ git clone https://github.com/coreos/"${proj}"
fi
- pushd ${proj} >/dev/null
+ pushd "${proj}" >/dev/null
git checkout master
git fetch --all
git reset --hard origin/master
- git checkout $ver
+ git checkout "${ver}"
popd >/dev/null
}
@@ -34,28 +34,28 @@ function package {
local srcdir="${2}/bin"
local ccdir="${srcdir}/${GOOS}_${GOARCH}"
- if [ -d ${ccdir} ]; then
- srcdir=${ccdir}
+ if [ -d "${ccdir}" ]; then
+ srcdir="${ccdir}"
fi
local ext=""
- if [ ${GOOS} == "windows" ]; then
+ if [ "${GOOS}" == "windows" ]; then
ext=".exe"
fi
for bin in etcd etcdctl; do
- cp ${srcdir}/${bin} ${target}/${bin}${ext}
+ cp "${srcdir}/${bin}" "${target}/${bin}${ext}"
done
- cp etcd/README.md ${target}/README.md
- cp etcd/etcdctl/README.md ${target}/README-etcdctl.md
- cp etcd/etcdctl/READMEv2.md ${target}/READMEv2-etcdctl.md
+ cp etcd/README.md "${target}"/README.md
+ cp etcd/etcdctl/README.md "${target}"/README-etcdctl.md
+ cp etcd/etcdctl/READMEv2.md "${target}"/READMEv2-etcdctl.md
- cp -R etcd/Documentation ${target}/Documentation
+ cp -R etcd/Documentation "${target}"/Documentation
}
function main {
mkdir release
cd release
- setup_env ${PROJ} ${VER}
+ setup_env "${PROJ}" "${VER}"
for os in darwin windows linux; do
export GOOS=${os}
@@ -74,14 +74,14 @@ function main {
popd >/dev/null
TARGET="etcd-${VER}-${GOOS}-${GOARCH}"
- mkdir ${TARGET}
- package ${TARGET} ${PROJ}
+ mkdir "${TARGET}"
+ package "${TARGET}" "${PROJ}"
if [ ${GOOS} == "linux" ]; then
- tar cfz ${TARGET}.tar.gz ${TARGET}
+ tar cfz "${TARGET}.tar.gz" "${TARGET}"
echo "Wrote release/${TARGET}.tar.gz"
else
- zip -qr ${TARGET}.zip ${TARGET}
+ zip -qr "${TARGET}.zip" "${TARGET}"
echo "Wrote release/${TARGET}.zip"
fi
done
diff --git a/vendor/github.com/coreos/etcd/scripts/build-docker b/vendor/github.com/coreos/etcd/scripts/build-docker
index b7aea2bc2..5d74b355e 100755
--- a/vendor/github.com/coreos/etcd/scripts/build-docker
+++ b/vendor/github.com/coreos/etcd/scripts/build-docker
@@ -10,21 +10,21 @@ fi
VERSION=${1}
ARCH=$(go env GOARCH)
DOCKERFILE="Dockerfile-release"
-: ${TAG:="quay.io/coreos/etcd"}
+if [ -z "$TAG" ]; then TAG="quay.io/coreos/etcd"; fi
-if [ -z ${BINARYDIR} ]; then
- RELEASE="etcd-${1}"-`go env GOOS`-`go env GOARCH`
+if [ -z "${BINARYDIR}" ]; then
+ RELEASE="etcd-${1}"-$(go env GOOS)-$(go env GOARCH)
BINARYDIR="${RELEASE}"
TARFILE="${RELEASE}.tar.gz"
TARURL="https://github.com/coreos/etcd/releases/download/${1}/${TARFILE}"
- if ! curl -f -L -o ${TARFILE} ${TARURL} ; then
+ if ! curl -f -L -o "${TARFILE}" "${TARURL}" ; then
echo "Failed to download ${TARURL}."
exit 1
fi
- tar -zvxf ${TARFILE}
+ tar -zvxf "${TARFILE}"
fi
-if [ ${ARCH} != "amd64" ]; then
+if [ "${ARCH}" != "amd64" ]; then
DOCKERFILE+=".${ARCH}"
VERSION+="-${ARCH}"
fi
@@ -34,10 +34,10 @@ BUILDDIR=${BUILDDIR:-.}
IMAGEDIR=${BUILDDIR}/image-docker
-mkdir -p ${IMAGEDIR}/var/etcd
-mkdir -p ${IMAGEDIR}/var/lib/etcd
-cp ${BINARYDIR}/etcd ${BINARYDIR}/etcdctl ${IMAGEDIR}
+mkdir -p "${IMAGEDIR}"/var/etcd
+mkdir -p "${IMAGEDIR}"/var/lib/etcd
+cp "${BINARYDIR}"/etcd "${BINARYDIR}"/etcdctl "${IMAGEDIR}"
-cat ./${DOCKERFILE} > ${IMAGEDIR}/Dockerfile
+cat ./"${DOCKERFILE}" > "${IMAGEDIR}"/Dockerfile
-docker build -t ${TAG}:${VERSION} ${IMAGEDIR}
+docker build -t "${TAG}:${VERSION}" "${IMAGEDIR}"
diff --git a/vendor/github.com/coreos/etcd/scripts/genproto.sh b/vendor/github.com/coreos/etcd/scripts/genproto.sh
index 15aebd417..e7f36715e 100755
--- a/vendor/github.com/coreos/etcd/scripts/genproto.sh
+++ b/vendor/github.com/coreos/etcd/scripts/genproto.sh
@@ -5,12 +5,12 @@
#
set -e
-if ! [[ "$0" =~ "scripts/genproto.sh" ]]; then
+if ! [[ "$0" =~ scripts/genproto.sh ]]; then
echo "must be run from repository root"
exit 255
fi
-if ! [[ $(protoc --version) =~ "3.3.0" ]]; then
+if [[ $(protoc --version | cut -f2 -d' ') != "3.3.0" ]]; then
echo "could not find protoc 3.3.0, is it installed + in PATH?"
exit 255
fi
@@ -57,16 +57,16 @@ pushd "${GRPC_GATEWAY_ROOT}"
popd
for dir in ${DIRS}; do
- pushd ${dir}
- protoc --gofast_out=plugins=grpc,import_prefix=github.com/coreos/:. -I=".:${GOGOPROTO_PATH}:${COREOS_ROOT}:${GRPC_GATEWAY_ROOT}/third_party/googleapis" *.proto
- sed -i.bak -E "s/github\.com\/coreos\/(gogoproto|github\.com|golang\.org|google\.golang\.org)/\1/g" *.pb.go
- sed -i.bak -E 's/github\.com\/coreos\/(errors|fmt|io)/\1/g' *.pb.go
- sed -i.bak -E 's/import _ \"gogoproto\"//g' *.pb.go
- sed -i.bak -E 's/import fmt \"fmt\"//g' *.pb.go
- sed -i.bak -E 's/import _ \"github\.com\/coreos\/google\/api\"//g' *.pb.go
- sed -i.bak -E 's/import _ \"google\.golang\.org\/genproto\/googleapis\/api\/annotations\"//g' *.pb.go
- rm -f *.bak
- goimports -w *.pb.go
+ pushd "${dir}"
+ protoc --gofast_out=plugins=grpc,import_prefix=github.com/coreos/:. -I=".:${GOGOPROTO_PATH}:${COREOS_ROOT}:${GRPC_GATEWAY_ROOT}/third_party/googleapis" ./*.proto
+ sed -i.bak -E "s/github\.com\/coreos\/(gogoproto|github\.com|golang\.org|google\.golang\.org)/\1/g" ./*.pb.go
+ sed -i.bak -E 's/github\.com\/coreos\/(errors|fmt|io)/\1/g' ./*.pb.go
+ sed -i.bak -E 's/import _ \"gogoproto\"//g' ./*.pb.go
+ sed -i.bak -E 's/import fmt \"fmt\"//g' ./*.pb.go
+ sed -i.bak -E 's/import _ \"github\.com\/coreos\/google\/api\"//g' ./*.pb.go
+ sed -i.bak -E 's/import _ \"google\.golang\.org\/genproto\/googleapis\/api\/annotations\"//g' ./*.pb.go
+ rm -f ./*.bak
+ goimports -w ./*.pb.go
popd
done
@@ -75,15 +75,15 @@ rm -rf Documentation/dev-guide/apispec/swagger/*json
for pb in etcdserverpb/rpc api/v3lock/v3lockpb/v3lock api/v3election/v3electionpb/v3election; do
protobase="etcdserver/${pb}"
protoc -I. \
- -I${GRPC_GATEWAY_ROOT}/third_party/googleapis \
- -I${GOGOPROTO_PATH} \
- -I${COREOS_ROOT} \
+ -I"${GRPC_GATEWAY_ROOT}"/third_party/googleapis \
+ -I"${GOGOPROTO_PATH}" \
+ -I"${COREOS_ROOT}" \
--grpc-gateway_out=logtostderr=true:. \
--swagger_out=logtostderr=true:./Documentation/dev-guide/apispec/swagger/. \
${protobase}.proto
# hack to move gw files around so client won't include them
- pkgpath=`dirname ${protobase}`
- pkg=`basename ${pkgpath}`
+ pkgpath=$(dirname "${protobase}")
+ pkg=$(basename "${pkgpath}")
gwfile="${protobase}.pb.gw.go"
sed -i.bak -E "s/package $pkg/package gw/g" ${gwfile}
sed -i.bak -E "s/protoReq /&$pkg\./g" ${gwfile}
@@ -93,13 +93,13 @@ for pb in etcdserverpb/rpc api/v3lock/v3lockpb/v3lock api/v3election/v3electionp
sed -i.bak -E "s/New[A-Za-z]*Client/${pkg}.&/" ${gwfile}
# darwin doesn't like newlines in sed...
sed -i.bak -E "s|import \(|& \"github.com/coreos/etcd/${pkgpath}\"|" ${gwfile}
- mkdir -p ${pkgpath}/gw/
+ mkdir -p "${pkgpath}"/gw/
go fmt ${gwfile}
- mv ${gwfile} ${pkgpath}/gw/
+ mv ${gwfile} "${pkgpath}/gw/"
rm -f ./etcdserver/${pb}*.bak
- swaggerName=`basename ${pb}`
+ swaggerName=$(basename ${pb})
mv Documentation/dev-guide/apispec/swagger/etcdserver/${pb}.swagger.json \
- Documentation/dev-guide/apispec/swagger/${swaggerName}.swagger.json
+ Documentation/dev-guide/apispec/swagger/"${swaggerName}".swagger.json
done
rm -rf Documentation/dev-guide/apispec/swagger/etcdserver/
diff --git a/vendor/github.com/coreos/etcd/scripts/install-marker.sh b/vendor/github.com/coreos/etcd/scripts/install-marker.sh
index 0cca4017d..467492666 100755
--- a/vendor/github.com/coreos/etcd/scripts/install-marker.sh
+++ b/vendor/github.com/coreos/etcd/scripts/install-marker.sh
@@ -15,7 +15,7 @@ if [ ${ARCH} == "darwin" ]; then
fi
echo "Installing marker"
-curl -L ${MARKER_URL} -o ${GOPATH}/bin/marker
-chmod 755 ${GOPATH}/bin/marker
+curl -L "${MARKER_URL}" -o "${GOPATH}"/bin/marker
+chmod 755 "${GOPATH}"/bin/marker
-${GOPATH}/bin/marker --version
+"${GOPATH}"/bin/marker --version
diff --git a/vendor/github.com/coreos/etcd/scripts/release.sh b/vendor/github.com/coreos/etcd/scripts/release.sh
index 1c846694c..0310586a0 100755
--- a/vendor/github.com/coreos/etcd/scripts/release.sh
+++ b/vendor/github.com/coreos/etcd/scripts/release.sh
@@ -23,18 +23,18 @@ fi
ETCD_ROOT=$(dirname "${BASH_SOURCE[0]}")/..
-pushd ${ETCD_ROOT} >/dev/null
+pushd "${ETCD_ROOT}" >/dev/null
echo Building etcd binary...
- ./scripts/build-binary ${VERSION}
+ ./scripts/build-binary "${VERSION}"
# ppc64le not yet supported by acbuild.
for TARGET_ARCH in "amd64" "arm64"; do
echo Building ${TARGET_ARCH} aci image...
- GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-aci ${VERSION}
+ GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-aci "${VERSION}"
done
for TARGET_ARCH in "amd64" "arm64" "ppc64le"; do
echo Building ${TARGET_ARCH} docker image...
- GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-docker ${VERSION}
+ GOARCH=${TARGET_ARCH} BINARYDIR=release/etcd-${VERSION}-linux-${TARGET_ARCH} BUILDDIR=release ./scripts/build-docker "${VERSION}"
done
popd >/dev/null
diff --git a/vendor/github.com/coreos/etcd/scripts/updatebom.sh b/vendor/github.com/coreos/etcd/scripts/updatebom.sh
index 08f59f280..3c821973f 100755
--- a/vendor/github.com/coreos/etcd/scripts/updatebom.sh
+++ b/vendor/github.com/coreos/etcd/scripts/updatebom.sh
@@ -2,7 +2,7 @@
set -e
-if ! [[ "$0" =~ "scripts/updatebom.sh" ]]; then
+if ! [[ "$0" =~ scripts/updatebom.sh ]]; then
echo "must be run from repository root"
exit 255
fi
@@ -16,7 +16,7 @@ mkdir ./gopath
mv ./cmd/vendor ./gopath/src
echo "generating bill-of-materials.json"
-GOPATH=`pwd`/gopath license-bill-of-materials \
+GOPATH=$(pwd)/gopath license-bill-of-materials \
--override-file ./bill-of-materials.override.json \
github.com/coreos/etcd github.com/coreos/etcd/etcdctl > bill-of-materials.json
diff --git a/vendor/github.com/coreos/etcd/scripts/updatedep.sh b/vendor/github.com/coreos/etcd/scripts/updatedep.sh
index 651aa3cd4..9fb9ee841 100755
--- a/vendor/github.com/coreos/etcd/scripts/updatedep.sh
+++ b/vendor/github.com/coreos/etcd/scripts/updatedep.sh
@@ -14,7 +14,7 @@
# ./scripts/updatedep.sh github.com/USER/PROJECT#9b772b54b3bf0be1eec083c9669766a56332559a
# 2. make sure glide.yaml and glide.lock are updated
-if ! [[ "$0" =~ "scripts/updatedep.sh" ]]; then
+if ! [[ "$0" =~ scripts/updatedep.sh ]]; then
echo "must be run from repository root"
exit 255
fi
@@ -44,13 +44,13 @@ popd
if [ -n "$1" ]; then
echo "glide get on $1"
- matches=`grep "name: $1" glide.lock`
+ matches=$(grep "name: $1" glide.lock)
if [ ! -z "$matches" ]; then
echo "glide update on $1"
- glide update --strip-vendor $1
+ glide update --strip-vendor "$1"
else
echo "glide get on $1"
- glide get --strip-vendor $1
+ glide get --strip-vendor "$1"
fi
else
echo "glide update on *"
diff --git a/vendor/github.com/coreos/etcd/store/metrics.go b/vendor/github.com/coreos/etcd/store/metrics.go
index 08cd4f030..077c0fa23 100644
--- a/vendor/github.com/coreos/etcd/store/metrics.go
+++ b/vendor/github.com/coreos/etcd/store/metrics.go
@@ -87,7 +87,7 @@ const (
func init() {
if prometheus.Register(readCounter) != nil {
- // Tests will try to double register sicne the tests use both
+ // Tests will try to double register since the tests use both
// store and store_test packages; ignore second attempts.
return
}
diff --git a/vendor/github.com/coreos/etcd/test b/vendor/github.com/coreos/etcd/test
index 6e60ced3c..a0470057c 100755
--- a/vendor/github.com/coreos/etcd/test
+++ b/vendor/github.com/coreos/etcd/test
@@ -38,13 +38,13 @@ IGNORE_PKGS="(cmd/|etcdserverpb|rafttest|gopath.proto|v3lockpb|v3electionpb)"
INTEGRATION_PKGS="(integration|e2e|contrib|functional-tester)"
# all github.com/coreos/etcd/whatever pkgs that are not auto-generated / tools
-PKGS=`find . -name \*.go | while read a; do dirname $a; done | sort | uniq | egrep -v "$IGNORE_PKGS" | egrep -v "(tools/|contrib/|e2e|pb)" | sed "s|\.|${REPO_PATH}|g" | xargs echo`
+PKGS=$(find . -name \*.go | while read -r a; do dirname "$a"; done | sort | uniq | grep -vE "$IGNORE_PKGS" | grep -vE "(tools/|contrib/|e2e|pb)" | sed "s|\.|${REPO_PATH}|g" | xargs echo)
# pkg1,pkg2,pkg3
PKGS_COMMA=${PKGS// /,}
-TEST_PKGS=`find . -name \*_test.go | while read a; do dirname $a; done | sort | uniq | egrep -v "$IGNORE_PKGS" | sed "s|\./||g"`
-FORMATTABLE=`find . -name \*.go | while read a; do echo "$(dirname $a)/*.go"; done | sort | uniq | egrep -v "$IGNORE_PKGS" | sed "s|\./||g"`
-TESTABLE_AND_FORMATTABLE=`echo "$TEST_PKGS" | egrep -v "$INTEGRATION_PKGS"`
+TEST_PKGS=$(find . -name \*_test.go | while read -r a; do dirname "$a"; done | sort | uniq | grep -vE "$IGNORE_PKGS" | sed "s|\./||g")
+FORMATTABLE=$(find . -name \*.go | while read -r a; do echo "$(dirname "$a")/*.go"; done | sort | uniq | grep -vE "$IGNORE_PKGS" | sed "s|\./||g")
+TESTABLE_AND_FORMATTABLE=$(echo "$TEST_PKGS" | grep -vE "$INTEGRATION_PKGS")
# check if user provided PKG override
if [ -z "${USERPKG}" ]; then
@@ -58,21 +58,23 @@ else
# only run gofmt on packages provided by user
FMT="$TEST"
fi
+FMT=($FMT)
# prepend REPO_PATH to each local package
split=$TEST
TEST=""
for a in $split; do TEST="$TEST ${REPO_PATH}/${a}"; done
+TEST=($TEST)
# TODO: 'client' pkg fails with gosimple from generated files
# TODO: 'rafttest' is failing with unused
-STATIC_ANALYSIS_PATHS=`find . -name \*.go | while read a; do dirname $a; done | sort | uniq | egrep -v "$IGNORE_PKGS" | grep -v 'client'`
+STATIC_ANALYSIS_PATHS=$(find . -name \*.go | while read -r a; do dirname "$a"; done | sort | uniq | grep -vE "$IGNORE_PKGS" | grep -v 'client')
+STATIC_ANALYSIS_PATHS=($STATIC_ANALYSIS_PATHS)
if [ -z "$GOARCH" ]; then
GOARCH=$(go env GOARCH);
fi
-
# determine whether target supports race detection
if [ "$GOARCH" == "amd64" ]; then
RACE="--race"
@@ -81,21 +83,21 @@ fi
function unit_pass {
echo "Running unit tests..."
# only -run=Test so examples can run in integration tests
- go test -timeout 3m ${COVER} ${RACE} -cpu 1,2,4 -run=Test $@ ${TEST}
+ go test -timeout 3m "${COVER}" ${RACE} -cpu 1,2,4 -run=Test "$@" "${TEST[@]}"
}
function integration_pass {
echo "Running integration tests..."
- go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration
- integration_extra $@
+ go test -timeout 15m -v -cpu 1,2,4 "$@" "${REPO_PATH}/integration"
+ integration_extra "$@"
}
function integration_extra {
- go test -timeout 1m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/client/integration
- go test -timeout 15m -v ${RACE} -cpu 1,2,4 $@ ${REPO_PATH}/clientv3/integration
- go test -timeout 1m -v -cpu 1,2,4 $@ ${REPO_PATH}/contrib/raftexample
- go test -timeout 1m -v ${RACE} -cpu 1,2,4 -run=Example $@ ${TEST}
- go test -timeout 5m -v ${RACE} -tags v2v3 $@ ${REPO_PATH}/store
+ go test -timeout 1m -v ${RACE} -cpu 1,2,4 "$@" "${REPO_PATH}/client/integration"
+ go test -timeout 15m -v ${RACE} -cpu 1,2,4 "$@" "${REPO_PATH}/clientv3/integration"
+ go test -timeout 1m -v -cpu 1,2,4 "$@" "${REPO_PATH}/contrib/raftexample"
+ go test -timeout 5m -v ${RACE} -tags v2v3 "$@" "${REPO_PATH}/store"
+ go test -timeout 1m -v ${RACE} -cpu 1,2,4 -run=Example "$@" "${TEST[@]}"
}
function functional_pass {
@@ -125,8 +127,9 @@ function functional_pass {
echo "ETCD_TESTER_EXIT_CODE:" ${ETCD_TESTER_EXIT_CODE}
echo "Waiting for processes to exit"
- kill -s TERM ${agent_pids}
- for a in ${agent_pids}; do wait $a || true; done
+ agent_pids=($agent_pids)
+ kill -s TERM "${agent_pids[@]}"
+ for a in "${agent_pids[@]}"; do wait "$a" || true; done
rm -rf ./agent-*
if [[ "${ETCD_TESTER_EXIT_CODE}" -ne "0" ]]; then
@@ -157,38 +160,39 @@ function cov_pass {
mkdir -p "$COVERDIR"
# run code coverage for unit and integration tests
- GOCOVFLAGS="-covermode=set -coverpkg $PKGS_COMMA -v -timeout 15m"
+ GOCOVFLAGS="-covermode=set -coverpkg ${PKGS_COMMA} -v -timeout 15m"
+ GOCOVFLAGS=($GOCOVFLAGS)
failed=""
- for t in `echo "${TEST_PKGS}" | egrep -v "(e2e|functional-tester)"`; do
- tf=`echo $t | tr / _`
+ for t in $(echo "${TEST_PKGS}" | grep -vE "(e2e|functional-tester)"); do
+ tf=$(echo "$t" | tr / _)
# cache package compilation data for faster repeated builds
- go test $GOCOVFLAGS -i ${REPO_PATH}/$t || true
+ go test "${GOCOVFLAGS[@]}" -i "${REPO_PATH}/$t" || true
# uses -run=Test to skip examples because clientv3/ example tests will leak goroutines
- go test $GOCOVFLAGS -run=Test -coverprofile "$COVERDIR/${tf}.coverprofile" ${REPO_PATH}/$t || failed="$failed $t"
+ go test "${GOCOVFLAGS[@]}" -run=Test -coverprofile "$COVERDIR/${tf}.coverprofile" "${REPO_PATH}/$t" || failed="$failed $t"
done
# v2v3 tests
- go test -tags v2v3 $GOCOVFLAGS -coverprofile "$COVERDIR/store-v2v3.coverprofile" ${REPO_PATH}/clientv3/integration || failed="$failed store-v2v3"
+ go test -tags v2v3 "${GOCOVFLAGS[@]}" -coverprofile "$COVERDIR/store-v2v3.coverprofile" "${REPO_PATH}/clientv3/integration" || failed="$failed store-v2v3"
# proxy tests
- go test -tags cluster_proxy $GOCOVFLAGS -coverprofile "$COVERDIR/proxy_integration.coverprofile" ${REPO_PATH}/integration || failed="$failed proxy-integration"
- go test -tags cluster_proxy $GOCOVFLAGS -coverprofile "$COVERDIR/proxy_clientv3.coverprofile" ${REPO_PATH}/clientv3/integration || failed="$failed proxy-clientv3/integration"
+ go test -tags cluster_proxy "${GOCOVFLAGS[@]}" -coverprofile "$COVERDIR/proxy_integration.coverprofile" "${REPO_PATH}/integration" || failed="$failed proxy-integration"
+ go test -tags cluster_proxy "${GOCOVFLAGS[@]}" -coverprofile "$COVERDIR/proxy_clientv3.coverprofile" "${REPO_PATH}/clientv3/integration" || failed="$failed proxy-clientv3/integration"
# run code coverage for e2e tests
# use 30m timeout because e2e coverage takes longer
# due to many tests cause etcd process to wait
# on leadership transfer timeout during gracefully shutdown
echo Testing e2e without proxy...
- go test -tags cov -timeout 30m -v ${REPO_PATH}"/e2e" || failed="$failed e2e"
+ go test -tags cov -timeout 30m -v "${REPO_PATH}/e2e" || failed="$failed e2e"
echo Testing e2e with proxy...
- go test -tags "cov cluster_proxy" -timeout 30m -v ${REPO_PATH}"/e2e" || failed="$failed e2e-proxy"
+ go test -tags "cov cluster_proxy" -timeout 30m -v "${REPO_PATH}/e2e" || failed="$failed e2e-proxy"
# incrementally merge to get coverage data even if some coverage files are corrupted
# optimistically assume etcdserver package's coverage file is OK since gocovmerge
# expects to start with a non-empty file
cp "$COVERDIR"/etcdserver.coverprofile "$COVERDIR"/cover.out
for f in "$COVERDIR"/*.coverprofile; do
- gocovmerge $f "$COVERDIR"/cover.out >"$COVERDIR"/cover.tmp || failed="$failed $f"
+ gocovmerge "$f" "$COVERDIR"/cover.out >"$COVERDIR"/cover.tmp || failed="$failed $f"
if [ -s "$COVERDIR"/cover.tmp ]; then
mv "$COVERDIR"/cover.tmp "$COVERDIR"/cover.out
fi
@@ -199,7 +203,7 @@ function cov_pass {
# held failures to generate the full coverage file, now fail
if [ -n "$failed" ]; then
for f in $failed; do
- echo FAIL $f
+ echo FAIL "$f"
done
exit 255
fi
@@ -207,25 +211,25 @@ function cov_pass {
function e2e_pass {
echo "Running e2e tests..."
- go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/e2e
+ go test -timeout 15m -v -cpu 1,2,4 "$@" "${REPO_PATH}/e2e"
}
function integration_e2e_pass {
echo "Running integration and e2e tests..."
- go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/e2e &
+ go test -timeout 15m -v -cpu 1,2,4 "$@" "${REPO_PATH}/e2e" &
e2epid="$!"
- go test -timeout 15m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration &
+ go test -timeout 15m -v -cpu 1,2,4 "$@" "${REPO_PATH}/integration" &
intpid="$!"
wait $e2epid
wait $intpid
- integration_extra $@
+ integration_extra "$@"
}
function grpcproxy_pass {
- go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 1,2,4 $@ ${REPO_PATH}/integration
- go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 1,2,4 $@ ${REPO_PATH}/clientv3/integration
- go test -timeout 15m -v -tags cluster_proxy $@ ${REPO_PATH}/e2e
+ go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 1,2,4 "$@" "${REPO_PATH}/integration"
+ go test -timeout 20m -v ${RACE} -tags cluster_proxy -cpu 1,2,4 "$@" "${REPO_PATH}/clientv3/integration"
+ go test -timeout 15m -v -tags cluster_proxy "$@" "${REPO_PATH}/e2e"
}
function release_pass {
@@ -245,7 +249,7 @@ function release_pass {
echo "Downloading $file"
set +e
- curl --fail -L https://github.com/coreos/etcd/releases/download/$UPGRADE_VER/$file -o /tmp/$file
+ curl --fail -L "https://github.com/coreos/etcd/releases/download/$UPGRADE_VER/$file" -o "/tmp/$file"
local result=$?
set -e
case $result in
@@ -255,7 +259,7 @@ function release_pass {
;;
esac
- tar xzvf /tmp/$file -C /tmp/ --strip-components=1
+ tar xzvf "/tmp/$file" -C /tmp/ --strip-components=1
mkdir -p ./bin
mv /tmp/etcd ./bin/etcd-last-release
}
@@ -264,22 +268,23 @@ function fmt_pass {
toggle_failpoints disable
echo "Checking gofmt..."
- fmtRes=$(gofmt -l -s -d $FMT)
+ fmtRes=$(gofmt -l -s -d "${FMT[@]}")
if [ -n "${fmtRes}" ]; then
echo -e "gofmt checking failed:\n${fmtRes}"
exit 255
fi
echo "Checking govet..."
- vetRes=$(go vet $TEST)
+ vetRes=$(go vet "${TEST[@]}")
if [ -n "${vetRes}" ]; then
echo -e "govet checking failed:\n${vetRes}"
exit 255
fi
echo "Checking 'go tool vet -all -shadow'..."
- fmtpkgs=$(for a in $FMT; do dirname "$a"; done | sort | uniq | grep -v "\\.")
- vetRes=$(go tool vet -all -shadow ${fmtpkgs} 2>&1 | grep -v '/gw/' || true)
+ fmtpkgs=$(for a in "${FMT[@]}"; do dirname "$a"; done | sort | uniq | grep -v "\\.")
+ fmtpkgs=($fmtpkgs)
+ vetRes=$(go tool vet -all -shadow "${fmtpkgs[@]}" 2>&1 | grep -v '/gw/' || true)
if [ -n "${vetRes}" ]; then
echo -e "govet -all -shadow checking failed:\n${vetRes}"
exit 255
@@ -289,21 +294,14 @@ function fmt_pass {
echo "Checking shellcheck..."
shellcheckResult=$(shellcheck -fgcc build test scripts/* 2>&1 || true)
if [ -n "${shellcheckResult}" ]; then
- # mask the most common ones; fix later
- SHELLCHECK_MASK="SC(2086|2006|2068|2196|2035|2162|2076)"
- errs=$(echo "${shellcheckResult}" | egrep -v "${SHELLCHECK_MASK}" || true)
- if [ -n "${errs}" ]; then
- echo -e "shellcheck checking failed:\n${shellcheckResult}\n===\nFailed:\n${errs}"
- exit 255
- fi
- suppressed=$(echo "${shellcheckResult}" | cut -f4- -d':' | sort | uniq -c | sort -n)
- echo -e "shellcheck suppressed warnings:\n${suppressed}"
+ echo -e "shellcheck checking failed:\n${shellcheckResult}"
+ exit 255
fi
fi
echo "Checking documentation style..."
# eschew you
- yous=`find . -name \*.md -exec egrep --color "[Yy]ou[r]?[ '.,;]" {} + | grep -v /v2/ || true`
+ yous=$(find . -name \*.md -exec grep -E --color "[Yy]ou[r]?[ '.,;]" {} + | grep -v /v2/ || true)
if [ ! -z "$yous" ]; then
echo -e "found 'you' in documentation:\n${yous}"
exit 255
@@ -312,7 +310,7 @@ function fmt_pass {
# TODO: check other markdown files when marker handles headers with '[]'
if which marker >/dev/null; then
echo "Checking marker to find broken links..."
- markerResult=`marker --skip-http --root ./Documentation 2>&1 || true`
+ markerResult=$(marker --skip-http --root ./Documentation 2>&1 || true)
if [ -n "${markerResult}" ]; then
echo -e "marker checking failed:\n${markerResult}"
exit 255
@@ -324,11 +322,19 @@ function fmt_pass {
if which goword >/dev/null; then
echo "Checking goword..."
# get all go files to process
- gofiles=`find $FMT -iname '*.go' 2>/dev/null`
+ gofiles=$(find "${FMT[@]}" -iname '*.go' 2>/dev/null)
+ gofiles_all=($gofiles)
# ignore tests and protobuf files
- gofiles=`echo ${gofiles} | sort | uniq | sed "s/ /\n/g" | egrep -v "(\\_test.go|\\.pb\\.go)"`
+ gofiles=$(echo "${gofiles_all[@]}" | sort | uniq | sed "s/ /\n/g" | grep -vE "(\\_test.go|\\.pb\\.go)")
+ gofiles=($gofiles)
# only check for broken exported godocs
- gowordRes=`goword -use-spell=false ${gofiles} | grep godoc-export | sort`
+ gowordRes=$(goword -use-spell=false "${gofiles[@]}" | grep godoc-export | sort)
+ if [ ! -z "$gowordRes" ]; then
+ echo -e "goword checking failed:\n${gowordRes}"
+ exit 255
+ fi
+ # check some spelling
+ gowordRes=$(goword -ignore-file=.words clientv3/{*,*/*}.go 2>&1 | grep spell | sort)
if [ ! -z "$gowordRes" ]; then
echo -e "goword checking failed:\n${gowordRes}"
exit 255
@@ -339,16 +345,10 @@ function fmt_pass {
if which gosimple >/dev/null; then
echo "Checking gosimple..."
- gosimpleResult=`gosimple ${STATIC_ANALYSIS_PATHS} 2>&1 || true`
+ gosimpleResult=$(gosimple "${STATIC_ANALYSIS_PATHS[@]}" 2>&1 || true)
if [ -n "${gosimpleResult}" ]; then
- # TODO: resolve these after go1.8 migration
- SIMPLE_CHECK_MASK="S(1024)"
- if echo "${gosimpleResult}" | egrep -v "$SIMPLE_CHECK_MASK"; then
- echo -e "gosimple checking failed:\n${gosimpleResult}"
- exit 255
- else
- echo -e "gosimple warning:\n${gosimpleResult}"
- fi
+ echo -e "gosimple checking failed:\n${gosimpleResult}"
+ exit 255
fi
else
echo "Skipping gosimple..."
@@ -356,7 +356,7 @@ function fmt_pass {
if which unused >/dev/null; then
echo "Checking unused..."
- unusedResult=`unused ${STATIC_ANALYSIS_PATHS} 2>&1 || true`
+ unusedResult=$(unused "${STATIC_ANALYSIS_PATHS[@]}" 2>&1 || true)
if [ -n "${unusedResult}" ]; then
echo -e "unused checking failed:\n${unusedResult}"
exit 255
@@ -367,16 +367,16 @@ function fmt_pass {
if which staticcheck >/dev/null; then
echo "Checking staticcheck..."
- staticcheckResult=`staticcheck ${STATIC_ANALYSIS_PATHS} 2>&1 || true`
+ staticcheckResult=$(staticcheck "${STATIC_ANALYSIS_PATHS[@]}" 2>&1 || true)
if [ -n "${staticcheckResult}" ]; then
# TODO: resolve these after go1.8 migration
# See https://github.com/dominikh/go-tools/tree/master/cmd/staticcheck
- STATIC_CHECK_MASK="SA(1019|2002)"
- if echo "${staticcheckResult}" | egrep -v "$STATIC_CHECK_MASK"; then
+ STATIC_CHECK_MASK="SA(1012|1019|2002)"
+ if echo "${staticcheckResult}" | grep -vE "$STATIC_CHECK_MASK"; then
echo -e "staticcheck checking failed:\n${staticcheckResult}"
exit 255
else
- suppressed=`echo "${staticcheckResult}" | sed 's/ /\n/g' | grep "(SA" | sort | uniq -c`
+ suppressed=$(echo "${staticcheckResult}" | sed 's/ /\n/g' | grep "(SA" | sort | uniq -c)
echo -e "staticcheck suppressed warnings:\n${suppressed}"
fi
fi
@@ -397,9 +397,22 @@ function fmt_pass {
exit 255
fi
+ echo "Checking receiver names..."
+ recvs=$(grep 'func ([^*]' {*,*/*,*/*/*}.go | grep -Ev "(generated|pb/)" | tr ':' ' ' | \
+ awk ' { print $2" "$3" "$4" "$1 }' | sed "s/[a-zA-Z\.]*go//g" | sort | uniq | \
+ grep -Ev "(Descriptor|Proto|_)" | awk ' { print $3" "$4 } ' | sort | uniq -c | grep -v ' 1 ' | awk ' { print $2 } ')
+ if [ -n "${recvs}" ]; then
+ recvs=($recvs)
+ for recv in "${recvs[@]}"; do
+ echo "Mismatched receiver for $recv..."
+ grep "$recv" "${FMT[@]}" | grep 'func ('
+ done
+ exit 255
+ fi
+
echo "Checking commit titles..."
- git log --oneline "$(git merge-base HEAD master)"...HEAD | while read l; do
- commitMsg=`echo "$l" | cut -f2- -d' '`
+ git log --oneline "$(git merge-base HEAD master)"...HEAD | while read -r l; do
+ commitMsg=$(echo "$l" | cut -f2- -d' ')
if [[ "$commitMsg" == Merge* ]]; then
# ignore "Merge pull" commits
continue
@@ -409,10 +422,10 @@ function fmt_pass {
continue
fi
- pkgPrefix=`echo "$commitMsg" | cut -f1 -d':'`
- spaceCommas=`echo "$commitMsg" | sed 's/ /\n/g' | grep -c ',$' || echo 0`
- commaSpaces=`echo "$commitMsg" | sed 's/,/\n/g' | grep -c '^ ' || echo 0`
- if [[ `echo $commitMsg | grep -c ":..*"` == 0 || "$commitMsg" == "$pkgPrefix" || "$spaceCommas" != "$commaSpaces" ]]; then
+ pkgPrefix=$(echo "$commitMsg" | cut -f1 -d':')
+ spaceCommas=$(echo "$commitMsg" | sed 's/ /\n/g' | grep -c ',$' || echo 0)
+ commaSpaces=$(echo "$commitMsg" | sed 's/,/\n/g' | grep -c '^ ' || echo 0)
+ if [[ $(echo "$commitMsg" | grep -c ":..*") == 0 || "$commitMsg" == "$pkgPrefix" || "$spaceCommas" != "$commaSpaces" ]]; then
echo "$l"...
echo "Expected commit title format '{\", \"}: '"
echo "Got: $l"
@@ -441,7 +454,7 @@ function dep_pass {
# don't pull in etcdserver package
pushd clientv3 >/dev/null
badpkg="(etcdserver$|mvcc$|backend$|grpc-gateway)"
- deps=`go list -f '{{ .Deps }}' | sed 's/ /\n/g' | egrep "${badpkg}" || echo ""`
+ deps=$(go list -f '{{ .Deps }}' | sed 's/ /\n/g' | grep -E "${badpkg}" || echo "")
popd >/dev/null
if [ ! -z "$deps" ]; then
echo -e "clientv3 has masked dependencies:\n${deps}"
@@ -452,8 +465,8 @@ function dep_pass {
function build_cov_pass {
out="bin"
if [ -n "${BINDIR}" ]; then out="${BINDIR}"; fi
- go test -tags cov -c -covermode=set -coverpkg=$PKGS_COMMA -o ${out}/etcd_test
- go test -tags cov -c -covermode=set -coverpkg=$PKGS_COMMA -o ${out}/etcdctl_test ${REPO_PATH}/etcdctl
+ go test -tags cov -c -covermode=set -coverpkg="$PKGS_COMMA" -o "${out}/etcd_test"
+ go test -tags cov -c -covermode=set -coverpkg="$PKGS_COMMA" -o "${out}/etcdctl_test" "${REPO_PATH}/etcdctl"
}
function compile_pass {
@@ -468,7 +481,7 @@ function build_pass {
for pass in $PASSES; do
echo "Starting '$pass' pass at $(date)"
- ${pass}_pass $@
+ "${pass}"_pass "$@"
echo "Finished '$pass' pass at $(date)"
done
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/lease.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/lease.go
index 8743ed27e..85bbb161d 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/lease.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/lease.go
@@ -15,6 +15,7 @@
package cmd
import (
+ "context"
"fmt"
"time"
@@ -22,7 +23,6 @@ import (
"github.com/coreos/etcd/pkg/report"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
"gopkg.in/cheggaaa/pb.v1"
)
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/put.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/put.go
index 760c032eb..ff4373e2d 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/put.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/put.go
@@ -15,6 +15,7 @@
package cmd
import (
+ "context"
"encoding/binary"
"fmt"
"math"
@@ -26,7 +27,6 @@ import (
"github.com/coreos/etcd/pkg/report"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
"golang.org/x/time/rate"
"gopkg.in/cheggaaa/pb.v1"
)
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/range.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/range.go
index 1a83d221f..465dad6e5 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/range.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/range.go
@@ -15,6 +15,7 @@
package cmd
import (
+ "context"
"fmt"
"math"
"os"
@@ -24,7 +25,6 @@ import (
"github.com/coreos/etcd/pkg/report"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
"golang.org/x/time/rate"
"gopkg.in/cheggaaa/pb.v1"
)
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/stm.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/stm.go
index 5d0f6cc69..0312056e1 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/stm.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/stm.go
@@ -15,6 +15,7 @@
package cmd
import (
+ "context"
"encoding/binary"
"fmt"
"math"
@@ -28,7 +29,6 @@ import (
"github.com/coreos/etcd/pkg/report"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
"golang.org/x/time/rate"
"gopkg.in/cheggaaa/pb.v1"
)
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/txn_put.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/txn_put.go
index c6a6c07fa..1626411f7 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/txn_put.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/txn_put.go
@@ -15,6 +15,7 @@
package cmd
import (
+ "context"
"encoding/binary"
"fmt"
"math"
@@ -25,7 +26,6 @@ import (
"github.com/coreos/etcd/pkg/report"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
"golang.org/x/time/rate"
"gopkg.in/cheggaaa/pb.v1"
)
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/util.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/util.go
index a8a8b4708..c93fdbed5 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/util.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/util.go
@@ -15,15 +15,15 @@
package cmd
import (
+ "context"
"crypto/rand"
"fmt"
- "log"
"os"
"strings"
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/pkg/report"
- "golang.org/x/net/context"
+ "google.golang.org/grpc/grpclog"
)
var (
@@ -98,7 +98,7 @@ func mustCreateConn() *clientv3.Client {
return mustCreateConn()
}
- clientv3.SetLogger(log.New(os.Stderr, "grpc", 0))
+ clientv3.SetLogger(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr))
if err != nil {
fmt.Fprintf(os.Stderr, "dial error: %v\n", err)
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_get.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_get.go
index 3eb4a1be2..bb6ee64c8 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_get.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_get.go
@@ -15,6 +15,7 @@
package cmd
import (
+ "context"
"fmt"
"sync"
"time"
@@ -23,7 +24,6 @@ import (
"github.com/coreos/etcd/pkg/report"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
"gopkg.in/cheggaaa/pb.v1"
)
diff --git a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_latency.go b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_latency.go
index 3a070d260..f00d29fb1 100644
--- a/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_latency.go
+++ b/vendor/github.com/coreos/etcd/tools/benchmark/cmd/watch_latency.go
@@ -15,6 +15,7 @@
package cmd
import (
+ "context"
"fmt"
"os"
"sync"
@@ -24,7 +25,6 @@ import (
"github.com/coreos/etcd/pkg/report"
"github.com/spf13/cobra"
- "golang.org/x/net/context"
"golang.org/x/time/rate"
"gopkg.in/cheggaaa/pb.v1"
)
@@ -33,8 +33,8 @@ import (
var watchLatencyCmd = &cobra.Command{
Use: "watch-latency",
Short: "Benchmark watch latency",
- Long: `Benchmarks the latency for watches by measuring
- the latency between writing to a key and receiving the
+ Long: `Benchmarks the latency for watches by measuring
+ the latency between writing to a key and receiving the
associated watch response.`,
Run: watchLatencyFunc,
}
diff --git a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-runner/command/lease_renewer_command.go b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-runner/command/lease_renewer_command.go
index 1e95958ce..2df7c1c17 100644
--- a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-runner/command/lease_renewer_command.go
+++ b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-runner/command/lease_renewer_command.go
@@ -24,8 +24,8 @@ import (
"github.com/coreos/etcd/clientv3"
"github.com/spf13/cobra"
- "google.golang.org/grpc"
"google.golang.org/grpc/codes"
+ "google.golang.org/grpc/status"
)
var (
@@ -68,7 +68,8 @@ func runLeaseRenewerFunc(cmd *cobra.Command, args []string) {
for {
lk, err = c.Lease.KeepAliveOnce(ctx, l.ID)
- if grpc.Code(err) == codes.NotFound {
+ ev, _ := status.FromError(err)
+ if ev.Code() == codes.NotFound {
if time.Since(expire) < 0 {
log.Fatalf("bad renew! exceeded: %v", time.Since(expire))
for {
diff --git a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/checks.go b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/checks.go
index f3c5de9b4..81a659ac2 100644
--- a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/checks.go
+++ b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/checks.go
@@ -15,15 +15,15 @@
package main
import (
+ "context"
"fmt"
"time"
- "google.golang.org/grpc"
-
"github.com/coreos/etcd/clientv3"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
+ "google.golang.org/grpc"
)
const (
diff --git a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/cluster.go b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/cluster.go
index 61f36f0c9..5f6e001a6 100644
--- a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/cluster.go
+++ b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/cluster.go
@@ -15,16 +15,16 @@
package main
import (
+ "context"
"fmt"
"math/rand"
"net"
"strings"
"time"
- "golang.org/x/net/context"
-
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/tools/functional-tester/etcd-agent/client"
+
"google.golang.org/grpc"
)
diff --git a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/key_stresser.go b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/key_stresser.go
index 1e351b7e1..3b29fb199 100644
--- a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/key_stresser.go
+++ b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/key_stresser.go
@@ -15,20 +15,20 @@
package main
import (
+ "context"
"fmt"
"math/rand"
"sync"
"sync/atomic"
"time"
- "golang.org/x/net/context" // grpc does a comparison on context.Cancel; can't use "context" package
- "golang.org/x/time/rate"
- "google.golang.org/grpc"
- "google.golang.org/grpc/transport"
-
"github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
+
+ "golang.org/x/time/rate"
+ "google.golang.org/grpc"
+ "google.golang.org/grpc/transport"
)
type keyStresser struct {
@@ -106,7 +106,7 @@ func (s *keyStresser) run(ctx context.Context) {
continue
}
- switch grpc.ErrorDesc(err) {
+ switch rpctypes.ErrorDesc(err) {
case context.DeadlineExceeded.Error():
// This retries when request is triggered at the same time as
// leader failure. When we terminate the leader, the request to
diff --git a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/lease_stresser.go b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/lease_stresser.go
index 0767ccc2b..ea15fd7a7 100644
--- a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/lease_stresser.go
+++ b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/lease_stresser.go
@@ -15,16 +15,16 @@
package main
import (
+ "context"
"fmt"
"math/rand"
"sync"
"sync/atomic"
-
"time"
"github.com/coreos/etcd/etcdserver/api/v3rpc/rpctypes"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
- "golang.org/x/net/context"
+
"golang.org/x/time/rate"
"google.golang.org/grpc"
)
@@ -290,6 +290,7 @@ func (ls *leaseStresser) keepLeaseAlive(leaseID int64) {
cancel()
ctx, cancel = context.WithCancel(ls.ctx)
stream, err = ls.lc.LeaseKeepAlive(ctx)
+ cancel()
continue
}
err = stream.Send(&pb.LeaseKeepAliveRequest{ID: leaseID})
diff --git a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/member.go b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/member.go
index 7954e534c..64aa5ca12 100644
--- a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/member.go
+++ b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/member.go
@@ -15,17 +15,17 @@
package main
import (
+ "context"
"fmt"
"net"
"net/url"
"time"
- "golang.org/x/net/context"
- "google.golang.org/grpc"
-
"github.com/coreos/etcd/clientv3"
pb "github.com/coreos/etcd/etcdserver/etcdserverpb"
"github.com/coreos/etcd/tools/functional-tester/etcd-agent/client"
+
+ "google.golang.org/grpc"
)
type member struct {
diff --git a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/stresser.go b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/stresser.go
index 30e8d47d7..4c5cdcef6 100644
--- a/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/stresser.go
+++ b/vendor/github.com/coreos/etcd/tools/functional-tester/etcd-tester/stresser.go
@@ -16,6 +16,7 @@ package main
import (
"fmt"
+ "os"
"strings"
"sync"
"time"
@@ -24,7 +25,7 @@ import (
"google.golang.org/grpc/grpclog"
)
-func init() { grpclog.SetLogger(plog) }
+func init() { grpclog.SetLoggerV2(grpclog.NewLoggerV2(os.Stderr, os.Stderr, os.Stderr)) }
type Stresser interface {
// Stress starts to stress the etcd cluster
diff --git a/vendor/github.com/coreos/etcd/wal/decoder.go b/vendor/github.com/coreos/etcd/wal/decoder.go
index 0d9b4428c..97d87d378 100644
--- a/vendor/github.com/coreos/etcd/wal/decoder.go
+++ b/vendor/github.com/coreos/etcd/wal/decoder.go
@@ -29,6 +29,9 @@ import (
const minSectorSize = 512
+// frameSizeBytes is frame size in bytes, including record size and padding size.
+const frameSizeBytes = 8
+
type decoder struct {
mu sync.Mutex
brs []*bufio.Reader
@@ -104,7 +107,7 @@ func (d *decoder) decodeRecord(rec *walpb.Record) error {
}
}
// record decoded as valid; point last valid offset to end of record
- d.lastValidOff += recBytes + padBytes + 8
+ d.lastValidOff += frameSizeBytes + recBytes + padBytes
return nil
}
@@ -126,7 +129,7 @@ func (d *decoder) isTornEntry(data []byte) bool {
return false
}
- fileOff := d.lastValidOff + 8
+ fileOff := d.lastValidOff + frameSizeBytes
curOff := 0
chunks := [][]byte{}
// split data on sector boundaries
diff --git a/vendor/github.com/coreos/etcd/wal/wal.go b/vendor/github.com/coreos/etcd/wal/wal.go
index 8f1141166..96d01a23a 100644
--- a/vendor/github.com/coreos/etcd/wal/wal.go
+++ b/vendor/github.com/coreos/etcd/wal/wal.go
@@ -455,6 +455,7 @@ func (w *WAL) cut() error {
return err
}
+ // reopen newTail with its new path so calls to Name() match the wal filename format
newTail.Close()
if newTail, err = fileutil.LockFile(fpath, os.O_WRONLY, fileutil.PrivateFileMode); err != nil {
@@ -502,6 +503,10 @@ func (w *WAL) ReleaseLockTo(index uint64) error {
w.mu.Lock()
defer w.mu.Unlock()
+ if len(w.locks) == 0 {
+ return nil
+ }
+
var smaller int
found := false
@@ -519,7 +524,7 @@ func (w *WAL) ReleaseLockTo(index uint64) error {
// if no lock index is greater than the release index, we can
// release lock up to the last one(excluding).
- if !found && len(w.locks) != 0 {
+ if !found {
smaller = len(w.locks) - 1
}
diff --git a/vendor/github.com/coreos/etcd/wal/wal_test.go b/vendor/github.com/coreos/etcd/wal/wal_test.go
index 4528e2297..71fd7c177 100644
--- a/vendor/github.com/coreos/etcd/wal/wal_test.go
+++ b/vendor/github.com/coreos/etcd/wal/wal_test.go
@@ -554,6 +554,13 @@ func TestReleaseLockTo(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+
+ // release nothing if no files
+ err = w.ReleaseLockTo(10)
+ if err != nil {
+ t.Errorf("err = %v, want nil", err)
+ }
+
// make 10 separate files
for i := 0; i < 10; i++ {
es := []raftpb.Entry{{Index: uint64(i)}}
diff --git a/vendor/github.com/coreos/go-semver/semver/semver.go b/vendor/github.com/coreos/go-semver/semver/semver.go
index 76cf4852c..110fc23e1 100644
--- a/vendor/github.com/coreos/go-semver/semver/semver.go
+++ b/vendor/github.com/coreos/go-semver/semver/semver.go
@@ -19,7 +19,6 @@ import (
"bytes"
"errors"
"fmt"
- "regexp"
"strconv"
"strings"
)
@@ -77,14 +76,6 @@ func (v *Version) Set(version string) error {
return fmt.Errorf("%s is not in dotted-tri format", version)
}
- if err := validateIdentifier(string(preRelease)); err != nil {
- return fmt.Errorf("failed to validate pre-release: %v", err)
- }
-
- if err := validateIdentifier(metadata); err != nil {
- return fmt.Errorf("failed to validate metadata: %v", err)
- }
-
parsed := make([]int64, 3, 3)
for i, v := range dotParts[:3] {
@@ -233,13 +224,6 @@ func recursivePreReleaseCompare(versionA []string, versionB []string) int {
bInt = true
}
- // Numeric identifiers always have lower precedence than non-numeric identifiers.
- if aInt && !bInt {
- return -1
- } else if !aInt && bInt {
- return 1
- }
-
// Handle Integer Comparison
if aInt && bInt {
if aI > bI {
@@ -282,15 +266,3 @@ func (v *Version) BumpPatch() {
v.PreRelease = PreRelease("")
v.Metadata = ""
}
-
-// validateIdentifier makes sure the provided identifier satisfies semver spec
-func validateIdentifier(id string) error {
- if id != "" && !reIdentifier.MatchString(id) {
- return fmt.Errorf("%s is not a valid semver identifier", id)
- }
- return nil
-}
-
-// reIdentifier is a regular expression used to check that pre-release and metadata
-// identifiers satisfy the spec requirements
-var reIdentifier = regexp.MustCompile(`^[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*$`)
diff --git a/vendor/github.com/coreos/go-semver/semver/semver_test.go b/vendor/github.com/coreos/go-semver/semver/semver_test.go
index 3abcab2a5..876c68e04 100644
--- a/vendor/github.com/coreos/go-semver/semver/semver_test.go
+++ b/vendor/github.com/coreos/go-semver/semver/semver_test.go
@@ -72,7 +72,6 @@ var fixtures = []fixture{
fixture{"1.0.0-beta", "1.0.0-alpha.beta"},
fixture{"1.0.0-alpha.beta", "1.0.0-alpha.1"},
fixture{"1.0.0-alpha.1", "1.0.0-alpha"},
- fixture{"1.2.3-rc.1-1-1hash", "1.2.3-rc.2"},
}
func TestCompare(t *testing.T) {
@@ -177,7 +176,7 @@ func TestBumpMajor(t *testing.T) {
version, _ = NewVersion("1.0.0+build.1-alpha.1")
version.BumpMajor()
- if version.PreRelease != "" && version.Metadata != "" {
+ if version.PreRelease != "" && version.PreRelease != "" {
t.Fatalf("bumping major on 1.0.0+build.1-alpha.1 resulted in %v", version)
}
}
@@ -196,7 +195,7 @@ func TestBumpMinor(t *testing.T) {
version, _ = NewVersion("1.0.0+build.1-alpha.1")
version.BumpMinor()
- if version.PreRelease != "" && version.Metadata != "" {
+ if version.PreRelease != "" && version.PreRelease != "" {
t.Fatalf("bumping major on 1.0.0+build.1-alpha.1 resulted in %v", version)
}
}
@@ -219,7 +218,7 @@ func TestBumpPatch(t *testing.T) {
version, _ = NewVersion("1.0.0+build.1-alpha.1")
version.BumpPatch()
- if version.PreRelease != "" && version.Metadata != "" {
+ if version.PreRelease != "" && version.PreRelease != "" {
t.Fatalf("bumping major on 1.0.0+build.1-alpha.1 resulted in %v", version)
}
}
@@ -339,8 +338,6 @@ func TestBadInput(t *testing.T) {
"0x1.3.4",
"-1.2.3",
"1.2.3.4",
- "0.88.0-11_e4e5dcabb",
- "0.88.0+11_e4e5dcabb",
}
for _, b := range bad {
if _, err := NewVersion(b); err == nil {
diff --git a/vendor/github.com/dghubble/go-twitter/twitter/statuses.go b/vendor/github.com/dghubble/go-twitter/twitter/statuses.go
index 25b3f0b9c..6a9046bfd 100644
--- a/vendor/github.com/dghubble/go-twitter/twitter/statuses.go
+++ b/vendor/github.com/dghubble/go-twitter/twitter/statuses.go
@@ -57,8 +57,10 @@ func (t Tweet) CreatedAtTime() (time.Time, error) {
// compatibility mode (default).
// https://dev.twitter.com/overview/api/upcoming-changes-to-tweets
type ExtendedTweet struct {
- FullText string `json:"full_text"`
- DisplayTextRange Indices `json:"display_text_range"`
+ FullText string `json:"full_text"`
+ DisplayTextRange Indices `json:"display_text_range"`
+ Entities *Entities `json:"entities"`
+ ExtendedEntities *ExtendedEntity `json:"extended_entities"`
}
// Place represents a Twitter Place / Location
diff --git a/vendor/github.com/docker/cli/Jenkinsfile b/vendor/github.com/docker/cli/Jenkinsfile
new file mode 100644
index 000000000..c5fd50559
--- /dev/null
+++ b/vendor/github.com/docker/cli/Jenkinsfile
@@ -0,0 +1,12 @@
+wrappedNode(label: 'linux && x86_64', cleanWorkspace: true) {
+ timeout(time: 60, unit: 'MINUTES') {
+ stage "Git Checkout"
+ checkout scm
+
+ stage "Run end-to-end test suite"
+ sh "docker version"
+ sh "E2E_UNIQUE_ID=clie2e${BUILD_NUMBER} \
+ IMAGE_TAG=clie2e${BUILD_NUMBER} \
+ make -f docker.Makefile test-e2e"
+ }
+}
diff --git a/vendor/github.com/docker/cli/MAINTAINERS b/vendor/github.com/docker/cli/MAINTAINERS
index 06f3b8353..2ebec81eb 100644
--- a/vendor/github.com/docker/cli/MAINTAINERS
+++ b/vendor/github.com/docker/cli/MAINTAINERS
@@ -27,6 +27,7 @@
people = [
"aaronlehmann",
+ "albers",
"aluzzardi",
"anusha",
"cpuguy83",
@@ -84,6 +85,11 @@
Email = "aaron.lehmann@docker.com"
GitHub = "aaronlehmann"
+ [people.albers]
+ Name = "Harald Albers"
+ Email = "github@albersweb.de"
+ GitHub = "albers"
+
[people.aluzzardi]
Name = "Andrea Luzzardi"
Email = "al@docker.com"
diff --git a/vendor/github.com/docker/cli/Makefile b/vendor/github.com/docker/cli/Makefile
index ccf36b466..f6e73e067 100644
--- a/vendor/github.com/docker/cli/Makefile
+++ b/vendor/github.com/docker/cli/Makefile
@@ -10,13 +10,16 @@ _:=$(shell ./scripts/warn-outside-container $(MAKECMDGOALS))
clean: ## remove build artifacts
rm -rf ./build/* cli/winresources/rsrc_* ./man/man[1-9] docs/yaml/gen
+.PHONY: test-unit
+test-unit: ## run unit test
+ ./scripts/test/unit $(shell go list ./... | grep -vE '/vendor/|/e2e/')
+
.PHONY: test
-test: ## run go test
- ./scripts/test/unit $(shell go list ./... | grep -v '/vendor/')
+test: test-unit ## run tests
.PHONY: test-coverage
test-coverage: ## run test coverage
- ./scripts/test/unit-with-coverage $(shell go list ./... | grep -v '/vendor/')
+ ./scripts/test/unit-with-coverage $(shell go list ./... | grep -vE '/vendor/|/e2e/')
.PHONY: lint
lint: ## run all the lint tools
diff --git a/vendor/github.com/docker/cli/TESTING.md b/vendor/github.com/docker/cli/TESTING.md
new file mode 100644
index 000000000..63bba1d3d
--- /dev/null
+++ b/vendor/github.com/docker/cli/TESTING.md
@@ -0,0 +1,87 @@
+# Testing
+
+The following guidelines summarize the testing policy for docker/cli.
+
+## Unit Test Suite
+
+All code changes should have unit test coverage.
+
+Error cases should be tested with unit tests.
+
+Bug fixes should be covered by new unit tests or additional assertions in
+existing unit tests.
+
+### Details
+
+The unit test suite follows the standard Go testing convention. Tests are
+located in the package directory in `_test.go` files.
+
+Unit tests should be named using the convention:
+
+```
+Test
+```
+
+[Table tests](https://github.com/golang/go/wiki/TableDrivenTests) should be used
+where appropriate, but may not be appropriate in all cases.
+
+Assertions should be made using
+[testify/assert](https://godoc.org/github.com/stretchr/testify/assert) and test
+requirements should be verified using
+[testify/require](https://godoc.org/github.com/stretchr/testify/require).
+
+Fakes, and testing utilities can be found in
+[internal/test](https://godoc.org/github.com/docker/cli/internal/test) and
+[gotestyourself](https://godoc.org/github.com/gotestyourself/gotestyourself).
+
+## End-to-End Test Suite
+
+The end-to-end test suite tests a cli binary against a real API backend.
+
+### Guidelines
+
+Each feature (subcommand) should have a single end-to-end test for
+the success case. The test should include all (or most) flags/options supported
+by that feature.
+
+In some rare cases a couple additional end-to-end tests may be written for a
+sufficiently complex and critical feature (ex: `container run`, `service
+create`, `service update`, and `docker build` may have ~3-5 cases each).
+
+In some rare cases a sufficiently critical error paths may have a single
+end-to-end test case.
+
+In all other cases the behaviour should be covered by unit tests.
+
+If a code change adds a new flag, that flag should be added to the existing
+"success case" end-to-end test.
+
+If a code change fixes a bug, that bug fix should be covered either by adding
+assertions to the existing end-to-end test, or with one or more unit test.
+
+### Details
+
+The end-to-end test suite is located in
+[./e2e](https://github.com/docker/cli/tree/master/e2e). Each directory in `e2e`
+corresponds to a directory in `cli/command` and contains the tests for that
+subcommand. Files in each directory should be named `_test.go` where
+command is the basename of the command (ex: the test for `docker stack deploy`
+is found in `e2e/stack/deploy_test.go`).
+
+Tests should be named using the convention:
+
+```
+Test[]
+```
+
+where the test case name is only required when there are multiple test cases for
+a single command.
+
+End-to-end test should run the `docker` binary using
+[gotestyourself/icmd](https://godoc.org/github.com/gotestyourself/gotestyourself/icmd)
+and make assertions about the exit code, stdout, stderr, and local file system.
+
+Any Docker image or registry operations should use `registry:5000/`
+to communicate with the local instance of the Docker registry. To load
+additional fixture images to the registry see
+[scripts/test/e2e/run](https://github.com/docker/cli/blob/master/scripts/test/e2e/run).
diff --git a/vendor/github.com/docker/cli/VERSION b/vendor/github.com/docker/cli/VERSION
index fd2cab403..a38a5dd06 100644
--- a/vendor/github.com/docker/cli/VERSION
+++ b/vendor/github.com/docker/cli/VERSION
@@ -1 +1 @@
-17.08.0-dev
+17.10.0-dev
diff --git a/vendor/github.com/docker/cli/cli/command/container/attach.go b/vendor/github.com/docker/cli/cli/command/container/attach.go
index dce643284..6e4628d95 100644
--- a/vendor/github.com/docker/cli/cli/command/container/attach.go
+++ b/vendor/github.com/docker/cli/cli/command/container/attach.go
@@ -4,13 +4,13 @@ import (
"io"
"net/http/httputil"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/signal"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
@@ -120,18 +120,7 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error {
}
if c.Config.Tty && dockerCli.Out().IsTerminal() {
- height, width := dockerCli.Out().GetTtySize()
- // To handle the case where a user repeatedly attaches/detaches without resizing their
- // terminal, the only way to get the shell prompt to display for attaches 2+ is to artificially
- // resize it, then go back to normal. Without this, every attach after the first will
- // require the user to manually resize or hit enter.
- resizeTtyTo(ctx, client, opts.container, height+1, width+1, false)
-
- // After the above resizing occurs, the call to MonitorTtySize below will handle resetting back
- // to the actual size.
- if err := MonitorTtySize(ctx, dockerCli, opts.container, false); err != nil {
- logrus.Debugf("Error monitoring TTY size: %s", err)
- }
+ resizeTTY(ctx, dockerCli, opts.container)
}
streamer := hijackedIOStreamer{
@@ -151,14 +140,36 @@ func runAttach(dockerCli command.Cli, opts *attachOptions) error {
if errAttach != nil {
return errAttach
}
+ return getExitStatus(ctx, dockerCli.Client(), opts.container)
+}
- _, status, err := getExitCode(ctx, dockerCli, opts.container)
- if err != nil {
- return err
+func resizeTTY(ctx context.Context, dockerCli command.Cli, containerID string) {
+ height, width := dockerCli.Out().GetTtySize()
+ // To handle the case where a user repeatedly attaches/detaches without resizing their
+ // terminal, the only way to get the shell prompt to display for attaches 2+ is to artificially
+ // resize it, then go back to normal. Without this, every attach after the first will
+ // require the user to manually resize or hit enter.
+ resizeTtyTo(ctx, dockerCli.Client(), containerID, height+1, width+1, false)
+
+ // After the above resizing occurs, the call to MonitorTtySize below will handle resetting back
+ // to the actual size.
+ if err := MonitorTtySize(ctx, dockerCli, containerID, false); err != nil {
+ logrus.Debugf("Error monitoring TTY size: %s", err)
}
+}
+
+func getExitStatus(ctx context.Context, apiclient client.ContainerAPIClient, containerID string) error {
+ container, err := apiclient.ContainerInspect(ctx, containerID)
+ if err != nil {
+ // If we can't connect, then the daemon probably died.
+ if !client.IsErrConnectionFailed(err) {
+ return err
+ }
+ return cli.StatusError{StatusCode: -1}
+ }
+ status := container.State.ExitCode
if status != 0 {
return cli.StatusError{StatusCode: status}
}
-
return nil
}
diff --git a/vendor/github.com/docker/cli/cli/command/container/attach_test.go b/vendor/github.com/docker/cli/cli/command/container/attach_test.go
index 8f87463af..1ca775c6d 100644
--- a/vendor/github.com/docker/cli/cli/command/container/attach_test.go
+++ b/vendor/github.com/docker/cli/cli/command/container/attach_test.go
@@ -4,10 +4,13 @@ import (
"io/ioutil"
"testing"
+ "github.com/docker/cli/cli"
"github.com/docker/cli/internal/test"
"github.com/docker/cli/internal/test/testutil"
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
+ "github.com/stretchr/testify/assert"
+ "golang.org/x/net/context"
)
func TestNewAttachCommandErrors(t *testing.T) {
@@ -67,9 +70,48 @@ func TestNewAttachCommandErrors(t *testing.T) {
},
}
for _, tc := range testCases {
- cmd := NewAttachCommand(test.NewFakeCli(&fakeClient{containerInspectFunc: tc.containerInspectFunc}))
+ cmd := NewAttachCommand(test.NewFakeCli(&fakeClient{inspectFunc: tc.containerInspectFunc}))
cmd.SetOutput(ioutil.Discard)
cmd.SetArgs(tc.args)
testutil.ErrorContains(t, cmd.Execute(), tc.expectedError)
}
}
+
+func TestGetExitStatus(t *testing.T) {
+ containerID := "the exec id"
+ expecatedErr := errors.New("unexpected error")
+
+ testcases := []struct {
+ inspectError error
+ exitCode int
+ expectedError error
+ }{
+ {
+ inspectError: nil,
+ exitCode: 0,
+ },
+ {
+ inspectError: expecatedErr,
+ expectedError: expecatedErr,
+ },
+ {
+ exitCode: 15,
+ expectedError: cli.StatusError{StatusCode: 15},
+ },
+ }
+
+ for _, testcase := range testcases {
+ client := &fakeClient{
+ inspectFunc: func(id string) (types.ContainerJSON, error) {
+ assert.Equal(t, containerID, id)
+ return types.ContainerJSON{
+ ContainerJSONBase: &types.ContainerJSONBase{
+ State: &types.ContainerState{ExitCode: testcase.exitCode},
+ },
+ }, testcase.inspectError
+ },
+ }
+ err := getExitStatus(context.Background(), client, containerID)
+ assert.Equal(t, testcase.expectedError, err)
+ }
+}
diff --git a/vendor/github.com/docker/cli/cli/command/container/client_test.go b/vendor/github.com/docker/cli/cli/command/container/client_test.go
index 1e2d5d9cf..875fee704 100644
--- a/vendor/github.com/docker/cli/cli/command/container/client_test.go
+++ b/vendor/github.com/docker/cli/cli/command/container/client_test.go
@@ -1,19 +1,73 @@
package container
import (
+ "io"
+
"github.com/docker/docker/api/types"
+ "github.com/docker/docker/api/types/container"
+ "github.com/docker/docker/api/types/network"
"github.com/docker/docker/client"
"golang.org/x/net/context"
)
type fakeClient struct {
client.Client
- containerInspectFunc func(string) (types.ContainerJSON, error)
+ inspectFunc func(string) (types.ContainerJSON, error)
+ execInspectFunc func(execID string) (types.ContainerExecInspect, error)
+ execCreateFunc func(container string, config types.ExecConfig) (types.IDResponse, error)
+ createContainerFunc func(config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, containerName string) (container.ContainerCreateCreatedBody, error)
+ imageCreateFunc func(parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error)
+ infoFunc func() (types.Info, error)
}
-func (cli *fakeClient) ContainerInspect(_ context.Context, containerID string) (types.ContainerJSON, error) {
- if cli.containerInspectFunc != nil {
- return cli.containerInspectFunc(containerID)
+func (f *fakeClient) ContainerInspect(_ context.Context, containerID string) (types.ContainerJSON, error) {
+ if f.inspectFunc != nil {
+ return f.inspectFunc(containerID)
}
return types.ContainerJSON{}, nil
}
+
+func (f *fakeClient) ContainerExecCreate(_ context.Context, container string, config types.ExecConfig) (types.IDResponse, error) {
+ if f.execCreateFunc != nil {
+ return f.execCreateFunc(container, config)
+ }
+ return types.IDResponse{}, nil
+}
+
+func (f *fakeClient) ContainerExecInspect(_ context.Context, execID string) (types.ContainerExecInspect, error) {
+ if f.execInspectFunc != nil {
+ return f.execInspectFunc(execID)
+ }
+ return types.ContainerExecInspect{}, nil
+}
+
+func (f *fakeClient) ContainerExecStart(ctx context.Context, execID string, config types.ExecStartCheck) error {
+ return nil
+}
+
+func (f *fakeClient) ContainerCreate(
+ _ context.Context,
+ config *container.Config,
+ hostConfig *container.HostConfig,
+ networkingConfig *network.NetworkingConfig,
+ containerName string,
+) (container.ContainerCreateCreatedBody, error) {
+ if f.createContainerFunc != nil {
+ return f.createContainerFunc(config, hostConfig, networkingConfig, containerName)
+ }
+ return container.ContainerCreateCreatedBody{}, nil
+}
+
+func (f *fakeClient) ImageCreate(ctx context.Context, parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) {
+ if f.imageCreateFunc != nil {
+ return f.imageCreateFunc(parentReference, options)
+ }
+ return nil, nil
+}
+
+func (f *fakeClient) Info(_ context.Context) (types.Info, error) {
+ if f.infoFunc != nil {
+ return f.infoFunc()
+ }
+ return types.Info{}, nil
+}
diff --git a/vendor/github.com/docker/cli/cli/command/container/create.go b/vendor/github.com/docker/cli/cli/command/container/create.go
index 2795e4fed..e87e3fb28 100644
--- a/vendor/github.com/docker/cli/cli/command/container/create.go
+++ b/vendor/github.com/docker/cli/cli/command/container/create.go
@@ -113,6 +113,9 @@ type cidFile struct {
}
func (cid *cidFile) Close() error {
+ if cid.file == nil {
+ return nil
+ }
cid.file.Close()
if cid.written {
@@ -126,6 +129,9 @@ func (cid *cidFile) Close() error {
}
func (cid *cidFile) Write(id string) error {
+ if cid.file == nil {
+ return nil
+ }
if _, err := cid.file.Write([]byte(id)); err != nil {
return errors.Errorf("Failed to write the container ID to the file: %s", err)
}
@@ -134,6 +140,9 @@ func (cid *cidFile) Write(id string) error {
}
func newCIDFile(path string) (*cidFile, error) {
+ if path == "" {
+ return &cidFile{}, nil
+ }
if _, err := os.Stat(path); err == nil {
return nil, errors.Errorf("Container ID file found, make sure the other container isn't running or delete %s", path)
}
@@ -153,19 +162,15 @@ func createContainer(ctx context.Context, dockerCli command.Cli, containerConfig
stderr := dockerCli.Err()
var (
- containerIDFile *cidFile
- trustedRef reference.Canonical
- namedRef reference.Named
+ trustedRef reference.Canonical
+ namedRef reference.Named
)
- cidfile := hostConfig.ContainerIDFile
- if cidfile != "" {
- var err error
- if containerIDFile, err = newCIDFile(cidfile); err != nil {
- return nil, err
- }
- defer containerIDFile.Close()
+ containerIDFile, err := newCIDFile(hostConfig.ContainerIDFile)
+ if err != nil {
+ return nil, err
}
+ defer containerIDFile.Close()
ref, err := reference.ParseAnyReference(config.Image)
if err != nil {
@@ -193,7 +198,7 @@ func createContainer(ctx context.Context, dockerCli command.Cli, containerConfig
fmt.Fprintf(stderr, "Unable to find image '%s' locally\n", reference.FamiliarString(namedRef))
// we don't want to write to stdout anything apart from container.ID
- if err = pullImage(ctx, dockerCli, config.Image, stderr); err != nil {
+ if err := pullImage(ctx, dockerCli, config.Image, stderr); err != nil {
return nil, err
}
if taggedRef, ok := namedRef.(reference.NamedTagged); ok && trustedRef != nil {
@@ -215,10 +220,6 @@ func createContainer(ctx context.Context, dockerCli command.Cli, containerConfig
for _, warning := range response.Warnings {
fmt.Fprintf(stderr, "WARNING: %s\n", warning)
}
- if containerIDFile != nil {
- if err = containerIDFile.Write(response.ID); err != nil {
- return nil, err
- }
- }
- return &response, nil
+ err = containerIDFile.Write(response.ID)
+ return &response, err
}
diff --git a/vendor/github.com/docker/cli/cli/command/container/create_test.go b/vendor/github.com/docker/cli/cli/command/container/create_test.go
new file mode 100644
index 000000000..21354e093
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/container/create_test.go
@@ -0,0 +1,120 @@
+package container
+
+import (
+ "context"
+ "io"
+ "io/ioutil"
+ "os"
+ "strings"
+ "testing"
+
+ "github.com/docker/cli/internal/test"
+ "github.com/docker/cli/internal/test/testutil"
+ "github.com/docker/docker/api/types"
+ "github.com/docker/docker/api/types/container"
+ "github.com/docker/docker/api/types/network"
+ "github.com/gotestyourself/gotestyourself/fs"
+ "github.com/pkg/errors"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+func TestCIDFileNoOPWithNoFilename(t *testing.T) {
+ file, err := newCIDFile("")
+ require.NoError(t, err)
+ assert.Equal(t, &cidFile{}, file)
+
+ assert.NoError(t, file.Write("id"))
+ assert.NoError(t, file.Close())
+}
+
+func TestNewCIDFileWhenFileAlreadyExists(t *testing.T) {
+ tempfile := fs.NewFile(t, "test-cid-file")
+ defer tempfile.Remove()
+
+ _, err := newCIDFile(tempfile.Path())
+ testutil.ErrorContains(t, err, "Container ID file found")
+}
+
+func TestCIDFileCloseWithNoWrite(t *testing.T) {
+ tempdir := fs.NewDir(t, "test-cid-file")
+ defer tempdir.Remove()
+
+ path := tempdir.Join("cidfile")
+ file, err := newCIDFile(path)
+ require.NoError(t, err)
+ assert.Equal(t, file.path, path)
+
+ assert.NoError(t, file.Close())
+ _, err = os.Stat(path)
+ assert.True(t, os.IsNotExist(err))
+}
+
+func TestCIDFileCloseWithWrite(t *testing.T) {
+ tempdir := fs.NewDir(t, "test-cid-file")
+ defer tempdir.Remove()
+
+ path := tempdir.Join("cidfile")
+ file, err := newCIDFile(path)
+ require.NoError(t, err)
+
+ content := "id"
+ assert.NoError(t, file.Write(content))
+
+ actual, err := ioutil.ReadFile(path)
+ require.NoError(t, err)
+ assert.Equal(t, content, string(actual))
+
+ assert.NoError(t, file.Close())
+ _, err = os.Stat(path)
+ require.NoError(t, err)
+}
+
+func TestCreateContainerPullsImageIfMissing(t *testing.T) {
+ imageName := "does-not-exist-locally"
+ responseCounter := 0
+ containerID := "abcdef"
+
+ client := &fakeClient{
+ createContainerFunc: func(
+ config *container.Config,
+ hostConfig *container.HostConfig,
+ networkingConfig *network.NetworkingConfig,
+ containerName string,
+ ) (container.ContainerCreateCreatedBody, error) {
+ defer func() { responseCounter++ }()
+ switch responseCounter {
+ case 0:
+ return container.ContainerCreateCreatedBody{}, fakeNotFound{}
+ case 1:
+ return container.ContainerCreateCreatedBody{ID: containerID}, nil
+ default:
+ return container.ContainerCreateCreatedBody{}, errors.New("unexpected")
+ }
+ },
+ imageCreateFunc: func(parentReference string, options types.ImageCreateOptions) (io.ReadCloser, error) {
+ return ioutil.NopCloser(strings.NewReader("")), nil
+ },
+ infoFunc: func() (types.Info, error) {
+ return types.Info{IndexServerAddress: "http://indexserver"}, nil
+ },
+ }
+ cli := test.NewFakeCli(client)
+ config := &containerConfig{
+ Config: &container.Config{
+ Image: imageName,
+ },
+ HostConfig: &container.HostConfig{},
+ }
+ body, err := createContainer(context.Background(), cli, config, "name")
+ require.NoError(t, err)
+ expected := container.ContainerCreateCreatedBody{ID: containerID}
+ assert.Equal(t, expected, *body)
+ stderr := cli.ErrBuffer().String()
+ assert.Contains(t, stderr, "Unable to find image 'does-not-exist-locally:latest' locally")
+}
+
+type fakeNotFound struct{}
+
+func (f fakeNotFound) NotFound() bool { return true }
+func (f fakeNotFound) Error() string { return "error fake not found" }
diff --git a/vendor/github.com/docker/cli/cli/command/container/exec.go b/vendor/github.com/docker/cli/cli/command/container/exec.go
index bbcd34ae0..f6860db57 100644
--- a/vendor/github.com/docker/cli/cli/command/container/exec.go
+++ b/vendor/github.com/docker/cli/cli/command/container/exec.go
@@ -4,13 +4,15 @@ import (
"fmt"
"io"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
+ "github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
apiclient "github.com/docker/docker/client"
"github.com/docker/docker/pkg/promise"
+ "github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
@@ -22,14 +24,13 @@ type execOptions struct {
detach bool
user string
privileged bool
- env *opts.ListOpts
+ env opts.ListOpts
+ container string
+ command []string
}
-func newExecOptions() *execOptions {
- var values []string
- return &execOptions{
- env: opts.NewListOptsRef(&values, opts.ValidateEnv),
- }
+func newExecOptions() execOptions {
+ return execOptions{env: opts.NewListOpts(opts.ValidateEnv)}
}
// NewExecCommand creates a new cobra.Command for `docker exec`
@@ -41,9 +42,9 @@ func NewExecCommand(dockerCli command.Cli) *cobra.Command {
Short: "Run a command in a running container",
Args: cli.RequiresMinArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
- container := args[0]
- execCmd := args[1:]
- return runExec(dockerCli, options, container, execCmd)
+ options.container = args[0]
+ options.command = args[1:]
+ return runExec(dockerCli, options)
},
}
@@ -56,27 +57,14 @@ func NewExecCommand(dockerCli command.Cli) *cobra.Command {
flags.BoolVarP(&options.detach, "detach", "d", false, "Detached mode: run command in the background")
flags.StringVarP(&options.user, "user", "u", "", "Username or UID (format: [:])")
flags.BoolVarP(&options.privileged, "privileged", "", false, "Give extended privileges to the command")
- flags.VarP(options.env, "env", "e", "Set environment variables")
+ flags.VarP(&options.env, "env", "e", "Set environment variables")
flags.SetAnnotation("env", "version", []string{"1.25"})
return cmd
}
-// nolint: gocyclo
-func runExec(dockerCli command.Cli, options *execOptions, container string, execCmd []string) error {
- execConfig, err := parseExec(options, execCmd)
- // just in case the ParseExec does not exit
- if container == "" || err != nil {
- return cli.StatusError{StatusCode: 1}
- }
-
- if options.detachKeys != "" {
- dockerCli.ConfigFile().DetachKeys = options.detachKeys
- }
-
- // Send client escape keys
- execConfig.DetachKeys = dockerCli.ConfigFile().DetachKeys
-
+func runExec(dockerCli command.Cli, options execOptions) error {
+ execConfig := parseExec(options, dockerCli.ConfigFile())
ctx := context.Background()
client := dockerCli.Client()
@@ -84,7 +72,7 @@ func runExec(dockerCli command.Cli, options *execOptions, container string, exec
// otherwise if we error out we will leak execIDs on the server (and
// there's no easy way to clean those up). But also in order to make "not
// exist" errors take precedence we do a dummy inspect first.
- if _, err := client.ContainerInspect(ctx, container); err != nil {
+ if _, err := client.ContainerInspect(ctx, options.container); err != nil {
return err
}
if !execConfig.Detach {
@@ -93,27 +81,27 @@ func runExec(dockerCli command.Cli, options *execOptions, container string, exec
}
}
- response, err := client.ContainerExecCreate(ctx, container, *execConfig)
+ response, err := client.ContainerExecCreate(ctx, options.container, *execConfig)
if err != nil {
return err
}
execID := response.ID
if execID == "" {
- fmt.Fprintln(dockerCli.Out(), "exec ID empty")
- return nil
+ return errors.New("exec ID empty")
}
- // Temp struct for execStart so that we don't need to transfer all the execConfig.
if execConfig.Detach {
execStartCheck := types.ExecStartCheck{
Detach: execConfig.Detach,
Tty: execConfig.Tty,
}
-
return client.ContainerExecStart(ctx, execID, execStartCheck)
}
+ return interactiveExec(ctx, dockerCli, execConfig, execID)
+}
+func interactiveExec(ctx context.Context, dockerCli command.Cli, execConfig *types.ExecConfig, execID string) error {
// Interactive exec requested.
var (
out, stderr io.Writer
@@ -135,6 +123,7 @@ func runExec(dockerCli command.Cli, options *execOptions, container string, exec
}
}
+ client := dockerCli.Client()
resp, err := client.ContainerExecAttach(ctx, execID, *execConfig)
if err != nil {
return err
@@ -165,42 +154,35 @@ func runExec(dockerCli command.Cli, options *execOptions, container string, exec
return err
}
- var status int
- if _, status, err = getExecExitCode(ctx, client, execID); err != nil {
- return err
- }
-
- if status != 0 {
- return cli.StatusError{StatusCode: status}
- }
-
- return nil
+ return getExecExitStatus(ctx, client, execID)
}
-// getExecExitCode perform an inspect on the exec command. It returns
-// the running state and the exit code.
-func getExecExitCode(ctx context.Context, client apiclient.ContainerAPIClient, execID string) (bool, int, error) {
+func getExecExitStatus(ctx context.Context, client apiclient.ContainerAPIClient, execID string) error {
resp, err := client.ContainerExecInspect(ctx, execID)
if err != nil {
// If we can't connect, then the daemon probably died.
if !apiclient.IsErrConnectionFailed(err) {
- return false, -1, err
+ return err
}
- return false, -1, nil
+ return cli.StatusError{StatusCode: -1}
}
-
- return resp.Running, resp.ExitCode, nil
+ status := resp.ExitCode
+ if status != 0 {
+ return cli.StatusError{StatusCode: status}
+ }
+ return nil
}
// parseExec parses the specified args for the specified command and generates
// an ExecConfig from it.
-func parseExec(opts *execOptions, execCmd []string) (*types.ExecConfig, error) {
+func parseExec(opts execOptions, configFile *configfile.ConfigFile) *types.ExecConfig {
execConfig := &types.ExecConfig{
User: opts.user,
Privileged: opts.privileged,
Tty: opts.tty,
- Cmd: execCmd,
+ Cmd: opts.command,
Detach: opts.detach,
+ Env: opts.env.GetAll(),
}
// If -d is not set, attach to everything by default
@@ -212,9 +194,10 @@ func parseExec(opts *execOptions, execCmd []string) (*types.ExecConfig, error) {
}
}
- if opts.env != nil {
- execConfig.Env = opts.env.GetAll()
+ if opts.detachKeys != "" {
+ execConfig.DetachKeys = opts.detachKeys
+ } else {
+ execConfig.DetachKeys = configFile.DetachKeys
}
-
- return execConfig, nil
+ return execConfig
}
diff --git a/vendor/github.com/docker/cli/cli/command/container/exec_test.go b/vendor/github.com/docker/cli/cli/command/container/exec_test.go
index bf4fd3f35..492e3a558 100644
--- a/vendor/github.com/docker/cli/cli/command/container/exec_test.go
+++ b/vendor/github.com/docker/cli/cli/command/container/exec_test.go
@@ -4,118 +4,201 @@ import (
"io/ioutil"
"testing"
+ "github.com/docker/cli/cli"
+ "github.com/docker/cli/cli/config/configfile"
"github.com/docker/cli/internal/test"
"github.com/docker/cli/internal/test/testutil"
+ "github.com/docker/cli/opts"
"github.com/docker/docker/api/types"
"github.com/pkg/errors"
- "github.com/stretchr/testify/require"
+ "github.com/stretchr/testify/assert"
+ "golang.org/x/net/context"
)
-type arguments struct {
- options execOptions
- execCmd []string
+func withDefaultOpts(options execOptions) execOptions {
+ options.env = opts.NewListOpts(opts.ValidateEnv)
+ if len(options.command) == 0 {
+ options.command = []string{"command"}
+ }
+ return options
}
func TestParseExec(t *testing.T) {
- valids := map[*arguments]*types.ExecConfig{
+ testcases := []struct {
+ options execOptions
+ configFile configfile.ConfigFile
+ expected types.ExecConfig
+ }{
{
- execCmd: []string{"command"},
- }: {
- Cmd: []string{"command"},
- AttachStdout: true,
- AttachStderr: true,
+ expected: types.ExecConfig{
+ Cmd: []string{"command"},
+ AttachStdout: true,
+ AttachStderr: true,
+ },
+ options: withDefaultOpts(execOptions{}),
},
{
- execCmd: []string{"command1", "command2"},
- }: {
- Cmd: []string{"command1", "command2"},
- AttachStdout: true,
- AttachStderr: true,
+ expected: types.ExecConfig{
+ Cmd: []string{"command1", "command2"},
+ AttachStdout: true,
+ AttachStderr: true,
+ },
+ options: withDefaultOpts(execOptions{
+ command: []string{"command1", "command2"},
+ }),
},
{
- options: execOptions{
+ options: withDefaultOpts(execOptions{
interactive: true,
tty: true,
user: "uid",
+ }),
+ expected: types.ExecConfig{
+ User: "uid",
+ AttachStdin: true,
+ AttachStdout: true,
+ AttachStderr: true,
+ Tty: true,
+ Cmd: []string{"command"},
},
- execCmd: []string{"command"},
- }: {
- User: "uid",
- AttachStdin: true,
- AttachStdout: true,
- AttachStderr: true,
- Tty: true,
- Cmd: []string{"command"},
},
{
- options: execOptions{
- detach: true,
+ options: withDefaultOpts(execOptions{detach: true}),
+ expected: types.ExecConfig{
+ Detach: true,
+ Cmd: []string{"command"},
},
- execCmd: []string{"command"},
- }: {
- AttachStdin: false,
- AttachStdout: false,
- AttachStderr: false,
- Detach: true,
- Cmd: []string{"command"},
},
{
- options: execOptions{
+ options: withDefaultOpts(execOptions{
tty: true,
interactive: true,
detach: true,
+ }),
+ expected: types.ExecConfig{
+ Detach: true,
+ Tty: true,
+ Cmd: []string{"command"},
+ },
+ },
+ {
+ options: withDefaultOpts(execOptions{detach: true}),
+ configFile: configfile.ConfigFile{DetachKeys: "de"},
+ expected: types.ExecConfig{
+ Cmd: []string{"command"},
+ DetachKeys: "de",
+ Detach: true,
+ },
+ },
+ {
+ options: withDefaultOpts(execOptions{
+ detach: true,
+ detachKeys: "ab",
+ }),
+ configFile: configfile.ConfigFile{DetachKeys: "de"},
+ expected: types.ExecConfig{
+ Cmd: []string{"command"},
+ DetachKeys: "ab",
+ Detach: true,
},
- execCmd: []string{"command"},
- }: {
- AttachStdin: false,
- AttachStdout: false,
- AttachStderr: false,
- Detach: true,
- Tty: true,
- Cmd: []string{"command"},
},
}
- for valid, expectedExecConfig := range valids {
- execConfig, err := parseExec(&valid.options, valid.execCmd)
- require.NoError(t, err)
- if !compareExecConfig(expectedExecConfig, execConfig) {
- t.Fatalf("Expected [%v] for %v, got [%v]", expectedExecConfig, valid, execConfig)
- }
+ for _, testcase := range testcases {
+ execConfig := parseExec(testcase.options, &testcase.configFile)
+ assert.Equal(t, testcase.expected, *execConfig)
}
}
-func compareExecConfig(config1 *types.ExecConfig, config2 *types.ExecConfig) bool {
- if config1.AttachStderr != config2.AttachStderr {
- return false
+func TestRunExec(t *testing.T) {
+ var testcases = []struct {
+ doc string
+ options execOptions
+ client fakeClient
+ expectedError string
+ expectedOut string
+ expectedErr string
+ }{
+ {
+ doc: "successful detach",
+ options: withDefaultOpts(execOptions{
+ container: "thecontainer",
+ detach: true,
+ }),
+ client: fakeClient{execCreateFunc: execCreateWithID},
+ },
+ {
+ doc: "inspect error",
+ options: newExecOptions(),
+ client: fakeClient{
+ inspectFunc: func(string) (types.ContainerJSON, error) {
+ return types.ContainerJSON{}, errors.New("failed inspect")
+ },
+ },
+ expectedError: "failed inspect",
+ },
+ {
+ doc: "missing exec ID",
+ options: newExecOptions(),
+ expectedError: "exec ID empty",
+ },
}
- if config1.AttachStdin != config2.AttachStdin {
- return false
+
+ for _, testcase := range testcases {
+ t.Run(testcase.doc, func(t *testing.T) {
+ cli := test.NewFakeCli(&testcase.client)
+
+ err := runExec(cli, testcase.options)
+ if testcase.expectedError != "" {
+ testutil.ErrorContains(t, err, testcase.expectedError)
+ } else {
+ if !assert.NoError(t, err) {
+ return
+ }
+ }
+ assert.Equal(t, testcase.expectedOut, cli.OutBuffer().String())
+ assert.Equal(t, testcase.expectedErr, cli.ErrBuffer().String())
+ })
}
- if config1.AttachStdout != config2.AttachStdout {
- return false
+}
+
+func execCreateWithID(_ string, _ types.ExecConfig) (types.IDResponse, error) {
+ return types.IDResponse{ID: "execid"}, nil
+}
+
+func TestGetExecExitStatus(t *testing.T) {
+ execID := "the exec id"
+ expecatedErr := errors.New("unexpected error")
+
+ testcases := []struct {
+ inspectError error
+ exitCode int
+ expectedError error
+ }{
+ {
+ inspectError: nil,
+ exitCode: 0,
+ },
+ {
+ inspectError: expecatedErr,
+ expectedError: expecatedErr,
+ },
+ {
+ exitCode: 15,
+ expectedError: cli.StatusError{StatusCode: 15},
+ },
}
- if config1.Detach != config2.Detach {
- return false
- }
- if config1.Privileged != config2.Privileged {
- return false
- }
- if config1.Tty != config2.Tty {
- return false
- }
- if config1.User != config2.User {
- return false
- }
- if len(config1.Cmd) != len(config2.Cmd) {
- return false
- }
- for index, value := range config1.Cmd {
- if value != config2.Cmd[index] {
- return false
+
+ for _, testcase := range testcases {
+ client := &fakeClient{
+ execInspectFunc: func(id string) (types.ContainerExecInspect, error) {
+ assert.Equal(t, execID, id)
+ return types.ContainerExecInspect{ExitCode: testcase.exitCode}, testcase.inspectError
+ },
}
+ err := getExecExitStatus(context.Background(), client, execID)
+ assert.Equal(t, testcase.expectedError, err)
}
- return true
}
func TestNewExecCommandErrors(t *testing.T) {
@@ -135,7 +218,7 @@ func TestNewExecCommandErrors(t *testing.T) {
},
}
for _, tc := range testCases {
- cli := test.NewFakeCli(&fakeClient{containerInspectFunc: tc.containerInspectFunc})
+ cli := test.NewFakeCli(&fakeClient{inspectFunc: tc.containerInspectFunc})
cmd := NewExecCommand(cli)
cmd.SetOutput(ioutil.Discard)
cmd.SetArgs(tc.args)
diff --git a/vendor/github.com/docker/cli/cli/command/container/hijack.go b/vendor/github.com/docker/cli/cli/command/container/hijack.go
index b6d467d08..3653f1f9b 100644
--- a/vendor/github.com/docker/cli/cli/command/container/hijack.go
+++ b/vendor/github.com/docker/cli/cli/command/container/hijack.go
@@ -6,12 +6,12 @@ import (
"runtime"
"sync"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/ioutils"
"github.com/docker/docker/pkg/stdcopy"
"github.com/docker/docker/pkg/term"
+ "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
diff --git a/vendor/github.com/docker/cli/cli/command/container/opts.go b/vendor/github.com/docker/cli/cli/command/container/opts.go
index cf1f931b2..017a43657 100644
--- a/vendor/github.com/docker/cli/cli/command/container/opts.go
+++ b/vendor/github.com/docker/cli/cli/command/container/opts.go
@@ -11,7 +11,6 @@ import (
"strings"
"time"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/compose/loader"
"github.com/docker/cli/opts"
"github.com/docker/docker/api/types/container"
@@ -20,6 +19,7 @@ import (
"github.com/docker/docker/pkg/signal"
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/pflag"
)
@@ -274,7 +274,7 @@ func addFlags(flags *pflag.FlagSet) *containerOptions {
// Low-level execution (cgroups, namespaces, ...)
flags.StringVar(&copts.cgroupParent, "cgroup-parent", "", "Optional parent cgroup for the container")
- flags.StringVar(&copts.ipcMode, "ipc", "", "IPC namespace to use")
+ flags.StringVar(&copts.ipcMode, "ipc", "", "IPC mode to use")
flags.StringVar(&copts.isolation, "isolation", "", "Container isolation technology")
flags.StringVar(&copts.pidMode, "pid", "", "PID namespace to use")
flags.Var(&copts.shmSize, "shm-size", "Size of /dev/shm")
@@ -421,11 +421,6 @@ func parse(flags *pflag.FlagSet, copts *containerOptions) (*containerConfig, err
return nil, err
}
- ipcMode := container.IpcMode(copts.ipcMode)
- if !ipcMode.Valid() {
- return nil, errors.Errorf("--ipc: invalid IPC mode")
- }
-
pidMode := container.PidMode(copts.pidMode)
if !pidMode.Valid() {
return nil, errors.Errorf("--pid: invalid PID mode")
@@ -584,7 +579,7 @@ func parse(flags *pflag.FlagSet, copts *containerOptions) (*containerConfig, err
ExtraHosts: copts.extraHosts.GetAll(),
VolumesFrom: copts.volumesFrom.GetAll(),
NetworkMode: container.NetworkMode(copts.netMode),
- IpcMode: ipcMode,
+ IpcMode: container.IpcMode(copts.ipcMode),
PidMode: pidMode,
UTSMode: utsMode,
UsernsMode: usernsMode,
diff --git a/vendor/github.com/docker/cli/cli/command/container/opts_test.go b/vendor/github.com/docker/cli/cli/command/container/opts_test.go
index 6758751e9..08c1d07da 100644
--- a/vendor/github.com/docker/cli/cli/command/container/opts_test.go
+++ b/vendor/github.com/docker/cli/cli/command/container/opts_test.go
@@ -1,8 +1,6 @@
package container
import (
- "bytes"
- "encoding/json"
"fmt"
"io/ioutil"
"os"
@@ -14,7 +12,6 @@ import (
"github.com/docker/cli/internal/test/testutil"
"github.com/docker/docker/api/types/container"
networktypes "github.com/docker/docker/api/types/network"
- "github.com/docker/docker/runconfig"
"github.com/docker/go-connections/nat"
"github.com/pkg/errors"
"github.com/spf13/pflag"
@@ -115,7 +112,7 @@ func TestParseRunWithInvalidArgs(t *testing.T) {
}
// nolint: gocyclo
-func TestParseRunVolumes(t *testing.T) {
+func TestParseWithVolumes(t *testing.T) {
// A single volume
arr, tryit := setupPlatformVolume([]string{`/tmp`}, []string{`c:\tmp`})
@@ -366,23 +363,12 @@ func TestParseDevice(t *testing.T) {
}
func TestParseModes(t *testing.T) {
- // ipc ko
- _, _, _, err := parseRun([]string{"--ipc=container:", "img", "cmd"})
- testutil.ErrorContains(t, err, "--ipc: invalid IPC mode")
-
- // ipc ok
- _, hostconfig, _, err := parseRun([]string{"--ipc=host", "img", "cmd"})
- require.NoError(t, err)
- if !hostconfig.IpcMode.Valid() {
- t.Fatalf("Expected a valid IpcMode, got %v", hostconfig.IpcMode)
- }
-
// pid ko
- _, _, _, err = parseRun([]string{"--pid=container:", "img", "cmd"})
+ _, _, _, err := parseRun([]string{"--pid=container:", "img", "cmd"})
testutil.ErrorContains(t, err, "--pid: invalid PID mode")
// pid ok
- _, hostconfig, _, err = parseRun([]string{"--pid=host", "img", "cmd"})
+ _, hostconfig, _, err := parseRun([]string{"--pid=host", "img", "cmd"})
require.NoError(t, err)
if !hostconfig.PidMode.Valid() {
t.Fatalf("Expected a valid PidMode, got %v", hostconfig.PidMode)
@@ -595,161 +581,6 @@ func TestParseEntryPoint(t *testing.T) {
}
}
-// This tests the cases for binds which are generated through
-// DecodeContainerConfig rather than Parse()
-// nolint: gocyclo
-func TestDecodeContainerConfigVolumes(t *testing.T) {
-
- // Root to root
- bindsOrVols, _ := setupPlatformVolume([]string{`/:/`}, []string{os.Getenv("SystemDrive") + `\:c:\`})
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // No destination path
- bindsOrVols, _ = setupPlatformVolume([]string{`/tmp:`}, []string{os.Getenv("TEMP") + `\:`})
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // // No destination path or mode
- bindsOrVols, _ = setupPlatformVolume([]string{`/tmp::`}, []string{os.Getenv("TEMP") + `\::`})
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // A whole lot of nothing
- bindsOrVols = []string{`:`}
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // A whole lot of nothing with no mode
- bindsOrVols = []string{`::`}
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // Too much including an invalid mode
- wTmp := os.Getenv("TEMP")
- bindsOrVols, _ = setupPlatformVolume([]string{`/tmp:/tmp:/tmp:/tmp`}, []string{wTmp + ":" + wTmp + ":" + wTmp + ":" + wTmp})
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // Windows specific error tests
- if runtime.GOOS == "windows" {
- // Volume which does not include a drive letter
- bindsOrVols = []string{`\tmp`}
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // Root to C-Drive
- bindsOrVols = []string{os.Getenv("SystemDrive") + `\:c:`}
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // Container path that does not include a drive letter
- bindsOrVols = []string{`c:\windows:\somewhere`}
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
- }
-
- // Linux-specific error tests
- if runtime.GOOS != "windows" {
- // Just root
- bindsOrVols = []string{`/`}
- if _, _, err := callDecodeContainerConfig(nil, bindsOrVols); err == nil {
- t.Fatalf("binds %v should have failed", bindsOrVols)
- }
- if _, _, err := callDecodeContainerConfig(bindsOrVols, nil); err == nil {
- t.Fatalf("volume %v should have failed", bindsOrVols)
- }
-
- // A single volume that looks like a bind mount passed in Volumes.
- // This should be handled as a bind mount, not a volume.
- vols := []string{`/foo:/bar`}
- if config, hostConfig, err := callDecodeContainerConfig(vols, nil); err != nil {
- t.Fatal("Volume /foo:/bar should have succeeded as a volume name")
- } else if hostConfig.Binds != nil {
- t.Fatalf("Error parsing volume flags, /foo:/bar should not mount-bind anything. Received %v", hostConfig.Binds)
- } else if _, exists := config.Volumes[vols[0]]; !exists {
- t.Fatalf("Error parsing volume flags, /foo:/bar is missing from volumes. Received %v", config.Volumes)
- }
-
- }
-}
-
-// callDecodeContainerConfig is a utility function used by TestDecodeContainerConfigVolumes
-// to call DecodeContainerConfig. It effectively does what a client would
-// do when calling the daemon by constructing a JSON stream of a
-// ContainerConfigWrapper which is populated by the set of volume specs
-// passed into it. It returns a config and a hostconfig which can be
-// validated to ensure DecodeContainerConfig has manipulated the structures
-// correctly.
-func callDecodeContainerConfig(volumes []string, binds []string) (*container.Config, *container.HostConfig, error) {
- var (
- b []byte
- err error
- c *container.Config
- h *container.HostConfig
- )
- w := runconfig.ContainerConfigWrapper{
- Config: &container.Config{
- Volumes: map[string]struct{}{},
- },
- HostConfig: &container.HostConfig{
- NetworkMode: "none",
- Binds: binds,
- },
- }
- for _, v := range volumes {
- w.Config.Volumes[v] = struct{}{}
- }
- if b, err = json.Marshal(w); err != nil {
- return nil, nil, errors.Errorf("Error on marshal %s", err.Error())
- }
- c, h, _, err = runconfig.DecodeContainerConfig(bytes.NewReader(b))
- if err != nil {
- return nil, nil, errors.Errorf("Error parsing %s: %v", string(b), err)
- }
- if c == nil || h == nil {
- return nil, nil, errors.Errorf("Empty config or hostconfig")
- }
-
- return c, h, err
-}
-
func TestValidateDevice(t *testing.T) {
valid := []string{
"/home",
diff --git a/vendor/github.com/docker/cli/cli/command/container/run.go b/vendor/github.com/docker/cli/cli/command/container/run.go
index 695a5cf9a..7ebea722d 100644
--- a/vendor/github.com/docker/cli/cli/command/container/run.go
+++ b/vendor/github.com/docker/cli/cli/command/container/run.go
@@ -10,7 +10,6 @@ import (
"strings"
"syscall"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/opts"
@@ -20,6 +19,7 @@ import (
"github.com/docker/docker/pkg/signal"
"github.com/docker/docker/pkg/term"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/net/context"
diff --git a/vendor/github.com/docker/cli/cli/command/container/stats_helpers.go b/vendor/github.com/docker/cli/cli/command/container/stats_helpers.go
index eb12cd0de..5f5a05cf7 100644
--- a/vendor/github.com/docker/cli/cli/command/container/stats_helpers.go
+++ b/vendor/github.com/docker/cli/cli/command/container/stats_helpers.go
@@ -7,11 +7,11 @@ import (
"sync"
"time"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command/formatter"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
diff --git a/vendor/github.com/docker/cli/cli/command/container/tty.go b/vendor/github.com/docker/cli/cli/command/container/tty.go
index fe123eb10..a02377836 100644
--- a/vendor/github.com/docker/cli/cli/command/container/tty.go
+++ b/vendor/github.com/docker/cli/cli/command/container/tty.go
@@ -7,11 +7,11 @@ import (
"runtime"
"time"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/signal"
+ "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
diff --git a/vendor/github.com/docker/cli/cli/command/container/utils.go b/vendor/github.com/docker/cli/cli/command/container/utils.go
index d9afe2416..024e6ed6d 100644
--- a/vendor/github.com/docker/cli/cli/command/container/utils.go
+++ b/vendor/github.com/docker/cli/cli/command/container/utils.go
@@ -3,14 +3,13 @@ package container
import (
"strconv"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/events"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/api/types/versions"
- clientapi "github.com/docker/docker/client"
+ "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
@@ -125,20 +124,6 @@ func legacyWaitExitOrRemoved(ctx context.Context, dockerCli *command.DockerCli,
return statusChan
}
-// getExitCode performs an inspect on the container. It returns
-// the running state and the exit code.
-func getExitCode(ctx context.Context, dockerCli command.Cli, containerID string) (bool, int, error) {
- c, err := dockerCli.Client().ContainerInspect(ctx, containerID)
- if err != nil {
- // If we can't connect, then the daemon probably died.
- if !clientapi.IsErrConnectionFailed(err) {
- return false, -1, err
- }
- return false, -1, nil
- }
- return c.State.Running, c.State.ExitCode, nil
-}
-
func parallelOperation(ctx context.Context, containers []string, op func(ctx context.Context, container string) error) chan error {
if len(containers) == 0 {
return nil
diff --git a/vendor/github.com/docker/cli/cli/command/events_utils.go b/vendor/github.com/docker/cli/cli/command/events_utils.go
index c271b2050..16d76892a 100644
--- a/vendor/github.com/docker/cli/cli/command/events_utils.go
+++ b/vendor/github.com/docker/cli/cli/command/events_utils.go
@@ -3,8 +3,8 @@ package command
import (
"sync"
- "github.com/Sirupsen/logrus"
eventtypes "github.com/docker/docker/api/types/events"
+ "github.com/sirupsen/logrus"
)
// EventHandler is abstract interface for user to customize
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/container_test.go b/vendor/github.com/docker/cli/cli/command/formatter/container_test.go
index 0977a39c0..02f75bd0a 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/container_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/container_test.go
@@ -10,6 +10,7 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/stringid"
+ "github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -230,10 +231,7 @@ size: 0B
// Special headers for customized table format
{
Context{Format: NewContainerFormat(`table {{truncate .ID 5}}\t{{json .Image}} {{.RunningFor}}/{{title .Status}}/{{pad .Ports 2 2}}.{{upper .Names}} {{lower .Status}}`, false, true)},
- `CONTAINER ID IMAGE CREATED/STATUS/ PORTS .NAMES STATUS
-conta "ubuntu" 24 hours ago//.FOOBAR_BAZ
-conta "ubuntu" 24 hours ago//.FOOBAR_BAR
-`,
+ string(golden.Get(t, "container-context-write-special-headers.golden")),
},
}
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/custom_test.go b/vendor/github.com/docker/cli/cli/command/formatter/custom_test.go
index da42039dc..a9f6ccdac 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/custom_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/custom_test.go
@@ -1,9 +1,10 @@
package formatter
import (
- "reflect"
"strings"
"testing"
+
+ "github.com/stretchr/testify/assert"
)
func compareMultipleValues(t *testing.T, value, expected string) {
@@ -22,7 +23,5 @@ func compareMultipleValues(t *testing.T, value, expected string) {
keyval := strings.Split(expected, "=")
expMap[keyval[0]] = keyval[1]
}
- if !reflect.DeepEqual(expMap, entriesMap) {
- t.Fatalf("Expected entries: %v, got: %v", expected, value)
- }
+ assert.Equal(t, expMap, entriesMap)
}
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/disk_usage_test.go b/vendor/github.com/docker/cli/cli/command/formatter/disk_usage_test.go
index 5e06f67b4..293fe6d82 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/disk_usage_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/disk_usage_test.go
@@ -4,6 +4,7 @@ import (
"bytes"
"testing"
+ "github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
)
@@ -83,12 +84,7 @@ Build Cache 0B
Format: NewDiskUsageFormat("table {{.Type}}\t{{.Active}}"),
},
},
- `TYPE ACTIVE
-Images 0
-Containers 0
-Local Volumes 0
-Build Cache
-`,
+ string(golden.Get(t, "disk-usage-context-write-custom.golden")),
},
// Raw Format
{
@@ -97,31 +93,7 @@ Build Cache
Format: NewDiskUsageFormat("raw"),
},
},
- `type: Images
-total: 0
-active: 0
-size: 0B
-reclaimable: 0B
-
-type: Containers
-total: 0
-active: 0
-size: 0B
-reclaimable: 0B
-
-type: Local Volumes
-total: 0
-active: 0
-size: 0B
-reclaimable: 0B
-
-type: Build Cache
-total:
-active:
-size: 0B
-reclaimable: 0B
-
-`,
+ string(golden.Get(t, "disk-usage-raw-format.golden")),
},
}
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/image.go b/vendor/github.com/docker/cli/cli/command/formatter/image.go
index aaf8ff1aa..e94785ef0 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/image.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/image.go
@@ -86,9 +86,9 @@ func needDigest(ctx ImageContext) bool {
func imageFormat(ctx ImageContext, images []types.ImageSummary, format func(subContext subContext) error) error {
for _, image := range images {
- images := []*imageContext{}
+ formatted := []*imageContext{}
if isDangling(image) {
- images = append(images, &imageContext{
+ formatted = append(formatted, &imageContext{
trunc: ctx.Trunc,
i: image,
repo: "",
@@ -96,90 +96,9 @@ func imageFormat(ctx ImageContext, images []types.ImageSummary, format func(subC
digest: "",
})
} else {
- repoTags := map[string][]string{}
- repoDigests := map[string][]string{}
-
- for _, refString := range image.RepoTags {
- ref, err := reference.ParseNormalizedNamed(refString)
- if err != nil {
- continue
- }
- if nt, ok := ref.(reference.NamedTagged); ok {
- familiarRef := reference.FamiliarName(ref)
- repoTags[familiarRef] = append(repoTags[familiarRef], nt.Tag())
- }
- }
- for _, refString := range image.RepoDigests {
- ref, err := reference.ParseNormalizedNamed(refString)
- if err != nil {
- continue
- }
- if c, ok := ref.(reference.Canonical); ok {
- familiarRef := reference.FamiliarName(ref)
- repoDigests[familiarRef] = append(repoDigests[familiarRef], c.Digest().String())
- }
- }
-
- for repo, tags := range repoTags {
- digests := repoDigests[repo]
-
- // Do not display digests as their own row
- delete(repoDigests, repo)
-
- if !needDigest(ctx) {
- // Ignore digest references, just show tag once
- digests = nil
- }
-
- for _, tag := range tags {
- if len(digests) == 0 {
- images = append(images, &imageContext{
- trunc: ctx.Trunc,
- i: image,
- repo: repo,
- tag: tag,
- digest: "",
- })
- continue
- }
- // Display the digests for each tag
- for _, dgst := range digests {
- images = append(images, &imageContext{
- trunc: ctx.Trunc,
- i: image,
- repo: repo,
- tag: tag,
- digest: dgst,
- })
- }
-
- }
- }
-
- // Show rows for remaining digest only references
- for repo, digests := range repoDigests {
- // If digests are displayed, show row per digest
- if ctx.Digest {
- for _, dgst := range digests {
- images = append(images, &imageContext{
- trunc: ctx.Trunc,
- i: image,
- repo: repo,
- tag: "",
- digest: dgst,
- })
- }
- } else {
- images = append(images, &imageContext{
- trunc: ctx.Trunc,
- i: image,
- repo: repo,
- tag: "",
- })
- }
- }
+ formatted = imageFormatTaggedAndDigest(ctx, image)
}
- for _, imageCtx := range images {
+ for _, imageCtx := range formatted {
if err := format(imageCtx); err != nil {
return err
}
@@ -188,6 +107,82 @@ func imageFormat(ctx ImageContext, images []types.ImageSummary, format func(subC
return nil
}
+func imageFormatTaggedAndDigest(ctx ImageContext, image types.ImageSummary) []*imageContext {
+ repoTags := map[string][]string{}
+ repoDigests := map[string][]string{}
+ images := []*imageContext{}
+
+ for _, refString := range image.RepoTags {
+ ref, err := reference.ParseNormalizedNamed(refString)
+ if err != nil {
+ continue
+ }
+ if nt, ok := ref.(reference.NamedTagged); ok {
+ familiarRef := reference.FamiliarName(ref)
+ repoTags[familiarRef] = append(repoTags[familiarRef], nt.Tag())
+ }
+ }
+ for _, refString := range image.RepoDigests {
+ ref, err := reference.ParseNormalizedNamed(refString)
+ if err != nil {
+ continue
+ }
+ if c, ok := ref.(reference.Canonical); ok {
+ familiarRef := reference.FamiliarName(ref)
+ repoDigests[familiarRef] = append(repoDigests[familiarRef], c.Digest().String())
+ }
+ }
+
+ addImage := func(repo, tag, digest string) {
+ image := &imageContext{
+ trunc: ctx.Trunc,
+ i: image,
+ repo: repo,
+ tag: tag,
+ digest: digest,
+ }
+ images = append(images, image)
+ }
+
+ for repo, tags := range repoTags {
+ digests := repoDigests[repo]
+
+ // Do not display digests as their own row
+ delete(repoDigests, repo)
+
+ if !needDigest(ctx) {
+ // Ignore digest references, just show tag once
+ digests = nil
+ }
+
+ for _, tag := range tags {
+ if len(digests) == 0 {
+ addImage(repo, tag, "")
+ continue
+ }
+ // Display the digests for each tag
+ for _, dgst := range digests {
+ addImage(repo, tag, dgst)
+ }
+
+ }
+ }
+
+ // Show rows for remaining digest only references
+ for repo, digests := range repoDigests {
+ // If digests are displayed, show row per digest
+ if ctx.Digest {
+ for _, dgst := range digests {
+ addImage(repo, "", dgst)
+ }
+ } else {
+ addImage(repo, "", "")
+
+ }
+ }
+ return images
+}
+
type imageContext struct {
HeaderContext
trunc bool
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/image_test.go b/vendor/github.com/docker/cli/cli/command/formatter/image_test.go
index be7b084e3..20b73a52c 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/image_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/image_test.go
@@ -55,6 +55,26 @@ func TestImageContext(t *testing.T) {
i: types.ImageSummary{},
digest: "sha256:d149ab53f8718e987c3a3024bb8aa0e2caadf6c0328f1d9d850b2a2a67f2819a",
}, "sha256:d149ab53f8718e987c3a3024bb8aa0e2caadf6c0328f1d9d850b2a2a67f2819a", ctx.Digest},
+ {
+ imageContext{
+ i: types.ImageSummary{Containers: 10},
+ }, "10", ctx.Containers,
+ },
+ {
+ imageContext{
+ i: types.ImageSummary{VirtualSize: 10000},
+ }, "10kB", ctx.VirtualSize,
+ },
+ {
+ imageContext{
+ i: types.ImageSummary{SharedSize: 10000},
+ }, "10kB", ctx.SharedSize,
+ },
+ {
+ imageContext{
+ i: types.ImageSummary{SharedSize: 5000, VirtualSize: 20000},
+ }, "15kB", ctx.UniqueSize,
+ },
}
for _, c := range cases {
@@ -62,8 +82,8 @@ func TestImageContext(t *testing.T) {
v := c.call()
if strings.Contains(v, ",") {
compareMultipleValues(t, v, c.expValue)
- } else if v != c.expValue {
- t.Fatalf("Expected %s, was %s\n", c.expValue, v)
+ } else {
+ assert.Equal(t, c.expValue, v)
}
}
}
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/search_test.go b/vendor/github.com/docker/cli/cli/command/formatter/search_test.go
index 4fa96f8ae..80273a522 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/search_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/search_test.go
@@ -8,6 +8,7 @@ import (
registrytypes "github.com/docker/docker/api/types/registry"
"github.com/docker/docker/pkg/stringutils"
+ "github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
)
@@ -120,10 +121,7 @@ func TestSearchContextWrite(t *testing.T) {
// Table format
{
Context{Format: NewSearchFormat("table")},
- `NAME DESCRIPTION STARS OFFICIAL AUTOMATED
-result1 Official build 5000 [OK]
-result2 Not official 5 [OK]
-`,
+ string(golden.Get(t, "search-context-write-table.golden")),
},
{
Context{Format: NewSearchFormat("table {{.Name}}")},
@@ -210,9 +208,7 @@ func TestSearchContextWriteStars(t *testing.T) {
// Table format
{
Context{Format: NewSearchFormat("table")},
- `NAME DESCRIPTION STARS OFFICIAL AUTOMATED
-result1 Official build 5000 [OK]
-`,
+ string(golden.Get(t, "search-context-write-stars-table.golden")),
},
{
Context{Format: NewSearchFormat("table {{.Name}}")},
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/secret.go b/vendor/github.com/docker/cli/cli/command/formatter/secret.go
index 04bf944ec..d025cd8f3 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/secret.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/secret.go
@@ -12,19 +12,20 @@ import (
)
const (
- defaultSecretTableFormat = "table {{.ID}}\t{{.Name}}\t{{.CreatedAt}}\t{{.UpdatedAt}}"
+ defaultSecretTableFormat = "table {{.ID}}\t{{.Name}}\t{{.Driver}}\t{{.CreatedAt}}\t{{.UpdatedAt}}"
secretIDHeader = "ID"
secretCreatedHeader = "CREATED"
secretUpdatedHeader = "UPDATED"
- secretInspectPrettyTemplate Format = `ID: {{.ID}}
-Name: {{.Name}}
+ secretInspectPrettyTemplate Format = `ID: {{.ID}}
+Name: {{.Name}}
{{- if .Labels }}
Labels:
{{- range $k, $v := .Labels }}
- {{ $k }}{{if $v }}={{ $v }}{{ end }}
{{- end }}{{ end }}
-Created at: {{.CreatedAt}}
-Updated at: {{.UpdatedAt}}`
+Driver: {{.Driver}}
+Created at: {{.CreatedAt}}
+Updated at: {{.UpdatedAt}}`
)
// NewSecretFormat returns a Format for rendering using a secret Context
@@ -61,6 +62,7 @@ func newSecretContext() *secretContext {
sCtx.header = map[string]string{
"ID": secretIDHeader,
"Name": nameHeader,
+ "Driver": driverHeader,
"CreatedAt": secretCreatedHeader,
"UpdatedAt": secretUpdatedHeader,
"Labels": labelsHeader,
@@ -89,6 +91,13 @@ func (c *secretContext) CreatedAt() string {
return units.HumanDuration(time.Now().UTC().Sub(c.s.Meta.CreatedAt)) + " ago"
}
+func (c *secretContext) Driver() string {
+ if c.s.Spec.Driver == nil {
+ return ""
+ }
+ return c.s.Spec.Driver.Name
+}
+
func (c *secretContext) UpdatedAt() string {
return units.HumanDuration(time.Now().UTC().Sub(c.s.Meta.UpdatedAt)) + " ago"
}
@@ -153,6 +162,13 @@ func (ctx *secretInspectContext) Labels() map[string]string {
return ctx.Secret.Spec.Labels
}
+func (ctx *secretInspectContext) Driver() string {
+ if ctx.Secret.Spec.Driver == nil {
+ return ""
+ }
+ return ctx.Secret.Spec.Driver.Name
+}
+
func (ctx *secretInspectContext) CreatedAt() string {
return command.PrettyPrint(ctx.Secret.CreatedAt)
}
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/secret_test.go b/vendor/github.com/docker/cli/cli/command/formatter/secret_test.go
index 98fe61315..03f6ac1f5 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/secret_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/secret_test.go
@@ -28,9 +28,9 @@ func TestSecretContextFormatWrite(t *testing.T) {
},
// Table format
{Context{Format: NewSecretFormat("table", false)},
- `ID NAME CREATED UPDATED
-1 passwords Less than a second ago Less than a second ago
-2 id_rsa Less than a second ago Less than a second ago
+ `ID NAME DRIVER CREATED UPDATED
+1 passwords Less than a second ago Less than a second ago
+2 id_rsa Less than a second ago Less than a second ago
`},
{Context{Format: NewSecretFormat("table {{.Name}}", true)},
`NAME
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/service.go b/vendor/github.com/docker/cli/cli/command/formatter/service.go
index 0aca42c24..be1437b6f 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/service.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/service.go
@@ -504,7 +504,10 @@ func (c *serviceContext) Replicas() string {
}
func (c *serviceContext) Image() string {
- image := c.service.Spec.TaskTemplate.ContainerSpec.Image
+ var image string
+ if c.service.Spec.TaskTemplate.ContainerSpec != nil {
+ image = c.service.Spec.TaskTemplate.ContainerSpec.Image
+ }
if ref, err := reference.ParseNormalizedNamed(image); err == nil {
// update image string for display, (strips any digest)
if nt, ok := ref.(reference.NamedTagged); ok {
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/service_test.go b/vendor/github.com/docker/cli/cli/command/formatter/service_test.go
index d7542ef32..35adb4be8 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/service_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/service_test.go
@@ -8,6 +8,7 @@ import (
"testing"
"github.com/docker/docker/api/types/swarm"
+ "github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -59,21 +60,7 @@ bar
// Raw Format
{
Context{Format: NewServiceListFormat("raw", false)},
- `id: id_baz
-name: baz
-mode: global
-replicas: 2/4
-image:
-ports: *:80->8080/tcp
-
-id: id_bar
-name: bar
-mode: replicated
-replicas: 2/4
-image:
-ports: *:80->8080/tcp
-
-`,
+ string(golden.Get(t, "service-context-write-raw.golden")),
},
{
Context{Format: NewServiceListFormat("raw", true)},
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/task_test.go b/vendor/github.com/docker/cli/cli/command/formatter/task_test.go
index d2843c70d..7e8edd299 100644
--- a/vendor/github.com/docker/cli/cli/command/formatter/task_test.go
+++ b/vendor/github.com/docker/cli/cli/command/formatter/task_test.go
@@ -7,6 +7,7 @@ import (
"testing"
"github.com/docker/docker/api/types/swarm"
+ "github.com/gotestyourself/gotestyourself/golden"
"github.com/stretchr/testify/assert"
)
@@ -33,10 +34,7 @@ taskID2
},
{
Context{Format: NewTaskFormat("table {{.Name}}\t{{.Node}}\t{{.Ports}}", false)},
- `NAME NODE PORTS
-foobar_baz foo1
-foobar_bar foo2
-`,
+ string(golden.Get(t, "task-context-write-table-custom.golden")),
},
{
Context{Format: NewTaskFormat("table {{.Name}}", true)},
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/testdata/container-context-write-special-headers.golden b/vendor/github.com/docker/cli/cli/command/formatter/testdata/container-context-write-special-headers.golden
new file mode 100644
index 000000000..3fe21c8e4
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/formatter/testdata/container-context-write-special-headers.golden
@@ -0,0 +1,3 @@
+CONTAINER ID IMAGE CREATED/STATUS/ PORTS .NAMES STATUS
+conta "ubuntu" 24 hours ago//.FOOBAR_BAZ
+conta "ubuntu" 24 hours ago//.FOOBAR_BAR
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/testdata/disk-usage-context-write-custom.golden b/vendor/github.com/docker/cli/cli/command/formatter/testdata/disk-usage-context-write-custom.golden
new file mode 100644
index 000000000..eaa466b4d
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/formatter/testdata/disk-usage-context-write-custom.golden
@@ -0,0 +1,5 @@
+TYPE ACTIVE
+Images 0
+Containers 0
+Local Volumes 0
+Build Cache
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/testdata/disk-usage-raw-format.golden b/vendor/github.com/docker/cli/cli/command/formatter/testdata/disk-usage-raw-format.golden
new file mode 100644
index 000000000..4539c0c62
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/formatter/testdata/disk-usage-raw-format.golden
@@ -0,0 +1,24 @@
+type: Images
+total: 0
+active: 0
+size: 0B
+reclaimable: 0B
+
+type: Containers
+total: 0
+active: 0
+size: 0B
+reclaimable: 0B
+
+type: Local Volumes
+total: 0
+active: 0
+size: 0B
+reclaimable: 0B
+
+type: Build Cache
+total:
+active:
+size: 0B
+reclaimable: 0B
+
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/testdata/search-context-write-stars-table.golden b/vendor/github.com/docker/cli/cli/command/formatter/testdata/search-context-write-stars-table.golden
new file mode 100644
index 000000000..1a66b4292
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/formatter/testdata/search-context-write-stars-table.golden
@@ -0,0 +1,2 @@
+NAME DESCRIPTION STARS OFFICIAL AUTOMATED
+result1 Official build 5000 [OK]
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/testdata/search-context-write-table.golden b/vendor/github.com/docker/cli/cli/command/formatter/testdata/search-context-write-table.golden
new file mode 100644
index 000000000..72784fd01
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/formatter/testdata/search-context-write-table.golden
@@ -0,0 +1,3 @@
+NAME DESCRIPTION STARS OFFICIAL AUTOMATED
+result1 Official build 5000 [OK]
+result2 Not official 5 [OK]
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/testdata/service-context-write-raw.golden b/vendor/github.com/docker/cli/cli/command/formatter/testdata/service-context-write-raw.golden
new file mode 100644
index 000000000..d62b9a244
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/formatter/testdata/service-context-write-raw.golden
@@ -0,0 +1,14 @@
+id: id_baz
+name: baz
+mode: global
+replicas: 2/4
+image:
+ports: *:80->8080/tcp
+
+id: id_bar
+name: bar
+mode: replicated
+replicas: 2/4
+image:
+ports: *:80->8080/tcp
+
diff --git a/vendor/github.com/docker/cli/cli/command/formatter/testdata/task-context-write-table-custom.golden b/vendor/github.com/docker/cli/cli/command/formatter/testdata/task-context-write-table-custom.golden
new file mode 100644
index 000000000..0f931ea98
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/formatter/testdata/task-context-write-table-custom.golden
@@ -0,0 +1,3 @@
+NAME NODE PORTS
+foobar_baz foo1
+foobar_bar foo2
diff --git a/vendor/github.com/docker/cli/cli/command/image/build.go b/vendor/github.com/docker/cli/cli/command/image/build.go
index d67ddfe9f..19865717a 100644
--- a/vendor/github.com/docker/cli/cli/command/image/build.go
+++ b/vendor/github.com/docker/cli/cli/command/image/build.go
@@ -12,7 +12,6 @@ import (
"regexp"
"runtime"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/image/build"
@@ -22,12 +21,14 @@ import (
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/archive"
+ "github.com/docker/docker/pkg/idtools"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/docker/docker/pkg/progress"
"github.com/docker/docker/pkg/streamformatter"
"github.com/docker/docker/pkg/urlutil"
units "github.com/docker/go-units"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
@@ -243,6 +244,7 @@ func runBuild(dockerCli command.Cli, options buildOptions) error {
excludes = build.TrimBuildFilesFromExcludes(excludes, relDockerfile, options.dockerfileFromStdin())
buildCtx, err = archive.TarWithOptions(contextDir, &archive.TarOptions{
ExcludePatterns: excludes,
+ ChownOpts: &idtools.IDPair{UID: 0, GID: 0},
})
if err != nil {
return err
diff --git a/vendor/github.com/docker/cli/cli/command/image/build_session.go b/vendor/github.com/docker/cli/cli/command/image/build_session.go
index 86fe95782..4281f9fe6 100644
--- a/vendor/github.com/docker/cli/cli/command/image/build_session.go
+++ b/vendor/github.com/docker/cli/cli/command/image/build_session.go
@@ -17,9 +17,9 @@ import (
"github.com/docker/cli/cli/command/image/build"
cliconfig "github.com/docker/cli/cli/config"
"github.com/docker/docker/api/types/versions"
- "github.com/docker/docker/client/session"
- "github.com/docker/docker/client/session/filesync"
"github.com/docker/docker/pkg/progress"
+ "github.com/moby/buildkit/session"
+ "github.com/moby/buildkit/session/filesync"
"github.com/pkg/errors"
"golang.org/x/time/rate"
)
diff --git a/vendor/github.com/docker/cli/cli/command/image/build_test.go b/vendor/github.com/docker/cli/cli/command/image/build_test.go
index 325c82343..1ccd70e45 100644
--- a/vendor/github.com/docker/cli/cli/command/image/build_test.go
+++ b/vendor/github.com/docker/cli/cli/command/image/build_test.go
@@ -6,18 +6,57 @@ import (
"io/ioutil"
"os"
"path/filepath"
+ "runtime"
"sort"
+ "syscall"
"testing"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/internal/test"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/archive"
+ "github.com/gotestyourself/gotestyourself/fs"
+ "github.com/gotestyourself/gotestyourself/skip"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"golang.org/x/net/context"
)
+func TestRunBuildResetsUidAndGidInContext(t *testing.T) {
+ skip.IfCondition(t, runtime.GOOS == "windows", "uid and gid not relevant on windows")
+ dest := fs.NewDir(t, "test-build-context-dest")
+ defer dest.Remove()
+
+ fakeImageBuild := func(_ context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) {
+ assert.NoError(t, archive.Untar(context, dest.Path(), nil))
+
+ body := new(bytes.Buffer)
+ return types.ImageBuildResponse{Body: ioutil.NopCloser(body)}, nil
+ }
+ cli := test.NewFakeCli(&fakeClient{imageBuildFunc: fakeImageBuild})
+
+ dir := fs.NewDir(t, "test-build-context",
+ fs.WithFile("foo", "some content", fs.AsUser(65534, 65534)),
+ fs.WithFile("Dockerfile", `
+ FROM alpine:3.6
+ COPY foo bar /
+ `),
+ )
+ defer dir.Remove()
+
+ options := newBuildOptions()
+ options.context = dir.Path()
+
+ err := runBuild(cli, options)
+ require.NoError(t, err)
+
+ files, err := ioutil.ReadDir(dest.Path())
+ require.NoError(t, err)
+ for _, fileInfo := range files {
+ assert.Equal(t, uint32(0), fileInfo.Sys().(*syscall.Stat_t).Uid)
+ assert.Equal(t, uint32(0), fileInfo.Sys().(*syscall.Stat_t).Gid)
+ }
+}
func TestRunBuildDockerfileFromStdinWithCompress(t *testing.T) {
dest, err := ioutil.TempDir("", "test-build-compress-dest")
require.NoError(t, err)
diff --git a/vendor/github.com/docker/cli/cli/command/image/trust.go b/vendor/github.com/docker/cli/cli/command/image/trust.go
index dd0d12c4c..8d94164e5 100644
--- a/vendor/github.com/docker/cli/cli/command/image/trust.go
+++ b/vendor/github.com/docker/cli/cli/command/image/trust.go
@@ -8,7 +8,6 @@ import (
"path"
"sort"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/trust"
"github.com/docker/distribution/reference"
@@ -19,6 +18,7 @@ import (
"github.com/docker/notary/tuf/data"
"github.com/opencontainers/go-digest"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
diff --git a/vendor/github.com/docker/cli/cli/command/inspect/inspector.go b/vendor/github.com/docker/cli/cli/command/inspect/inspector.go
index b03dbed26..aef31e62d 100644
--- a/vendor/github.com/docker/cli/cli/command/inspect/inspector.go
+++ b/vendor/github.com/docker/cli/cli/command/inspect/inspector.go
@@ -7,10 +7,10 @@ import (
"strings"
"text/template"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/templates"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
)
// Inspector defines an interface to implement to process elements
diff --git a/vendor/github.com/docker/cli/cli/command/network/client_test.go b/vendor/github.com/docker/cli/cli/command/network/client_test.go
index 722c72bd1..029499e93 100644
--- a/vendor/github.com/docker/cli/cli/command/network/client_test.go
+++ b/vendor/github.com/docker/cli/cli/command/network/client_test.go
@@ -12,6 +12,7 @@ type fakeClient struct {
networkCreateFunc func(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error)
networkConnectFunc func(ctx context.Context, networkID, container string, config *network.EndpointSettings) error
networkDisconnectFunc func(ctx context.Context, networkID, container string, force bool) error
+ networkListFunc func(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
}
func (c *fakeClient) NetworkCreate(ctx context.Context, name string, options types.NetworkCreate) (types.NetworkCreateResponse, error) {
@@ -34,3 +35,10 @@ func (c *fakeClient) NetworkDisconnect(ctx context.Context, networkID, container
}
return nil
}
+
+func (c *fakeClient) NetworkList(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
+ if c.networkListFunc != nil {
+ return c.networkListFunc(ctx, options)
+ }
+ return []types.NetworkResource{}, nil
+}
diff --git a/vendor/github.com/docker/cli/cli/command/network/list_test.go b/vendor/github.com/docker/cli/cli/command/network/list_test.go
new file mode 100644
index 000000000..63fc0a13c
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/network/list_test.go
@@ -0,0 +1,69 @@
+package network
+
+import (
+ "testing"
+
+ "io/ioutil"
+
+ "strings"
+
+ "github.com/docker/cli/internal/test"
+ . "github.com/docker/cli/internal/test/builders"
+ "github.com/docker/cli/internal/test/testutil"
+ "github.com/docker/docker/api/types"
+ "github.com/docker/docker/api/types/filters"
+ "github.com/gotestyourself/gotestyourself/golden"
+ "github.com/pkg/errors"
+ "github.com/stretchr/testify/assert"
+ "golang.org/x/net/context"
+)
+
+func TestNetworkListErrors(t *testing.T) {
+ testCases := []struct {
+ networkListFunc func(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error)
+ expectedError string
+ }{
+ {
+ networkListFunc: func(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
+ return []types.NetworkResource{}, errors.Errorf("error creating network")
+ },
+ expectedError: "error creating network",
+ },
+ }
+
+ for _, tc := range testCases {
+ cmd := newListCommand(
+ test.NewFakeCli(&fakeClient{
+ networkListFunc: tc.networkListFunc,
+ }),
+ )
+ cmd.SetOutput(ioutil.Discard)
+ testutil.ErrorContains(t, cmd.Execute(), tc.expectedError)
+
+ }
+}
+
+func TestNetworkListWithFlags(t *testing.T) {
+
+ filterArgs := filters.NewArgs()
+ filterArgs.Add("image.name", "ubuntu")
+
+ expectedOpts := types.NetworkListOptions{
+ Filters: filterArgs,
+ }
+
+ cli := test.NewFakeCli(&fakeClient{
+ networkListFunc: func(ctx context.Context, options types.NetworkListOptions) ([]types.NetworkResource, error) {
+ assert.Equal(t, expectedOpts, options, "not expected options error")
+ return []types.NetworkResource{*NetworkResource(NetworkResourceID("123454321"),
+ NetworkResourceName("network_1"),
+ NetworkResourceDriver("09.7.01"),
+ NetworkResourceScope("global"))}, nil
+ },
+ })
+ cmd := newListCommand(cli)
+
+ cmd.Flags().Set("filter", "image.name=ubuntu")
+ assert.NoError(t, cmd.Execute())
+ golden.Assert(t, strings.TrimSpace(cli.OutBuffer().String()), "network-list.golden")
+}
diff --git a/vendor/github.com/docker/cli/cli/command/network/testdata/network-list.golden b/vendor/github.com/docker/cli/cli/command/network/testdata/network-list.golden
new file mode 100644
index 000000000..e77651090
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/network/testdata/network-list.golden
@@ -0,0 +1,2 @@
+NETWORK ID NAME DRIVER SCOPE
+123454321 network_1 09.7.01 global
\ No newline at end of file
diff --git a/vendor/github.com/docker/cli/cli/command/out.go b/vendor/github.com/docker/cli/cli/command/out.go
index 27b44c235..89cc5d3aa 100644
--- a/vendor/github.com/docker/cli/cli/command/out.go
+++ b/vendor/github.com/docker/cli/cli/command/out.go
@@ -4,8 +4,8 @@ import (
"io"
"os"
- "github.com/Sirupsen/logrus"
"github.com/docker/docker/pkg/term"
+ "github.com/sirupsen/logrus"
)
// OutStream is an output stream used by the DockerCli to write normal program
diff --git a/vendor/github.com/docker/cli/cli/command/plugin/create.go b/vendor/github.com/docker/cli/cli/command/plugin/create.go
index 5184ce1da..56baa4ebe 100644
--- a/vendor/github.com/docker/cli/cli/command/plugin/create.go
+++ b/vendor/github.com/docker/cli/cli/command/plugin/create.go
@@ -7,13 +7,13 @@ import (
"os"
"path/filepath"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/distribution/reference"
"github.com/docker/docker/api/types"
"github.com/docker/docker/pkg/archive"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"golang.org/x/net/context"
)
diff --git a/vendor/github.com/docker/cli/cli/command/secret/create.go b/vendor/github.com/docker/cli/cli/command/secret/create.go
index 20efaec75..6ade18bdf 100644
--- a/vendor/github.com/docker/cli/cli/command/secret/create.go
+++ b/vendor/github.com/docker/cli/cli/command/secret/create.go
@@ -17,6 +17,7 @@ import (
type createOptions struct {
name string
+ driver string
file string
labels opts.ListOpts
}
@@ -27,17 +28,21 @@ func newSecretCreateCommand(dockerCli command.Cli) *cobra.Command {
}
cmd := &cobra.Command{
- Use: "create [OPTIONS] SECRET file|-",
+ Use: "create [OPTIONS] SECRET [file|-]",
Short: "Create a secret from a file or STDIN as content",
- Args: cli.ExactArgs(2),
+ Args: cli.RequiresRangeArgs(1, 2),
RunE: func(cmd *cobra.Command, args []string) error {
options.name = args[0]
- options.file = args[1]
+ if len(args) == 2 {
+ options.file = args[1]
+ }
return runSecretCreate(dockerCli, options)
},
}
flags := cmd.Flags()
flags.VarP(&options.labels, "label", "l", "Secret labels")
+ flags.StringVarP(&options.driver, "driver", "d", "", "Secret driver")
+ flags.SetAnnotation("driver", "version", []string{"1.31"})
return cmd
}
@@ -46,21 +51,14 @@ func runSecretCreate(dockerCli command.Cli, options createOptions) error {
client := dockerCli.Client()
ctx := context.Background()
- var in io.Reader = dockerCli.In()
- if options.file != "-" {
- file, err := system.OpenSequential(options.file)
- if err != nil {
- return err
- }
- in = file
- defer file.Close()
+ if options.driver != "" && options.file != "" {
+ return errors.Errorf("When using secret driver secret data must be empty")
}
- secretData, err := ioutil.ReadAll(in)
+ secretData, err := readSecretData(dockerCli.In(), options.file)
if err != nil {
return errors.Errorf("Error reading content from %q: %v", options.file, err)
}
-
spec := swarm.SecretSpec{
Annotations: swarm.Annotations{
Name: options.name,
@@ -68,6 +66,11 @@ func runSecretCreate(dockerCli command.Cli, options createOptions) error {
},
Data: secretData,
}
+ if options.driver != "" {
+ spec.Driver = &swarm.Driver{
+ Name: options.driver,
+ }
+ }
r, err := client.SecretCreate(ctx, spec)
if err != nil {
@@ -77,3 +80,23 @@ func runSecretCreate(dockerCli command.Cli, options createOptions) error {
fmt.Fprintln(dockerCli.Out(), r.ID)
return nil
}
+
+func readSecretData(in io.ReadCloser, file string) ([]byte, error) {
+ // Read secret value from external driver
+ if file == "" {
+ return nil, nil
+ }
+ if file != "-" {
+ var err error
+ in, err = system.OpenSequential(file)
+ if err != nil {
+ return nil, err
+ }
+ defer in.Close()
+ }
+ data, err := ioutil.ReadAll(in)
+ if err != nil {
+ return nil, err
+ }
+ return data, nil
+}
diff --git a/vendor/github.com/docker/cli/cli/command/secret/create_test.go b/vendor/github.com/docker/cli/cli/command/secret/create_test.go
index f9f70cfed..442dd7a91 100644
--- a/vendor/github.com/docker/cli/cli/command/secret/create_test.go
+++ b/vendor/github.com/docker/cli/cli/command/secret/create_test.go
@@ -24,12 +24,11 @@ func TestSecretCreateErrors(t *testing.T) {
secretCreateFunc func(swarm.SecretSpec) (types.SecretCreateResponse, error)
expectedError string
}{
- {
- args: []string{"too_few"},
- expectedError: "requires exactly 2 arguments",
- },
{args: []string{"too", "many", "arguments"},
- expectedError: "requires exactly 2 arguments",
+ expectedError: "requires at least 1 and at most 2 arguments",
+ },
+ {args: []string{"create", "--driver", "driver", "-"},
+ expectedError: "secret data must be empty",
},
{
args: []string{"name", filepath.Join("testdata", secretDataFile)},
@@ -75,6 +74,35 @@ func TestSecretCreateWithName(t *testing.T) {
assert.Equal(t, "ID-"+name, strings.TrimSpace(cli.OutBuffer().String()))
}
+func TestSecretCreateWithDriver(t *testing.T) {
+ expectedDriver := &swarm.Driver{
+ Name: "secret-driver",
+ }
+ name := "foo"
+
+ cli := test.NewFakeCli(&fakeClient{
+ secretCreateFunc: func(spec swarm.SecretSpec) (types.SecretCreateResponse, error) {
+ if spec.Name != name {
+ return types.SecretCreateResponse{}, errors.Errorf("expected name %q, got %q", name, spec.Name)
+ }
+
+ if !reflect.DeepEqual(spec.Driver.Name, expectedDriver.Name) {
+ return types.SecretCreateResponse{}, errors.Errorf("expected driver %v, got %v", expectedDriver, spec.Labels)
+ }
+
+ return types.SecretCreateResponse{
+ ID: "ID-" + spec.Name,
+ }, nil
+ },
+ })
+
+ cmd := newSecretCreateCommand(cli)
+ cmd.SetArgs([]string{name})
+ cmd.Flags().Set("driver", expectedDriver.Name)
+ assert.NoError(t, cmd.Execute())
+ assert.Equal(t, "ID-"+name, strings.TrimSpace(cli.OutBuffer().String()))
+}
+
func TestSecretCreateWithLabels(t *testing.T) {
expectedLabels := map[string]string{
"lbl1": "Label-foo",
diff --git a/vendor/github.com/docker/cli/cli/command/secret/inspect_test.go b/vendor/github.com/docker/cli/cli/command/secret/inspect_test.go
index 188f6a7c4..cb74e11ae 100644
--- a/vendor/github.com/docker/cli/cli/command/secret/inspect_test.go
+++ b/vendor/github.com/docker/cli/cli/command/secret/inspect_test.go
@@ -154,6 +154,7 @@ func TestSecretInspectPretty(t *testing.T) {
}),
SecretID("secretID"),
SecretName("secretName"),
+ SecretDriver("driver"),
SecretCreatedAt(time.Time{}),
SecretUpdatedAt(time.Time{}),
), []byte{}, nil
diff --git a/vendor/github.com/docker/cli/cli/command/secret/ls_test.go b/vendor/github.com/docker/cli/cli/command/secret/ls_test.go
index 2509e24dc..83f6742af 100644
--- a/vendor/github.com/docker/cli/cli/command/secret/ls_test.go
+++ b/vendor/github.com/docker/cli/cli/command/secret/ls_test.go
@@ -63,6 +63,7 @@ func TestSecretList(t *testing.T) {
SecretVersion(swarm.Version{Index: 11}),
SecretCreatedAt(time.Now().Add(-2*time.Hour)),
SecretUpdatedAt(time.Now().Add(-1*time.Hour)),
+ SecretDriver("driver"),
),
}, nil
},
diff --git a/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-inspect-pretty.simple.golden b/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-inspect-pretty.simple.golden
index 4e2df1fb4..37234eff7 100644
--- a/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-inspect-pretty.simple.golden
+++ b/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-inspect-pretty.simple.golden
@@ -1,6 +1,7 @@
-ID: secretID
-Name: secretName
+ID: secretID
+Name: secretName
Labels:
- lbl1=value1
-Created at: 0001-01-01 00:00:00 +0000 utc
-Updated at: 0001-01-01 00:00:00 +0000 utc
+Driver: driver
+Created at: 0001-01-01 00:00:00 +0000 utc
+Updated at: 0001-01-01 00:00:00 +0000 utc
diff --git a/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list-with-filter.golden b/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list-with-filter.golden
index 29983de8e..01ea6f3ae 100644
--- a/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list-with-filter.golden
+++ b/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list-with-filter.golden
@@ -1,3 +1,3 @@
-ID NAME CREATED UPDATED
-ID-foo foo 2 hours ago About an hour ago
-ID-bar bar 2 hours ago About an hour ago
+ID NAME DRIVER CREATED UPDATED
+ID-foo foo 2 hours ago About an hour ago
+ID-bar bar 2 hours ago About an hour ago
diff --git a/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list.golden b/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list.golden
index 29983de8e..d8c204043 100644
--- a/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list.golden
+++ b/vendor/github.com/docker/cli/cli/command/secret/testdata/secret-list.golden
@@ -1,3 +1,3 @@
-ID NAME CREATED UPDATED
-ID-foo foo 2 hours ago About an hour ago
-ID-bar bar 2 hours ago About an hour ago
+ID NAME DRIVER CREATED UPDATED
+ID-foo foo 2 hours ago About an hour ago
+ID-bar bar driver 2 hours ago About an hour ago
diff --git a/vendor/github.com/docker/cli/cli/command/service/client_test.go b/vendor/github.com/docker/cli/cli/command/service/client_test.go
index ebdfe7ea7..69c76951f 100644
--- a/vendor/github.com/docker/cli/cli/command/service/client_test.go
+++ b/vendor/github.com/docker/cli/cli/command/service/client_test.go
@@ -14,6 +14,7 @@ type fakeClient struct {
serviceInspectWithRawFunc func(ctx context.Context, serviceID string, options types.ServiceInspectOptions) (swarm.Service, []byte, error)
serviceUpdateFunc func(ctx context.Context, serviceID string, version swarm.Version, service swarm.ServiceSpec, options types.ServiceUpdateOptions) (types.ServiceUpdateResponse, error)
serviceListFunc func(context.Context, types.ServiceListOptions) ([]swarm.Service, error)
+ infoFunc func(ctx context.Context) (types.Info, error)
}
func (f *fakeClient) NodeList(ctx context.Context, options types.NodeListOptions) ([]swarm.Node, error) {
@@ -48,6 +49,13 @@ func (f *fakeClient) ServiceUpdate(ctx context.Context, serviceID string, versio
return types.ServiceUpdateResponse{}, nil
}
+func (f *fakeClient) Info(ctx context.Context) (types.Info, error) {
+ if f.infoFunc == nil {
+ return types.Info{}, nil
+ }
+ return f.infoFunc(ctx)
+}
+
func newService(id string, name string) swarm.Service {
return swarm.Service{
ID: id,
diff --git a/vendor/github.com/docker/cli/cli/command/service/create.go b/vendor/github.com/docker/cli/cli/command/service/create.go
index ecf7a37e2..84944fd23 100644
--- a/vendor/github.com/docker/cli/cli/command/service/create.go
+++ b/vendor/github.com/docker/cli/cli/command/service/create.go
@@ -123,8 +123,7 @@ func runCreate(dockerCli command.Cli, flags *pflag.FlagSet, opts *serviceOptions
fmt.Fprintf(dockerCli.Out(), "%s\n", response.ID)
- if opts.detach {
- warnDetachDefault(dockerCli.Err(), apiClient.ClientVersion(), flags, "created")
+ if opts.detach || versions.LessThan(apiClient.ClientVersion(), "1.29") {
return nil
}
diff --git a/vendor/github.com/docker/cli/cli/command/service/helpers.go b/vendor/github.com/docker/cli/cli/command/service/helpers.go
index de6878c17..f328c7059 100644
--- a/vendor/github.com/docker/cli/cli/command/service/helpers.go
+++ b/vendor/github.com/docker/cli/cli/command/service/helpers.go
@@ -1,15 +1,12 @@
package service
import (
- "fmt"
"io"
"io/ioutil"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/service/progress"
- "github.com/docker/docker/api/types/versions"
"github.com/docker/docker/pkg/jsonmessage"
- "github.com/spf13/pflag"
"golang.org/x/net/context"
)
@@ -34,11 +31,3 @@ func waitOnService(ctx context.Context, dockerCli command.Cli, serviceID string,
}
return err
}
-
-// warnDetachDefault warns about the --detach flag future change if it's supported.
-func warnDetachDefault(err io.Writer, clientVersion string, flags *pflag.FlagSet, msg string) {
- if !flags.Changed("detach") && versions.GreaterThanOrEqualTo(clientVersion, "1.29") {
- fmt.Fprintf(err, "Since --detach=false was not specified, tasks will be %s in the background.\n"+
- "In a future release, --detach=false will become the default.\n", msg)
- }
-}
diff --git a/vendor/github.com/docker/cli/cli/command/service/helpers_test.go b/vendor/github.com/docker/cli/cli/command/service/helpers_test.go
deleted file mode 100644
index 6c63209b6..000000000
--- a/vendor/github.com/docker/cli/cli/command/service/helpers_test.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package service
-
-import (
- "bytes"
- "testing"
-
- "github.com/spf13/pflag"
- "github.com/stretchr/testify/assert"
-)
-
-func TestWarnDetachDefault(t *testing.T) {
- var detach bool
- flags := pflag.NewFlagSet("test", pflag.ContinueOnError)
- addDetachFlag(flags, &detach)
-
- var tests = []struct {
- detach bool
- version string
-
- expectWarning bool
- }{
- {true, "1.28", false},
- {true, "1.29", false},
- {false, "1.28", false},
- {false, "1.29", true},
- }
-
- for _, test := range tests {
- out := new(bytes.Buffer)
- flags.Lookup(flagDetach).Changed = test.detach
-
- warnDetachDefault(out, test.version, flags, "")
-
- if test.expectWarning {
- assert.NotEmpty(t, out.String(), "expected warning")
- } else {
- assert.Empty(t, out.String(), "expected no warning")
- }
- }
-}
diff --git a/vendor/github.com/docker/cli/cli/command/service/inspect_test.go b/vendor/github.com/docker/cli/cli/command/service/inspect_test.go
index e7b34da21..d46419720 100644
--- a/vendor/github.com/docker/cli/cli/command/service/inspect_test.go
+++ b/vendor/github.com/docker/cli/cli/command/service/inspect_test.go
@@ -41,7 +41,7 @@ func formatServiceInspect(t *testing.T, format formatter.Format, now time.Time)
Labels: map[string]string{"com.label": "foo"},
},
TaskTemplate: swarm.TaskSpec{
- ContainerSpec: swarm.ContainerSpec{
+ ContainerSpec: &swarm.ContainerSpec{
Image: "foo/bar@sha256:this_is_a_test",
},
Networks: []swarm.NetworkAttachmentConfig{
diff --git a/vendor/github.com/docker/cli/cli/command/service/logs.go b/vendor/github.com/docker/cli/cli/command/service/logs.go
index 3d3b3f1d4..0482a8794 100644
--- a/vendor/github.com/docker/cli/cli/command/service/logs.go
+++ b/vendor/github.com/docker/cli/cli/command/service/logs.go
@@ -13,6 +13,7 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/idresolver"
+ "github.com/docker/cli/service/logs"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/swarm"
"github.com/docker/docker/client"
@@ -257,7 +258,7 @@ func (lw *logWriter) Write(buf []byte) (int, error) {
return 0, errors.Errorf("invalid context in log message: %v", string(buf))
}
// parse the details out
- details, err := client.ParseLogDetails(string(parts[detailsIndex]))
+ details, err := logs.ParseLogDetails(string(parts[detailsIndex]))
if err != nil {
return 0, err
}
diff --git a/vendor/github.com/docker/cli/cli/command/service/opts.go b/vendor/github.com/docker/cli/cli/command/service/opts.go
index f2381881d..37369f595 100644
--- a/vendor/github.com/docker/cli/cli/command/service/opts.go
+++ b/vendor/github.com/docker/cli/cli/command/service/opts.go
@@ -592,7 +592,7 @@ func (options *serviceOptions) ToService(ctx context.Context, apiClient client.N
Labels: opts.ConvertKVStringsToMap(options.labels.GetAll()),
},
TaskTemplate: swarm.TaskSpec{
- ContainerSpec: swarm.ContainerSpec{
+ ContainerSpec: &swarm.ContainerSpec{
Image: options.image,
Args: options.args,
Command: options.entrypoint.Value(),
@@ -691,7 +691,7 @@ func buildServiceDefaultFlagMapping() flagDefaults {
}
func addDetachFlag(flags *pflag.FlagSet, detach *bool) {
- flags.BoolVarP(detach, flagDetach, "d", true, "Exit immediately instead of waiting for the service to converge")
+ flags.BoolVarP(detach, flagDetach, "d", false, "Exit immediately instead of waiting for the service to converge")
flags.SetAnnotation(flagDetach, "version", []string{"1.29"})
}
diff --git a/vendor/github.com/docker/cli/cli/command/service/ps.go b/vendor/github.com/docker/cli/cli/command/service/ps.go
index 07dbba723..e441f9e1a 100644
--- a/vendor/github.com/docker/cli/cli/command/service/ps.go
+++ b/vendor/github.com/docker/cli/cli/command/service/ps.go
@@ -56,6 +56,9 @@ func runPS(dockerCli command.Cli, options psOptions) error {
if err != nil {
return err
}
+ if err := updateNodeFilter(ctx, client, filter); err != nil {
+ return err
+ }
tasks, err := client.TaskList(ctx, types.TaskListOptions{Filters: filter})
if err != nil {
@@ -130,16 +133,20 @@ loop:
if serviceCount == 0 {
return filter, nil, errors.New(strings.Join(notfound, "\n"))
}
+ return filter, notfound, err
+}
+
+func updateNodeFilter(ctx context.Context, client client.APIClient, filter filters.Args) error {
if filter.Include("node") {
nodeFilters := filter.Get("node")
for _, nodeFilter := range nodeFilters {
nodeReference, err := node.Reference(ctx, client, nodeFilter)
if err != nil {
- return filter, nil, err
+ return err
}
filter.Del("node", nodeFilter)
filter.Add("node", nodeReference)
}
}
- return filter, notfound, err
+ return nil
}
diff --git a/vendor/github.com/docker/cli/cli/command/service/ps_test.go b/vendor/github.com/docker/cli/cli/command/service/ps_test.go
index 1913202d3..be2687028 100644
--- a/vendor/github.com/docker/cli/cli/command/service/ps_test.go
+++ b/vendor/github.com/docker/cli/cli/command/service/ps_test.go
@@ -89,3 +89,25 @@ func TestRunPSWarnsOnNotFound(t *testing.T) {
err := runPS(cli, options)
assert.EqualError(t, err, "no such service: bar")
}
+
+func TestUpdateNodeFilter(t *testing.T) {
+ selfNodeID := "foofoo"
+ filter := filters.NewArgs()
+ filter.Add("node", "one")
+ filter.Add("node", "two")
+ filter.Add("node", "self")
+
+ client := &fakeClient{
+ infoFunc: func(_ context.Context) (types.Info, error) {
+ return types.Info{Swarm: swarm.Info{NodeID: selfNodeID}}, nil
+ },
+ }
+
+ updateNodeFilter(context.Background(), client, filter)
+
+ expected := filters.NewArgs()
+ expected.Add("node", "one")
+ expected.Add("node", "two")
+ expected.Add("node", selfNodeID)
+ assert.Equal(t, expected, filter)
+}
diff --git a/vendor/github.com/docker/cli/cli/command/service/rollback.go b/vendor/github.com/docker/cli/cli/command/service/rollback.go
index 5cef65625..375e6d510 100644
--- a/vendor/github.com/docker/cli/cli/command/service/rollback.go
+++ b/vendor/github.com/docker/cli/cli/command/service/rollback.go
@@ -7,8 +7,8 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
+ "github.com/docker/docker/api/types/versions"
"github.com/spf13/cobra"
- "github.com/spf13/pflag"
)
func newRollbackCommand(dockerCli command.Cli) *cobra.Command {
@@ -19,7 +19,7 @@ func newRollbackCommand(dockerCli command.Cli) *cobra.Command {
Short: "Revert changes to a service's configuration",
Args: cli.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
- return runRollback(dockerCli, cmd.Flags(), options, args[0])
+ return runRollback(dockerCli, options, args[0])
},
Tags: map[string]string{"version": "1.31"},
}
@@ -31,7 +31,7 @@ func newRollbackCommand(dockerCli command.Cli) *cobra.Command {
return cmd
}
-func runRollback(dockerCli command.Cli, flags *pflag.FlagSet, options *serviceOptions, serviceID string) error {
+func runRollback(dockerCli command.Cli, options *serviceOptions, serviceID string) error {
apiClient := dockerCli.Client()
ctx := context.Background()
@@ -56,8 +56,7 @@ func runRollback(dockerCli command.Cli, flags *pflag.FlagSet, options *serviceOp
fmt.Fprintf(dockerCli.Out(), "%s\n", serviceID)
- if options.detach {
- warnDetachDefault(dockerCli.Err(), apiClient.ClientVersion(), flags, "rolled back")
+ if options.detach || versions.LessThan(apiClient.ClientVersion(), "1.29") {
return nil
}
diff --git a/vendor/github.com/docker/cli/cli/command/service/scale.go b/vendor/github.com/docker/cli/cli/command/service/scale.go
index 4910d4fa5..d38b01b4b 100644
--- a/vendor/github.com/docker/cli/cli/command/service/scale.go
+++ b/vendor/github.com/docker/cli/cli/command/service/scale.go
@@ -10,9 +10,9 @@ import (
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/docker/api/types"
+ "github.com/docker/docker/api/types/versions"
"github.com/pkg/errors"
"github.com/spf13/cobra"
- "github.com/spf13/pflag"
)
type scaleOptions struct {
@@ -27,7 +27,7 @@ func newScaleCommand(dockerCli command.Cli) *cobra.Command {
Short: "Scale one or multiple replicated services",
Args: scaleArgs,
RunE: func(cmd *cobra.Command, args []string) error {
- return runScale(dockerCli, cmd.Flags(), options, args)
+ return runScale(dockerCli, options, args)
},
}
@@ -54,7 +54,7 @@ func scaleArgs(cmd *cobra.Command, args []string) error {
return nil
}
-func runScale(dockerCli command.Cli, flags *pflag.FlagSet, options *scaleOptions, args []string) error {
+func runScale(dockerCli command.Cli, options *scaleOptions, args []string) error {
var errs []string
var serviceIDs []string
ctx := context.Background()
@@ -79,9 +79,7 @@ func runScale(dockerCli command.Cli, flags *pflag.FlagSet, options *scaleOptions
}
if len(serviceIDs) > 0 {
- if options.detach {
- warnDetachDefault(dockerCli.Err(), dockerCli.Client().ClientVersion(), flags, "scaled")
- } else {
+ if !options.detach && versions.GreaterThanOrEqualTo(dockerCli.Client().ClientVersion(), "1.29") {
for _, serviceID := range serviceIDs {
if err := waitOnService(ctx, dockerCli, serviceID, false); err != nil {
errs = append(errs, fmt.Sprintf("%s: %v", serviceID, err))
diff --git a/vendor/github.com/docker/cli/cli/command/service/trust.go b/vendor/github.com/docker/cli/cli/command/service/trust.go
index ec199a770..e1be1e203 100644
--- a/vendor/github.com/docker/cli/cli/command/service/trust.go
+++ b/vendor/github.com/docker/cli/cli/command/service/trust.go
@@ -3,7 +3,6 @@ package service
import (
"encoding/hex"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/trust"
"github.com/docker/distribution/reference"
@@ -12,6 +11,7 @@ import (
"github.com/docker/notary/tuf/data"
"github.com/opencontainers/go-digest"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
"golang.org/x/net/context"
)
diff --git a/vendor/github.com/docker/cli/cli/command/service/update.go b/vendor/github.com/docker/cli/cli/command/service/update.go
index 90057aded..6ee0dfc74 100644
--- a/vendor/github.com/docker/cli/cli/command/service/update.go
+++ b/vendor/github.com/docker/cli/cli/command/service/update.go
@@ -216,8 +216,7 @@ func runUpdate(dockerCli command.Cli, flags *pflag.FlagSet, options *serviceOpti
fmt.Fprintf(dockerCli.Out(), "%s\n", serviceID)
- if options.detach {
- warnDetachDefault(dockerCli.Err(), dockerCli.Client().ClientVersion(), flags, "updated")
+ if options.detach || versions.LessThan(apiClient.ClientVersion(), "1.29") {
return nil
}
@@ -270,7 +269,7 @@ func updateService(ctx context.Context, apiClient client.NetworkAPIClient, flags
}
}
- cspec := &spec.TaskTemplate.ContainerSpec
+ cspec := spec.TaskTemplate.ContainerSpec
task := &spec.TaskTemplate
taskResources := func() *swarm.ResourceRequirements {
diff --git a/vendor/github.com/docker/cli/cli/command/service/update_test.go b/vendor/github.com/docker/cli/cli/command/service/update_test.go
index 8f49d52ab..69e5fa1b1 100644
--- a/vendor/github.com/docker/cli/cli/command/service/update_test.go
+++ b/vendor/github.com/docker/cli/cli/command/service/update_test.go
@@ -19,8 +19,12 @@ func TestUpdateServiceArgs(t *testing.T) {
flags := newUpdateCommand(nil).Flags()
flags.Set("args", "the \"new args\"")
- spec := &swarm.ServiceSpec{}
- cspec := &spec.TaskTemplate.ContainerSpec
+ spec := &swarm.ServiceSpec{
+ TaskTemplate: swarm.TaskSpec{
+ ContainerSpec: &swarm.ContainerSpec{},
+ },
+ }
+ cspec := spec.TaskTemplate.ContainerSpec
cspec.Args = []string{"old", "args"}
updateService(nil, nil, flags, spec)
@@ -452,8 +456,12 @@ func TestUpdateSecretUpdateInPlace(t *testing.T) {
}
func TestUpdateReadOnly(t *testing.T) {
- spec := &swarm.ServiceSpec{}
- cspec := &spec.TaskTemplate.ContainerSpec
+ spec := &swarm.ServiceSpec{
+ TaskTemplate: swarm.TaskSpec{
+ ContainerSpec: &swarm.ContainerSpec{},
+ },
+ }
+ cspec := spec.TaskTemplate.ContainerSpec
// Update with --read-only=true, changed to true
flags := newUpdateCommand(nil).Flags()
@@ -474,8 +482,12 @@ func TestUpdateReadOnly(t *testing.T) {
}
func TestUpdateStopSignal(t *testing.T) {
- spec := &swarm.ServiceSpec{}
- cspec := &spec.TaskTemplate.ContainerSpec
+ spec := &swarm.ServiceSpec{
+ TaskTemplate: swarm.TaskSpec{
+ ContainerSpec: &swarm.ContainerSpec{},
+ },
+ }
+ cspec := spec.TaskTemplate.ContainerSpec
// Update with --stop-signal=SIGUSR1
flags := newUpdateCommand(nil).Flags()
diff --git a/vendor/github.com/docker/cli/cli/command/stack/deploy_bundlefile.go b/vendor/github.com/docker/cli/cli/command/stack/deploy_bundlefile.go
index 1074210e9..5c4d4546f 100644
--- a/vendor/github.com/docker/cli/cli/command/stack/deploy_bundlefile.go
+++ b/vendor/github.com/docker/cli/cli/command/stack/deploy_bundlefile.go
@@ -64,7 +64,7 @@ func deployBundle(ctx context.Context, dockerCli command.Cli, opts deployOptions
Labels: convert.AddStackLabel(namespace, service.Labels),
},
TaskTemplate: swarm.TaskSpec{
- ContainerSpec: swarm.ContainerSpec{
+ ContainerSpec: &swarm.ContainerSpec{
Image: service.Image,
Command: service.Command,
Args: service.Args,
diff --git a/vendor/github.com/docker/cli/cli/command/stack/deploy_test.go b/vendor/github.com/docker/cli/cli/command/stack/deploy_test.go
index f10fecd1a..15900f178 100644
--- a/vendor/github.com/docker/cli/cli/command/stack/deploy_test.go
+++ b/vendor/github.com/docker/cli/cli/command/stack/deploy_test.go
@@ -45,7 +45,7 @@ func TestServiceUpdateResolveImageChanged(t *testing.T) {
Labels: map[string]string{"com.docker.stack.image": "foobar:1.2.3"},
},
TaskTemplate: swarm.TaskSpec{
- ContainerSpec: swarm.ContainerSpec{
+ ContainerSpec: &swarm.ContainerSpec{
Image: "foobar:1.2.3@sha256:deadbeef",
},
},
@@ -86,7 +86,7 @@ func TestServiceUpdateResolveImageChanged(t *testing.T) {
spec := map[string]swarm.ServiceSpec{
"myservice": {
TaskTemplate: swarm.TaskSpec{
- ContainerSpec: swarm.ContainerSpec{
+ ContainerSpec: &swarm.ContainerSpec{
Image: testcase.image,
},
},
diff --git a/vendor/github.com/docker/cli/cli/command/stack/ps.go b/vendor/github.com/docker/cli/cli/command/stack/ps.go
index 25bd1eee1..d586b1e1e 100644
--- a/vendor/github.com/docker/cli/cli/command/stack/ps.go
+++ b/vendor/github.com/docker/cli/cli/command/stack/ps.go
@@ -57,8 +57,7 @@ func runPS(dockerCli command.Cli, options psOptions) error {
}
if len(tasks) == 0 {
- fmt.Fprintf(dockerCli.Err(), "Nothing found in stack: %s\n", namespace)
- return nil
+ return fmt.Errorf("nothing found in stack: %s", namespace)
}
format := options.format
diff --git a/vendor/github.com/docker/cli/cli/command/stack/ps_test.go b/vendor/github.com/docker/cli/cli/command/stack/ps_test.go
index 282e5e01d..3bb22609b 100644
--- a/vendor/github.com/docker/cli/cli/command/stack/ps_test.go
+++ b/vendor/github.com/docker/cli/cli/command/stack/ps_test.go
@@ -60,9 +60,9 @@ func TestStackPsEmptyStack(t *testing.T) {
cmd := newPsCommand(fakeCli)
cmd.SetArgs([]string{"foo"})
- assert.NoError(t, cmd.Execute())
+ assert.Error(t, cmd.Execute())
+ assert.EqualError(t, cmd.Execute(), "nothing found in stack: foo")
assert.Equal(t, "", fakeCli.OutBuffer().String())
- assert.Equal(t, "Nothing found in stack: foo\n", fakeCli.ErrBuffer().String())
}
func TestStackPsWithQuietOption(t *testing.T) {
diff --git a/vendor/github.com/docker/cli/cli/command/stack/remove.go b/vendor/github.com/docker/cli/cli/command/stack/remove.go
index d95171aab..d595b6c3e 100644
--- a/vendor/github.com/docker/cli/cli/command/stack/remove.go
+++ b/vendor/github.com/docker/cli/cli/command/stack/remove.go
@@ -2,6 +2,7 @@ package stack
import (
"fmt"
+ "sort"
"strings"
"github.com/docker/cli/cli"
@@ -88,14 +89,21 @@ func runRemove(dockerCli command.Cli, opts removeOptions) error {
return nil
}
+func sortServiceByName(services []swarm.Service) func(i, j int) bool {
+ return func(i, j int) bool {
+ return services[i].Spec.Name < services[j].Spec.Name
+ }
+}
+
func removeServices(
ctx context.Context,
dockerCli command.Cli,
services []swarm.Service,
) bool {
var hasError bool
+ sort.Slice(services, sortServiceByName(services))
for _, service := range services {
- fmt.Fprintf(dockerCli.Err(), "Removing service %s\n", service.Spec.Name)
+ fmt.Fprintf(dockerCli.Out(), "Removing service %s\n", service.Spec.Name)
if err := dockerCli.Client().ServiceRemove(ctx, service.ID); err != nil {
hasError = true
fmt.Fprintf(dockerCli.Err(), "Failed to remove service %s: %s", service.ID, err)
@@ -111,7 +119,7 @@ func removeNetworks(
) bool {
var hasError bool
for _, network := range networks {
- fmt.Fprintf(dockerCli.Err(), "Removing network %s\n", network.Name)
+ fmt.Fprintf(dockerCli.Out(), "Removing network %s\n", network.Name)
if err := dockerCli.Client().NetworkRemove(ctx, network.ID); err != nil {
hasError = true
fmt.Fprintf(dockerCli.Err(), "Failed to remove network %s: %s", network.ID, err)
@@ -127,7 +135,7 @@ func removeSecrets(
) bool {
var hasError bool
for _, secret := range secrets {
- fmt.Fprintf(dockerCli.Err(), "Removing secret %s\n", secret.Spec.Name)
+ fmt.Fprintf(dockerCli.Out(), "Removing secret %s\n", secret.Spec.Name)
if err := dockerCli.Client().SecretRemove(ctx, secret.ID); err != nil {
hasError = true
fmt.Fprintf(dockerCli.Err(), "Failed to remove secret %s: %s", secret.ID, err)
@@ -143,7 +151,7 @@ func removeConfigs(
) bool {
var hasError bool
for _, config := range configs {
- fmt.Fprintf(dockerCli.Err(), "Removing config %s\n", config.Spec.Name)
+ fmt.Fprintf(dockerCli.Out(), "Removing config %s\n", config.Spec.Name)
if err := dockerCli.Client().ConfigRemove(ctx, config.ID); err != nil {
hasError = true
fmt.Fprintf(dockerCli.Err(), "Failed to remove config %s: %s", config.ID, err)
diff --git a/vendor/github.com/docker/cli/cli/command/stack/remove_test.go b/vendor/github.com/docker/cli/cli/command/stack/remove_test.go
index c44977c0c..0ce5cdacf 100644
--- a/vendor/github.com/docker/cli/cli/command/stack/remove_test.go
+++ b/vendor/github.com/docker/cli/cli/command/stack/remove_test.go
@@ -101,7 +101,13 @@ func TestRemoveStackSkipEmpty(t *testing.T) {
cmd.SetArgs([]string{"foo", "bar"})
assert.NoError(t, cmd.Execute())
- assert.Equal(t, "", fakeCli.OutBuffer().String())
+ expectedList := []string{"Removing service bar_service1",
+ "Removing service bar_service2",
+ "Removing secret bar_secret1",
+ "Removing config bar_config1",
+ "Removing network bar_network1\n",
+ }
+ assert.Equal(t, strings.Join(expectedList, "\n"), fakeCli.OutBuffer().String())
assert.Contains(t, fakeCli.ErrBuffer().String(), "Nothing found in stack: foo\n")
assert.Equal(t, allServiceIDs, fakeClient.removedServices)
assert.Equal(t, allNetworkIDs, fakeClient.removedNetworks)
diff --git a/vendor/github.com/docker/cli/cli/command/system/info.go b/vendor/github.com/docker/cli/cli/command/system/info.go
index 73f176543..9d366466a 100644
--- a/vendor/github.com/docker/cli/cli/command/system/info.go
+++ b/vendor/github.com/docker/cli/cli/command/system/info.go
@@ -54,109 +54,51 @@ func runInfo(dockerCli *command.DockerCli, opts *infoOptions) error {
}
// nolint: gocyclo
-func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
- fmt.Fprintf(dockerCli.Out(), "Containers: %d\n", info.Containers)
- fmt.Fprintf(dockerCli.Out(), " Running: %d\n", info.ContainersRunning)
- fmt.Fprintf(dockerCli.Out(), " Paused: %d\n", info.ContainersPaused)
- fmt.Fprintf(dockerCli.Out(), " Stopped: %d\n", info.ContainersStopped)
- fmt.Fprintf(dockerCli.Out(), "Images: %d\n", info.Images)
- fprintfIfNotEmpty(dockerCli.Out(), "Server Version: %s\n", info.ServerVersion)
- fprintfIfNotEmpty(dockerCli.Out(), "Storage Driver: %s\n", info.Driver)
+func prettyPrintInfo(dockerCli command.Cli, info types.Info) error {
+ fmt.Fprintln(dockerCli.Out(), "Containers:", info.Containers)
+ fmt.Fprintln(dockerCli.Out(), " Running:", info.ContainersRunning)
+ fmt.Fprintln(dockerCli.Out(), " Paused:", info.ContainersPaused)
+ fmt.Fprintln(dockerCli.Out(), " Stopped:", info.ContainersStopped)
+ fmt.Fprintln(dockerCli.Out(), "Images:", info.Images)
+ fprintlnNonEmpty(dockerCli.Out(), "Server Version:", info.ServerVersion)
+ fprintlnNonEmpty(dockerCli.Out(), "Storage Driver:", info.Driver)
if info.DriverStatus != nil {
for _, pair := range info.DriverStatus {
fmt.Fprintf(dockerCli.Out(), " %s: %s\n", pair[0], pair[1])
}
-
}
if info.SystemStatus != nil {
for _, pair := range info.SystemStatus {
fmt.Fprintf(dockerCli.Out(), "%s: %s\n", pair[0], pair[1])
}
}
- fprintfIfNotEmpty(dockerCli.Out(), "Logging Driver: %s\n", info.LoggingDriver)
- fprintfIfNotEmpty(dockerCli.Out(), "Cgroup Driver: %s\n", info.CgroupDriver)
+ fprintlnNonEmpty(dockerCli.Out(), "Logging Driver:", info.LoggingDriver)
+ fprintlnNonEmpty(dockerCli.Out(), "Cgroup Driver:", info.CgroupDriver)
- fmt.Fprintf(dockerCli.Out(), "Plugins: \n")
- fmt.Fprintf(dockerCli.Out(), " Volume:")
- fmt.Fprintf(dockerCli.Out(), " %s", strings.Join(info.Plugins.Volume, " "))
- fmt.Fprintf(dockerCli.Out(), "\n")
- fmt.Fprintf(dockerCli.Out(), " Network:")
- fmt.Fprintf(dockerCli.Out(), " %s", strings.Join(info.Plugins.Network, " "))
- fmt.Fprintf(dockerCli.Out(), "\n")
+ fmt.Fprintln(dockerCli.Out(), "Plugins:")
+ fmt.Fprintln(dockerCli.Out(), " Volume:", strings.Join(info.Plugins.Volume, " "))
+ fmt.Fprintln(dockerCli.Out(), " Network:", strings.Join(info.Plugins.Network, " "))
if len(info.Plugins.Authorization) != 0 {
- fmt.Fprintf(dockerCli.Out(), " Authorization:")
- fmt.Fprintf(dockerCli.Out(), " %s", strings.Join(info.Plugins.Authorization, " "))
- fmt.Fprintf(dockerCli.Out(), "\n")
+ fmt.Fprintln(dockerCli.Out(), " Authorization:", strings.Join(info.Plugins.Authorization, " "))
}
- fmt.Fprintf(dockerCli.Out(), " Log:")
- fmt.Fprintf(dockerCli.Out(), " %s", strings.Join(info.Plugins.Log, " "))
- fmt.Fprintf(dockerCli.Out(), "\n")
+ fmt.Fprintln(dockerCli.Out(), " Log:", strings.Join(info.Plugins.Log, " "))
- fmt.Fprintf(dockerCli.Out(), "Swarm: %v\n", info.Swarm.LocalNodeState)
- if info.Swarm.LocalNodeState != swarm.LocalNodeStateInactive && info.Swarm.LocalNodeState != swarm.LocalNodeStateLocked {
- fmt.Fprintf(dockerCli.Out(), " NodeID: %s\n", info.Swarm.NodeID)
- if info.Swarm.Error != "" {
- fmt.Fprintf(dockerCli.Out(), " Error: %v\n", info.Swarm.Error)
- }
- fmt.Fprintf(dockerCli.Out(), " Is Manager: %v\n", info.Swarm.ControlAvailable)
- if info.Swarm.Cluster != nil && info.Swarm.ControlAvailable && info.Swarm.Error == "" && info.Swarm.LocalNodeState != swarm.LocalNodeStateError {
- fmt.Fprintf(dockerCli.Out(), " ClusterID: %s\n", info.Swarm.Cluster.ID)
- fmt.Fprintf(dockerCli.Out(), " Managers: %d\n", info.Swarm.Managers)
- fmt.Fprintf(dockerCli.Out(), " Nodes: %d\n", info.Swarm.Nodes)
- fmt.Fprintf(dockerCli.Out(), " Orchestration:\n")
- taskHistoryRetentionLimit := int64(0)
- if info.Swarm.Cluster.Spec.Orchestration.TaskHistoryRetentionLimit != nil {
- taskHistoryRetentionLimit = *info.Swarm.Cluster.Spec.Orchestration.TaskHistoryRetentionLimit
- }
- fmt.Fprintf(dockerCli.Out(), " Task History Retention Limit: %d\n", taskHistoryRetentionLimit)
- fmt.Fprintf(dockerCli.Out(), " Raft:\n")
- fmt.Fprintf(dockerCli.Out(), " Snapshot Interval: %d\n", info.Swarm.Cluster.Spec.Raft.SnapshotInterval)
- if info.Swarm.Cluster.Spec.Raft.KeepOldSnapshots != nil {
- fmt.Fprintf(dockerCli.Out(), " Number of Old Snapshots to Retain: %d\n", *info.Swarm.Cluster.Spec.Raft.KeepOldSnapshots)
- }
- fmt.Fprintf(dockerCli.Out(), " Heartbeat Tick: %d\n", info.Swarm.Cluster.Spec.Raft.HeartbeatTick)
- fmt.Fprintf(dockerCli.Out(), " Election Tick: %d\n", info.Swarm.Cluster.Spec.Raft.ElectionTick)
- fmt.Fprintf(dockerCli.Out(), " Dispatcher:\n")
- fmt.Fprintf(dockerCli.Out(), " Heartbeat Period: %s\n", units.HumanDuration(info.Swarm.Cluster.Spec.Dispatcher.HeartbeatPeriod))
- fmt.Fprintf(dockerCli.Out(), " CA Configuration:\n")
- fmt.Fprintf(dockerCli.Out(), " Expiry Duration: %s\n", units.HumanDuration(info.Swarm.Cluster.Spec.CAConfig.NodeCertExpiry))
- fmt.Fprintf(dockerCli.Out(), " Force Rotate: %d\n", info.Swarm.Cluster.Spec.CAConfig.ForceRotate)
- fprintfIfNotEmpty(dockerCli.Out(), " Signing CA Certificate: \n%s\n\n", strings.TrimSpace(info.Swarm.Cluster.Spec.CAConfig.SigningCACert))
- if len(info.Swarm.Cluster.Spec.CAConfig.ExternalCAs) > 0 {
- fmt.Fprintf(dockerCli.Out(), " External CAs:\n")
- for _, entry := range info.Swarm.Cluster.Spec.CAConfig.ExternalCAs {
- fmt.Fprintf(dockerCli.Out(), " %s: %s\n", entry.Protocol, entry.URL)
- }
- }
- fmt.Fprintf(dockerCli.Out(), " Root Rotation In Progress: %v\n", info.Swarm.Cluster.RootRotationInProgress)
- }
- fmt.Fprintf(dockerCli.Out(), " Node Address: %s\n", info.Swarm.NodeAddr)
- managers := []string{}
- for _, entry := range info.Swarm.RemoteManagers {
- managers = append(managers, entry.Addr)
- }
- if len(managers) > 0 {
- sort.Strings(managers)
- fmt.Fprintf(dockerCli.Out(), " Manager Addresses:\n")
- for _, entry := range managers {
- fmt.Fprintf(dockerCli.Out(), " %s\n", entry)
- }
- }
- }
+ fmt.Fprintln(dockerCli.Out(), "Swarm:", info.Swarm.LocalNodeState)
+ printSwarmInfo(dockerCli, info)
if len(info.Runtimes) > 0 {
- fmt.Fprintf(dockerCli.Out(), "Runtimes:")
+ fmt.Fprint(dockerCli.Out(), "Runtimes:")
for name := range info.Runtimes {
fmt.Fprintf(dockerCli.Out(), " %s", name)
}
fmt.Fprint(dockerCli.Out(), "\n")
- fmt.Fprintf(dockerCli.Out(), "Default Runtime: %s\n", info.DefaultRuntime)
+ fmt.Fprintln(dockerCli.Out(), "Default Runtime:", info.DefaultRuntime)
}
if info.OSType == "linux" {
- fmt.Fprintf(dockerCli.Out(), "Init Binary: %v\n", info.InitBinary)
+ fmt.Fprintln(dockerCli.Out(), "Init Binary:", info.InitBinary)
for _, ci := range []struct {
Name string
@@ -170,23 +112,23 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
if ci.Commit.ID != ci.Commit.Expected {
fmt.Fprintf(dockerCli.Out(), " (expected: %s)", ci.Commit.Expected)
}
- fmt.Fprintf(dockerCli.Out(), "\n")
+ fmt.Fprint(dockerCli.Out(), "\n")
}
if len(info.SecurityOptions) != 0 {
kvs, err := types.DecodeSecurityOptions(info.SecurityOptions)
if err != nil {
return err
}
- fmt.Fprintf(dockerCli.Out(), "Security Options:\n")
+ fmt.Fprintln(dockerCli.Out(), "Security Options:")
for _, so := range kvs {
- fmt.Fprintf(dockerCli.Out(), " %s\n", so.Name)
+ fmt.Fprintln(dockerCli.Out(), " "+so.Name)
for _, o := range so.Options {
switch o.Key {
case "profile":
if o.Value != "default" {
- fmt.Fprintf(dockerCli.Err(), " WARNING: You're not using the default seccomp profile\n")
+ fmt.Fprintln(dockerCli.Err(), " WARNING: You're not using the default seccomp profile")
}
- fmt.Fprintf(dockerCli.Out(), " Profile: %s\n", o.Value)
+ fmt.Fprintln(dockerCli.Out(), " Profile:", o.Value)
}
}
}
@@ -195,44 +137,44 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
// Isolation only has meaning on a Windows daemon.
if info.OSType == "windows" {
- fmt.Fprintf(dockerCli.Out(), "Default Isolation: %v\n", info.Isolation)
+ fmt.Fprintln(dockerCli.Out(), "Default Isolation:", info.Isolation)
}
- fprintfIfNotEmpty(dockerCli.Out(), "Kernel Version: %s\n", info.KernelVersion)
- fprintfIfNotEmpty(dockerCli.Out(), "Operating System: %s\n", info.OperatingSystem)
- fprintfIfNotEmpty(dockerCli.Out(), "OSType: %s\n", info.OSType)
- fprintfIfNotEmpty(dockerCli.Out(), "Architecture: %s\n", info.Architecture)
- fmt.Fprintf(dockerCli.Out(), "CPUs: %d\n", info.NCPU)
- fmt.Fprintf(dockerCli.Out(), "Total Memory: %s\n", units.BytesSize(float64(info.MemTotal)))
- fprintfIfNotEmpty(dockerCli.Out(), "Name: %s\n", info.Name)
- fprintfIfNotEmpty(dockerCli.Out(), "ID: %s\n", info.ID)
- fmt.Fprintf(dockerCli.Out(), "Docker Root Dir: %s\n", info.DockerRootDir)
- fmt.Fprintf(dockerCli.Out(), "Debug Mode (client): %v\n", debug.IsEnabled())
- fmt.Fprintf(dockerCli.Out(), "Debug Mode (server): %v\n", info.Debug)
+ fprintlnNonEmpty(dockerCli.Out(), "Kernel Version:", info.KernelVersion)
+ fprintlnNonEmpty(dockerCli.Out(), "Operating System:", info.OperatingSystem)
+ fprintlnNonEmpty(dockerCli.Out(), "OSType:", info.OSType)
+ fprintlnNonEmpty(dockerCli.Out(), "Architecture:", info.Architecture)
+ fmt.Fprintln(dockerCli.Out(), "CPUs:", info.NCPU)
+ fmt.Fprintln(dockerCli.Out(), "Total Memory:", units.BytesSize(float64(info.MemTotal)))
+ fprintlnNonEmpty(dockerCli.Out(), "Name:", info.Name)
+ fprintlnNonEmpty(dockerCli.Out(), "ID:", info.ID)
+ fmt.Fprintln(dockerCli.Out(), "Docker Root Dir:", info.DockerRootDir)
+ fmt.Fprintln(dockerCli.Out(), "Debug Mode (client):", debug.IsEnabled())
+ fmt.Fprintln(dockerCli.Out(), "Debug Mode (server):", info.Debug)
if info.Debug {
- fmt.Fprintf(dockerCli.Out(), " File Descriptors: %d\n", info.NFd)
- fmt.Fprintf(dockerCli.Out(), " Goroutines: %d\n", info.NGoroutines)
- fmt.Fprintf(dockerCli.Out(), " System Time: %s\n", info.SystemTime)
- fmt.Fprintf(dockerCli.Out(), " EventsListeners: %d\n", info.NEventsListener)
+ fmt.Fprintln(dockerCli.Out(), " File Descriptors:", info.NFd)
+ fmt.Fprintln(dockerCli.Out(), " Goroutines:", info.NGoroutines)
+ fmt.Fprintln(dockerCli.Out(), " System Time:", info.SystemTime)
+ fmt.Fprintln(dockerCli.Out(), " EventsListeners:", info.NEventsListener)
}
- fprintfIfNotEmpty(dockerCli.Out(), "Http Proxy: %s\n", info.HTTPProxy)
- fprintfIfNotEmpty(dockerCli.Out(), "Https Proxy: %s\n", info.HTTPSProxy)
- fprintfIfNotEmpty(dockerCli.Out(), "No Proxy: %s\n", info.NoProxy)
+ fprintlnNonEmpty(dockerCli.Out(), "HTTP Proxy:", info.HTTPProxy)
+ fprintlnNonEmpty(dockerCli.Out(), "HTTPS Proxy:", info.HTTPSProxy)
+ fprintlnNonEmpty(dockerCli.Out(), "No Proxy:", info.NoProxy)
if info.IndexServerAddress != "" {
u := dockerCli.ConfigFile().AuthConfigs[info.IndexServerAddress].Username
if len(u) > 0 {
- fmt.Fprintf(dockerCli.Out(), "Username: %v\n", u)
+ fmt.Fprintln(dockerCli.Out(), "Username:", u)
}
- fmt.Fprintf(dockerCli.Out(), "Registry: %v\n", info.IndexServerAddress)
+ fmt.Fprintln(dockerCli.Out(), "Registry:", info.IndexServerAddress)
}
if info.Labels != nil {
fmt.Fprintln(dockerCli.Out(), "Labels:")
- for _, attribute := range info.Labels {
- fmt.Fprintf(dockerCli.Out(), " %s\n", attribute)
+ for _, lbl := range info.Labels {
+ fmt.Fprintln(dockerCli.Out(), " "+lbl)
}
// TODO: Engine labels with duplicate keys has been deprecated in 1.13 and will be error out
// after 3 release cycles (17.12). For now, a WARNING will be generated. The following will
@@ -251,20 +193,15 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
}
}
- fmt.Fprintf(dockerCli.Out(), "Experimental: %v\n", info.ExperimentalBuild)
- if info.ClusterStore != "" {
- fmt.Fprintf(dockerCli.Out(), "Cluster Store: %s\n", info.ClusterStore)
- }
-
- if info.ClusterAdvertise != "" {
- fmt.Fprintf(dockerCli.Out(), "Cluster Advertise: %s\n", info.ClusterAdvertise)
- }
+ fmt.Fprintln(dockerCli.Out(), "Experimental:", info.ExperimentalBuild)
+ fprintlnNonEmpty(dockerCli.Out(), "Cluster Store:", info.ClusterStore)
+ fprintlnNonEmpty(dockerCli.Out(), "Cluster Advertise:", info.ClusterAdvertise)
if info.RegistryConfig != nil && (len(info.RegistryConfig.InsecureRegistryCIDRs) > 0 || len(info.RegistryConfig.IndexConfigs) > 0) {
fmt.Fprintln(dockerCli.Out(), "Insecure Registries:")
for _, registry := range info.RegistryConfig.IndexConfigs {
if !registry.Secure {
- fmt.Fprintf(dockerCli.Out(), " %s\n", registry.Name)
+ fmt.Fprintln(dockerCli.Out(), " "+registry.Name)
}
}
@@ -277,11 +214,12 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
if info.RegistryConfig != nil && len(info.RegistryConfig.Mirrors) > 0 {
fmt.Fprintln(dockerCli.Out(), "Registry Mirrors:")
for _, mirror := range info.RegistryConfig.Mirrors {
- fmt.Fprintf(dockerCli.Out(), " %s\n", mirror)
+ fmt.Fprintln(dockerCli.Out(), " "+mirror)
}
}
- fmt.Fprintf(dockerCli.Out(), "Live Restore Enabled: %v\n\n", info.LiveRestoreEnabled)
+ fmt.Fprintln(dockerCli.Out(), "Live Restore Enabled:", info.LiveRestoreEnabled)
+ fmt.Fprint(dockerCli.Out(), "\n")
// Only output these warnings if the server does not support these features
if info.OSType != "windows" {
@@ -325,7 +263,64 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
return nil
}
-func printStorageDriverWarnings(dockerCli *command.DockerCli, info types.Info) {
+func printSwarmInfo(dockerCli command.Cli, info types.Info) {
+ if info.Swarm.LocalNodeState == swarm.LocalNodeStateInactive || info.Swarm.LocalNodeState == swarm.LocalNodeStateLocked {
+ return
+ }
+ fmt.Fprintln(dockerCli.Out(), " NodeID:", info.Swarm.NodeID)
+ if info.Swarm.Error != "" {
+ fmt.Fprintln(dockerCli.Out(), " Error:", info.Swarm.Error)
+ }
+ fmt.Fprintln(dockerCli.Out(), " Is Manager:", info.Swarm.ControlAvailable)
+ if info.Swarm.Cluster != nil && info.Swarm.ControlAvailable && info.Swarm.Error == "" && info.Swarm.LocalNodeState != swarm.LocalNodeStateError {
+ fmt.Fprintln(dockerCli.Out(), " ClusterID:", info.Swarm.Cluster.ID)
+ fmt.Fprintln(dockerCli.Out(), " Managers:", info.Swarm.Managers)
+ fmt.Fprintln(dockerCli.Out(), " Nodes:", info.Swarm.Nodes)
+ fmt.Fprintln(dockerCli.Out(), " Orchestration:")
+ taskHistoryRetentionLimit := int64(0)
+ if info.Swarm.Cluster.Spec.Orchestration.TaskHistoryRetentionLimit != nil {
+ taskHistoryRetentionLimit = *info.Swarm.Cluster.Spec.Orchestration.TaskHistoryRetentionLimit
+ }
+ fmt.Fprintln(dockerCli.Out(), " Task History Retention Limit:", taskHistoryRetentionLimit)
+ fmt.Fprintln(dockerCli.Out(), " Raft:")
+ fmt.Fprintln(dockerCli.Out(), " Snapshot Interval:", info.Swarm.Cluster.Spec.Raft.SnapshotInterval)
+ if info.Swarm.Cluster.Spec.Raft.KeepOldSnapshots != nil {
+ fmt.Fprintf(dockerCli.Out(), " Number of Old Snapshots to Retain: %d\n", *info.Swarm.Cluster.Spec.Raft.KeepOldSnapshots)
+ }
+ fmt.Fprintln(dockerCli.Out(), " Heartbeat Tick:", info.Swarm.Cluster.Spec.Raft.HeartbeatTick)
+ fmt.Fprintln(dockerCli.Out(), " Election Tick:", info.Swarm.Cluster.Spec.Raft.ElectionTick)
+ fmt.Fprintln(dockerCli.Out(), " Dispatcher:")
+ fmt.Fprintln(dockerCli.Out(), " Heartbeat Period:", units.HumanDuration(info.Swarm.Cluster.Spec.Dispatcher.HeartbeatPeriod))
+ fmt.Fprintln(dockerCli.Out(), " CA Configuration:")
+ fmt.Fprintln(dockerCli.Out(), " Expiry Duration:", units.HumanDuration(info.Swarm.Cluster.Spec.CAConfig.NodeCertExpiry))
+ fmt.Fprintln(dockerCli.Out(), " Force Rotate:", info.Swarm.Cluster.Spec.CAConfig.ForceRotate)
+ if caCert := strings.TrimSpace(info.Swarm.Cluster.Spec.CAConfig.SigningCACert); caCert != "" {
+ fmt.Fprintf(dockerCli.Out(), " Signing CA Certificate: \n%s\n\n", caCert)
+ }
+ if len(info.Swarm.Cluster.Spec.CAConfig.ExternalCAs) > 0 {
+ fmt.Fprintln(dockerCli.Out(), " External CAs:")
+ for _, entry := range info.Swarm.Cluster.Spec.CAConfig.ExternalCAs {
+ fmt.Fprintf(dockerCli.Out(), " %s: %s\n", entry.Protocol, entry.URL)
+ }
+ }
+ fmt.Fprintln(dockerCli.Out(), " Autolock Managers:", info.Swarm.Cluster.Spec.EncryptionConfig.AutoLockManagers)
+ fmt.Fprintln(dockerCli.Out(), " Root Rotation In Progress:", info.Swarm.Cluster.RootRotationInProgress)
+ }
+ fmt.Fprintln(dockerCli.Out(), " Node Address:", info.Swarm.NodeAddr)
+ if len(info.Swarm.RemoteManagers) > 0 {
+ managers := []string{}
+ for _, entry := range info.Swarm.RemoteManagers {
+ managers = append(managers, entry.Addr)
+ }
+ sort.Strings(managers)
+ fmt.Fprintln(dockerCli.Out(), " Manager Addresses:")
+ for _, entry := range managers {
+ fmt.Fprintf(dockerCli.Out(), " %s\n", entry)
+ }
+ }
+}
+
+func printStorageDriverWarnings(dockerCli command.Cli, info types.Info) {
if info.DriverStatus == nil {
return
}
@@ -373,9 +368,8 @@ func formatInfo(dockerCli *command.DockerCli, info types.Info, format string) er
return err
}
-func fprintfIfNotEmpty(w io.Writer, format, value string) (int, error) {
+func fprintlnNonEmpty(w io.Writer, label, value string) {
if value != "" {
- return fmt.Fprintf(w, format, value)
+ fmt.Fprintln(w, label, value)
}
- return 0, nil
}
diff --git a/vendor/github.com/docker/cli/cli/command/system/info_test.go b/vendor/github.com/docker/cli/cli/command/system/info_test.go
new file mode 100644
index 000000000..4291623d1
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/system/info_test.go
@@ -0,0 +1,237 @@
+package system
+
+import (
+ "encoding/base64"
+ "net"
+ "testing"
+ "time"
+
+ "github.com/docker/cli/internal/test"
+ "github.com/docker/docker/api/types"
+ "github.com/docker/docker/api/types/registry"
+ "github.com/docker/docker/api/types/swarm"
+ "github.com/gotestyourself/gotestyourself/golden"
+ "github.com/stretchr/testify/assert"
+)
+
+// helper function that base64 decodes a string and ignores the error
+func base64Decode(val string) []byte {
+ decoded, _ := base64.StdEncoding.DecodeString(val)
+ return decoded
+}
+
+var sampleInfoNoSwarm = types.Info{
+ ID: "EKHL:QDUU:QZ7U:MKGD:VDXK:S27Q:GIPU:24B7:R7VT:DGN6:QCSF:2UBX",
+ Containers: 0,
+ ContainersRunning: 0,
+ ContainersPaused: 0,
+ ContainersStopped: 0,
+ Images: 0,
+ Driver: "aufs",
+ DriverStatus: [][2]string{
+ {"Root Dir", "/var/lib/docker/aufs"},
+ {"Backing Filesystem", "extfs"},
+ {"Dirs", "0"},
+ {"Dirperm1 Supported", "true"},
+ },
+ SystemStatus: nil,
+ Plugins: types.PluginsInfo{
+ Volume: []string{"local"},
+ Network: []string{"bridge", "host", "macvlan", "null", "overlay"},
+ Authorization: nil,
+ Log: []string{"awslogs", "fluentd", "gcplogs", "gelf", "journald", "json-file", "logentries", "splunk", "syslog"},
+ },
+ MemoryLimit: true,
+ SwapLimit: true,
+ KernelMemory: true,
+ CPUCfsPeriod: true,
+ CPUCfsQuota: true,
+ CPUShares: true,
+ CPUSet: true,
+ IPv4Forwarding: true,
+ BridgeNfIptables: true,
+ BridgeNfIP6tables: true,
+ Debug: true,
+ NFd: 33,
+ OomKillDisable: true,
+ NGoroutines: 135,
+ SystemTime: "2017-08-24T17:44:34.077811894Z",
+ LoggingDriver: "json-file",
+ CgroupDriver: "cgroupfs",
+ NEventsListener: 0,
+ KernelVersion: "4.4.0-87-generic",
+ OperatingSystem: "Ubuntu 16.04.3 LTS",
+ OSType: "linux",
+ Architecture: "x86_64",
+ IndexServerAddress: "https://index.docker.io/v1/",
+ RegistryConfig: ®istry.ServiceConfig{
+ AllowNondistributableArtifactsCIDRs: nil,
+ AllowNondistributableArtifactsHostnames: nil,
+ InsecureRegistryCIDRs: []*registry.NetIPNet{
+ {
+ IP: net.ParseIP("127.0.0.0"),
+ Mask: net.IPv4Mask(255, 0, 0, 0),
+ },
+ },
+ IndexConfigs: map[string]*registry.IndexInfo{
+ "docker.io": {
+ Name: "docker.io",
+ Mirrors: nil,
+ Secure: true,
+ Official: true,
+ },
+ },
+ Mirrors: nil,
+ },
+ NCPU: 2,
+ MemTotal: 2097356800,
+ DockerRootDir: "/var/lib/docker",
+ HTTPProxy: "",
+ HTTPSProxy: "",
+ NoProxy: "",
+ Name: "system-sample",
+ Labels: []string{"provider=digitalocean"},
+ ExperimentalBuild: false,
+ ServerVersion: "17.06.1-ce",
+ ClusterStore: "",
+ ClusterAdvertise: "",
+ Runtimes: map[string]types.Runtime{
+ "runc": {
+ Path: "docker-runc",
+ Args: nil,
+ },
+ },
+ DefaultRuntime: "runc",
+ Swarm: swarm.Info{LocalNodeState: "inactive"},
+ LiveRestoreEnabled: false,
+ Isolation: "",
+ InitBinary: "docker-init",
+ ContainerdCommit: types.Commit{
+ ID: "6e23458c129b551d5c9871e5174f6b1b7f6d1170",
+ Expected: "6e23458c129b551d5c9871e5174f6b1b7f6d1170",
+ },
+ RuncCommit: types.Commit{
+ ID: "810190ceaa507aa2727d7ae6f4790c76ec150bd2",
+ Expected: "810190ceaa507aa2727d7ae6f4790c76ec150bd2",
+ },
+ InitCommit: types.Commit{
+ ID: "949e6fa",
+ Expected: "949e6fa",
+ },
+ SecurityOptions: []string{"name=apparmor", "name=seccomp,profile=default"},
+}
+
+var sampleSwarmInfo = swarm.Info{
+ NodeID: "qo2dfdig9mmxqkawulggepdih",
+ NodeAddr: "165.227.107.89",
+ LocalNodeState: "active",
+ ControlAvailable: true,
+ Error: "",
+ RemoteManagers: []swarm.Peer{
+ {
+ NodeID: "qo2dfdig9mmxqkawulggepdih",
+ Addr: "165.227.107.89:2377",
+ },
+ },
+ Nodes: 1,
+ Managers: 1,
+ Cluster: &swarm.ClusterInfo{
+ ID: "9vs5ygs0gguyyec4iqf2314c0",
+ Meta: swarm.Meta{
+ Version: swarm.Version{Index: 11},
+ CreatedAt: time.Date(2017, 8, 24, 17, 34, 19, 278062352, time.UTC),
+ UpdatedAt: time.Date(2017, 8, 24, 17, 34, 42, 398815481, time.UTC),
+ },
+ Spec: swarm.Spec{
+ Annotations: swarm.Annotations{
+ Name: "default",
+ Labels: nil,
+ },
+ Orchestration: swarm.OrchestrationConfig{
+ TaskHistoryRetentionLimit: &[]int64{5}[0],
+ },
+ Raft: swarm.RaftConfig{
+ SnapshotInterval: 10000,
+ KeepOldSnapshots: &[]uint64{0}[0],
+ LogEntriesForSlowFollowers: 500,
+ ElectionTick: 3,
+ HeartbeatTick: 1,
+ },
+ Dispatcher: swarm.DispatcherConfig{
+ HeartbeatPeriod: 5000000000,
+ },
+ CAConfig: swarm.CAConfig{
+ NodeCertExpiry: 7776000000000000,
+ },
+ TaskDefaults: swarm.TaskDefaults{},
+ EncryptionConfig: swarm.EncryptionConfig{
+ AutoLockManagers: true,
+ },
+ },
+ TLSInfo: swarm.TLSInfo{
+ TrustRoot: `
+-----BEGIN CERTIFICATE-----
+MIIBajCCARCgAwIBAgIUaFCW5xsq8eyiJ+Pmcv3MCflMLnMwCgYIKoZIzj0EAwIw
+EzERMA8GA1UEAxMIc3dhcm0tY2EwHhcNMTcwODI0MTcyOTAwWhcNMzcwODE5MTcy
+OTAwWjATMREwDwYDVQQDEwhzd2FybS1jYTBZMBMGByqGSM49AgEGCCqGSM49AwEH
+A0IABDy7NebyUJyUjWJDBUdnZoV6GBxEGKO4TZPNDwnxDxJcUdLVaB7WGa4/DLrW
+UfsVgh1JGik2VTiLuTMA1tLlNPOjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMB
+Af8EBTADAQH/MB0GA1UdDgQWBBQl16XFtaaXiUAwEuJptJlDjfKskDAKBggqhkjO
+PQQDAgNIADBFAiEAo9fTQNM5DP9bHVcTJYfl2Cay1bFu1E+lnpmN+EYJfeACIGKH
+1pCUkZ+D0IB6CiEZGWSHyLuXPM1rlP+I5KuS7sB8
+-----END CERTIFICATE-----
+`,
+ CertIssuerSubject: base64Decode("MBMxETAPBgNVBAMTCHN3YXJtLWNh"),
+ CertIssuerPublicKey: base64Decode(
+ "MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEPLs15vJQnJSNYkMFR2dmhXoYHEQYo7hNk80PCfEPElxR0tVoHtYZrj8MutZR+xWCHUkaKTZVOIu5MwDW0uU08w=="),
+ },
+ RootRotationInProgress: false,
+ },
+}
+
+func TestPrettyPrintInfo(t *testing.T) {
+ infoWithSwarm := sampleInfoNoSwarm
+ infoWithSwarm.Swarm = sampleSwarmInfo
+
+ infoWithWarningsLinux := sampleInfoNoSwarm
+ infoWithWarningsLinux.MemoryLimit = false
+ infoWithWarningsLinux.SwapLimit = false
+ infoWithWarningsLinux.KernelMemory = false
+ infoWithWarningsLinux.OomKillDisable = false
+ infoWithWarningsLinux.CPUCfsQuota = false
+ infoWithWarningsLinux.CPUCfsPeriod = false
+ infoWithWarningsLinux.CPUShares = false
+ infoWithWarningsLinux.CPUSet = false
+ infoWithWarningsLinux.IPv4Forwarding = false
+ infoWithWarningsLinux.BridgeNfIptables = false
+ infoWithWarningsLinux.BridgeNfIP6tables = false
+
+ for _, tc := range []struct {
+ dockerInfo types.Info
+ expectedGolden string
+ warningsGolden string
+ }{
+ {
+ dockerInfo: sampleInfoNoSwarm,
+ expectedGolden: "docker-info-no-swarm",
+ },
+ {
+ dockerInfo: infoWithSwarm,
+ expectedGolden: "docker-info-with-swarm",
+ },
+ {
+ dockerInfo: infoWithWarningsLinux,
+ expectedGolden: "docker-info-no-swarm",
+ warningsGolden: "docker-info-warnings",
+ },
+ } {
+ cli := test.NewFakeCli(&fakeClient{})
+ assert.NoError(t, prettyPrintInfo(cli, tc.dockerInfo))
+ golden.Assert(t, cli.OutBuffer().String(), tc.expectedGolden+".golden")
+ if tc.warningsGolden != "" {
+ golden.Assert(t, cli.ErrBuffer().String(), tc.warningsGolden+".golden")
+ } else {
+ assert.Equal(t, "", cli.ErrBuffer().String())
+ }
+ }
+}
diff --git a/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-no-swarm.golden b/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-no-swarm.golden
new file mode 100644
index 000000000..7a3e96673
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-no-swarm.golden
@@ -0,0 +1,51 @@
+Containers: 0
+ Running: 0
+ Paused: 0
+ Stopped: 0
+Images: 0
+Server Version: 17.06.1-ce
+Storage Driver: aufs
+ Root Dir: /var/lib/docker/aufs
+ Backing Filesystem: extfs
+ Dirs: 0
+ Dirperm1 Supported: true
+Logging Driver: json-file
+Cgroup Driver: cgroupfs
+Plugins:
+ Volume: local
+ Network: bridge host macvlan null overlay
+ Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
+Swarm: inactive
+Runtimes: runc
+Default Runtime: runc
+Init Binary: docker-init
+containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
+runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
+init version: 949e6fa
+Security Options:
+ apparmor
+ seccomp
+ Profile: default
+Kernel Version: 4.4.0-87-generic
+Operating System: Ubuntu 16.04.3 LTS
+OSType: linux
+Architecture: x86_64
+CPUs: 2
+Total Memory: 1.953GiB
+Name: system-sample
+ID: EKHL:QDUU:QZ7U:MKGD:VDXK:S27Q:GIPU:24B7:R7VT:DGN6:QCSF:2UBX
+Docker Root Dir: /var/lib/docker
+Debug Mode (client): false
+Debug Mode (server): true
+ File Descriptors: 33
+ Goroutines: 135
+ System Time: 2017-08-24T17:44:34.077811894Z
+ EventsListeners: 0
+Registry: https://index.docker.io/v1/
+Labels:
+ provider=digitalocean
+Experimental: false
+Insecure Registries:
+ 127.0.0.0/8
+Live Restore Enabled: false
+
diff --git a/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-warnings.golden b/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-warnings.golden
new file mode 100644
index 000000000..a7a4d792b
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-warnings.golden
@@ -0,0 +1,11 @@
+WARNING: No memory limit support
+WARNING: No swap limit support
+WARNING: No kernel memory limit support
+WARNING: No oom kill disable support
+WARNING: No cpu cfs quota support
+WARNING: No cpu cfs period support
+WARNING: No cpu shares support
+WARNING: No cpuset support
+WARNING: IPv4 forwarding is disabled
+WARNING: bridge-nf-call-iptables is disabled
+WARNING: bridge-nf-call-ip6tables is disabled
diff --git a/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-with-swarm.golden b/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-with-swarm.golden
new file mode 100644
index 000000000..17bb70fa7
--- /dev/null
+++ b/vendor/github.com/docker/cli/cli/command/system/testdata/docker-info-with-swarm.golden
@@ -0,0 +1,73 @@
+Containers: 0
+ Running: 0
+ Paused: 0
+ Stopped: 0
+Images: 0
+Server Version: 17.06.1-ce
+Storage Driver: aufs
+ Root Dir: /var/lib/docker/aufs
+ Backing Filesystem: extfs
+ Dirs: 0
+ Dirperm1 Supported: true
+Logging Driver: json-file
+Cgroup Driver: cgroupfs
+Plugins:
+ Volume: local
+ Network: bridge host macvlan null overlay
+ Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
+Swarm: active
+ NodeID: qo2dfdig9mmxqkawulggepdih
+ Is Manager: true
+ ClusterID: 9vs5ygs0gguyyec4iqf2314c0
+ Managers: 1
+ Nodes: 1
+ Orchestration:
+ Task History Retention Limit: 5
+ Raft:
+ Snapshot Interval: 10000
+ Number of Old Snapshots to Retain: 0
+ Heartbeat Tick: 1
+ Election Tick: 3
+ Dispatcher:
+ Heartbeat Period: 5 seconds
+ CA Configuration:
+ Expiry Duration: 3 months
+ Force Rotate: 0
+ Autolock Managers: true
+ Root Rotation In Progress: false
+ Node Address: 165.227.107.89
+ Manager Addresses:
+ 165.227.107.89:2377
+Runtimes: runc
+Default Runtime: runc
+Init Binary: docker-init
+containerd version: 6e23458c129b551d5c9871e5174f6b1b7f6d1170
+runc version: 810190ceaa507aa2727d7ae6f4790c76ec150bd2
+init version: 949e6fa
+Security Options:
+ apparmor
+ seccomp
+ Profile: default
+Kernel Version: 4.4.0-87-generic
+Operating System: Ubuntu 16.04.3 LTS
+OSType: linux
+Architecture: x86_64
+CPUs: 2
+Total Memory: 1.953GiB
+Name: system-sample
+ID: EKHL:QDUU:QZ7U:MKGD:VDXK:S27Q:GIPU:24B7:R7VT:DGN6:QCSF:2UBX
+Docker Root Dir: /var/lib/docker
+Debug Mode (client): false
+Debug Mode (server): true
+ File Descriptors: 33
+ Goroutines: 135
+ System Time: 2017-08-24T17:44:34.077811894Z
+ EventsListeners: 0
+Registry: https://index.docker.io/v1/
+Labels:
+ provider=digitalocean
+Experimental: false
+Insecure Registries:
+ 127.0.0.0/8
+Live Restore Enabled: false
+
diff --git a/vendor/github.com/docker/cli/cli/command/trust.go b/vendor/github.com/docker/cli/cli/command/trust.go
index c0742bc5b..51f760ac5 100644
--- a/vendor/github.com/docker/cli/cli/command/trust.go
+++ b/vendor/github.com/docker/cli/cli/command/trust.go
@@ -12,6 +12,10 @@ var (
untrusted bool
)
+func init() {
+ untrusted = !getDefaultTrustState()
+}
+
// AddTrustVerificationFlags adds content trust flags to the provided flagset
func AddTrustVerificationFlags(fs *pflag.FlagSet) {
trusted := getDefaultTrustState()
diff --git a/vendor/github.com/docker/cli/cli/compose/convert/service.go b/vendor/github.com/docker/cli/cli/compose/convert/service.go
index d4f14a7b1..c4473ba08 100644
--- a/vendor/github.com/docker/cli/cli/compose/convert/service.go
+++ b/vendor/github.com/docker/cli/cli/compose/convert/service.go
@@ -128,7 +128,7 @@ func Service(
Labels: AddStackLabel(namespace, service.Deploy.Labels),
},
TaskTemplate: swarm.TaskSpec{
- ContainerSpec: swarm.ContainerSpec{
+ ContainerSpec: &swarm.ContainerSpec{
Image: service.Image,
Command: service.Entrypoint,
Args: service.Command,
@@ -295,7 +295,13 @@ func convertServiceSecrets(
})
}
- return servicecli.ParseSecrets(client, refs)
+ secrs, err := servicecli.ParseSecrets(client, refs)
+ if err != nil {
+ return nil, err
+ }
+ // sort to ensure idempotence (don't restart services just because the entries are in different order)
+ sort.SliceStable(secrs, func(i, j int) bool { return secrs[i].SecretName < secrs[j].SecretName })
+ return secrs, err
}
// TODO: fix configs API so that ConfigsAPIClient is not required here
@@ -346,7 +352,13 @@ func convertServiceConfigObjs(
})
}
- return servicecli.ParseConfigs(client, refs)
+ confs, err := servicecli.ParseConfigs(client, refs)
+ if err != nil {
+ return nil, err
+ }
+ // sort to ensure idempotence (don't restart services just because the entries are in different order)
+ sort.SliceStable(confs, func(i, j int) bool { return confs[i].ConfigName < confs[j].ConfigName })
+ return confs, err
}
func uint32Ptr(value uint32) *uint32 {
@@ -366,7 +378,6 @@ func convertHealthcheck(healthcheck *composetypes.HealthCheckConfig) (*container
return nil, nil
}
var (
- err error
timeout, interval, startPeriod time.Duration
retries int
)
@@ -379,23 +390,14 @@ func convertHealthcheck(healthcheck *composetypes.HealthCheckConfig) (*container
}, nil
}
- if healthcheck.Timeout != "" {
- timeout, err = time.ParseDuration(healthcheck.Timeout)
- if err != nil {
- return nil, err
- }
+ if healthcheck.Timeout != nil {
+ timeout = *healthcheck.Timeout
}
- if healthcheck.Interval != "" {
- interval, err = time.ParseDuration(healthcheck.Interval)
- if err != nil {
- return nil, err
- }
+ if healthcheck.Interval != nil {
+ interval = *healthcheck.Interval
}
- if healthcheck.StartPeriod != "" {
- startPeriod, err = time.ParseDuration(healthcheck.StartPeriod)
- if err != nil {
- return nil, err
- }
+ if healthcheck.StartPeriod != nil {
+ startPeriod = *healthcheck.StartPeriod
}
if healthcheck.Retries != nil {
retries = int(*healthcheck.Retries)
diff --git a/vendor/github.com/docker/cli/cli/compose/convert/service_test.go b/vendor/github.com/docker/cli/cli/compose/convert/service_test.go
index 3a0bf0e75..1945e22d0 100644
--- a/vendor/github.com/docker/cli/cli/compose/convert/service_test.go
+++ b/vendor/github.com/docker/cli/cli/compose/convert/service_test.go
@@ -109,16 +109,18 @@ func TestConvertResourcesOnlyMemory(t *testing.T) {
func TestConvertHealthcheck(t *testing.T) {
retries := uint64(10)
+ timeout := 30 * time.Second
+ interval := 2 * time.Millisecond
source := &composetypes.HealthCheckConfig{
Test: []string{"EXEC", "touch", "/foo"},
- Timeout: "30s",
- Interval: "2ms",
+ Timeout: &timeout,
+ Interval: &interval,
Retries: &retries,
}
expected := &container.HealthConfig{
Test: source.Test,
- Timeout: 30 * time.Second,
- Interval: 2 * time.Millisecond,
+ Timeout: timeout,
+ Interval: interval,
Retries: 10,
}
diff --git a/vendor/github.com/docker/cli/cli/compose/loader/full-example.yml b/vendor/github.com/docker/cli/cli/compose/loader/full-example.yml
index d193dccd3..aefb56869 100644
--- a/vendor/github.com/docker/cli/cli/compose/loader/full-example.yml
+++ b/vendor/github.com/docker/cli/cli/compose/loader/full-example.yml
@@ -2,6 +2,21 @@ version: "3.4"
services:
foo:
+
+ build:
+ context: ./dir
+ dockerfile: Dockerfile
+ args:
+ foo: bar
+ target: foo
+ network: foo
+ cache_from:
+ - foo
+ - bar
+ labels: [FOO=BAR]
+
+
+
cap_add:
- ALL
@@ -114,6 +129,7 @@ services:
interval: 10s
timeout: 1s
retries: 5
+ start_period: 15s
# Any valid image reference - repo, tag, id, sha
image: redis
diff --git a/vendor/github.com/docker/cli/cli/compose/loader/loader.go b/vendor/github.com/docker/cli/cli/compose/loader/loader.go
index 2fb263008..d6f676429 100644
--- a/vendor/github.com/docker/cli/cli/compose/loader/loader.go
+++ b/vendor/github.com/docker/cli/cli/compose/loader/loader.go
@@ -8,7 +8,6 @@ import (
"sort"
"strings"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/compose/interpolation"
"github.com/docker/cli/cli/compose/schema"
"github.com/docker/cli/cli/compose/template"
@@ -19,6 +18,7 @@ import (
shellwords "github.com/mattn/go-shellwords"
"github.com/mitchellh/mapstructure"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
yaml "gopkg.in/yaml.v2"
)
@@ -93,11 +93,7 @@ func Load(configDetails types.ConfigDetails) (*types.Config, error) {
}
cfg.Configs, err = LoadConfigObjs(config["configs"], configDetails.WorkingDir)
- if err != nil {
- return nil, err
- }
-
- return &cfg, nil
+ return &cfg, err
}
func interpolateConfig(configDict map[string]interface{}, lookupEnv template.Mapping) (map[string]map[string]interface{}, error) {
@@ -576,7 +572,6 @@ func transformServiceVolumeConfig(data interface{}) (interface{}, error) {
default:
return data, errors.Errorf("invalid type %T for service volume", value)
}
-
}
func transformServiceNetworkMap(value interface{}) (interface{}, error) {
diff --git a/vendor/github.com/docker/cli/cli/compose/loader/loader_test.go b/vendor/github.com/docker/cli/cli/compose/loader/loader_test.go
index 295e91e1e..f8fcf09fa 100644
--- a/vendor/github.com/docker/cli/cli/compose/loader/loader_test.go
+++ b/vendor/github.com/docker/cli/cli/compose/loader/loader_test.go
@@ -517,12 +517,14 @@ version: "3"
services:
web:
image: web
- build: ./web
+ build:
+ context: ./web
links:
- bar
db:
image: db
- build: ./db
+ build:
+ context: ./db
`))
assert.NoError(t, err)
@@ -686,6 +688,15 @@ func TestFullExample(t *testing.T) {
expectedServiceConfig := types.ServiceConfig{
Name: "foo",
+ Build: types.BuildConfig{
+ Context: "./dir",
+ Dockerfile: "Dockerfile",
+ Args: map[string]*string{"foo": strPtr("bar")},
+ Target: "foo",
+ Network: "foo",
+ CacheFrom: []string{"foo", "bar"},
+ Labels: map[string]string{"FOO": "BAR"},
+ },
CapAdd: []string{"ALL"},
CapDrop: []string{"NET_ADMIN", "SYS_ADMIN"},
CgroupParent: "m-executor-abcd",
@@ -756,10 +767,11 @@ func TestFullExample(t *testing.T) {
"somehost": "162.242.195.82",
},
HealthCheck: &types.HealthCheckConfig{
- Test: types.HealthCheckTest([]string{"CMD-SHELL", "echo \"hello world\""}),
- Interval: "10s",
- Timeout: "1s",
- Retries: uint64Ptr(5),
+ Test: types.HealthCheckTest([]string{"CMD-SHELL", "echo \"hello world\""}),
+ Interval: durationPtr(10 * time.Second),
+ Timeout: durationPtr(1 * time.Second),
+ Retries: uint64Ptr(5),
+ StartPeriod: durationPtr(15 * time.Second),
},
Hostname: "foo",
Image: "redis",
diff --git a/vendor/github.com/docker/cli/cli/compose/loader/volume_test.go b/vendor/github.com/docker/cli/cli/compose/loader/volume_test.go
index a11668332..2f2e50a90 100644
--- a/vendor/github.com/docker/cli/cli/compose/loader/volume_test.go
+++ b/vendor/github.com/docker/cli/cli/compose/loader/volume_test.go
@@ -200,3 +200,13 @@ func TestParseVolumeSplitCases(t *testing.T) {
assert.Equal(t, expected, parsed.Source != "", msg)
}
}
+
+func TestParseVolumeInvalidEmptySpec(t *testing.T) {
+ _, err := ParseVolume("")
+ testutil.ErrorContains(t, err, "invalid empty volume spec")
+}
+
+func TestParseVolumeInvalidSections(t *testing.T) {
+ _, err := ParseVolume("/foo::rw")
+ testutil.ErrorContains(t, err, "invalid spec")
+}
diff --git a/vendor/github.com/docker/cli/cli/compose/schema/bindata.go b/vendor/github.com/docker/cli/cli/compose/schema/bindata.go
index 751873513..f295006ed 100644
--- a/vendor/github.com/docker/cli/cli/compose/schema/bindata.go
+++ b/vendor/github.com/docker/cli/cli/compose/schema/bindata.go
@@ -152,7 +152,7 @@ func dataConfig_schema_v33Json() (*asset, error) {
return a, nil
}
-var _dataConfig_schema_v34Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\xcd\x72\xdb\x38\x12\xbe\xeb\x29\x58\x4c\x6e\x91\xed\x54\x6d\x6a\xab\x36\xb7\x3d\xee\x69\xe7\x3c\x2e\x85\x05\x81\x2d\x09\x31\x08\x20\x0d\x50\xb6\x92\xf2\xbb\x4f\xf1\x57\xfc\x01\x01\x50\xa2\x63\x67\x26\x27\x5b\xe4\xd7\x00\xba\x81\xfe\xba\x1b\x00\x7f\xac\xa2\x28\x7e\xaf\xe9\x01\x32\x12\x7f\x8e\xe2\x83\x31\xea\xf3\xdd\xdd\x57\x2d\xc5\x4d\xf5\xf4\x56\xe2\xfe\x2e\x45\xb2\x33\x37\x1f\x3f\xdd\x55\xcf\xde\xc5\xeb\x42\x8e\xa5\x85\x08\x95\x62\xc7\xf6\x49\xf5\x26\x39\xfe\xeb\xf6\xd3\x6d\x21\x5e\x41\xcc\x49\x41\x01\x92\xdb\xaf\x40\x4d\xf5\x0c\xe1\x5b\xce\x10\x0a\xe1\xfb\xf8\x08\xa8\x99\x14\xf1\x66\xbd\x2a\xde\x29\x94\x0a\xd0\x30\xd0\xf1\xe7\xa8\x18\x5c\x14\xb5\x90\xe6\x41\xa7\x59\x6d\x90\x89\x7d\x5c\x3e\x7e\x2e\x5b\x88\xa2\x58\x03\x1e\x19\xed\xb4\xd0\x0e\xf5\xdd\xdd\xb9\xfd\xbb\x16\xb6\x1e\xb6\xda\x19\x6c\xf9\x5c\x11\x63\x00\xc5\x1f\xe3\xb1\x95\xaf\xbf\xdc\x93\x9b\xef\xff\xbd\xf9\xf3\xe3\xcd\x7f\x6e\x93\x9b\xcd\x87\xf7\xbd\xd7\x85\x7d\x11\x76\x55\xf7\x29\xec\x98\x60\x86\x49\xd1\xf6\x1f\xb7\xc8\xe7\xfa\xbf\xe7\xb6\x63\x92\xa6\x25\x98\xf0\x5e\xdf\x3b\xc2\x35\xf4\x75\x16\x60\x1e\x25\x3e\xf8\x74\x6e\x61\xaf\xa4\x73\xdd\xbf\x45\xe7\xbe\x3a\x47\xc9\xf3\xcc\x3b\x83\x0d\xea\x95\x94\xa9\xba\x5f\x66\xfe\x34\x50\x04\xe3\x5f\xb2\x15\xea\xd5\x56\x6c\xd1\xfd\x32\x0a\x57\xac\xe1\x53\xb8\x41\xbd\x92\xc2\x55\xf7\xd7\x29\xbc\x6a\x94\x76\x62\x2b\x44\xa7\xef\x72\x80\x3d\x3e\xb3\x99\xca\xc6\x27\xd3\xb6\x6a\x8d\x35\x61\xa5\x14\x14\x97\xa7\xe2\xd9\x84\x3d\x2a\x40\x06\xc2\xc4\xad\x09\xa2\x28\xde\xe6\x8c\xa7\x43\x8b\x4a\x01\xff\x2f\x9a\xb8\xef\x3c\x8c\xa2\x1f\x43\xea\xee\xb4\x53\xbe\xef\xfd\x9a\x9e\xf0\xf6\xfd\x84\x2e\xed\x7b\x2a\x85\x81\x27\x53\x2a\xe5\xee\xba\x32\x81\xa4\x0f\x80\x3b\xc6\x21\x54\x82\x60\xb5\x8a\x27\x4c\xc6\x99\x36\x89\xc4\x24\x65\xd4\x58\xe5\x39\xd9\x02\xbf\xaa\x05\x4a\xe8\x01\x92\x1d\xca\xcc\xdb\xca\x2e\xa9\x34\xd1\xd6\x86\x1a\x76\x0e\xd4\xdc\x10\xdc\x83\xdd\xb2\x03\xf0\x48\xda\xef\x37\xad\x68\xe7\xd7\x66\x65\x69\x30\xa6\x44\x25\x24\x4d\x7b\xe3\x20\x88\xe4\x14\xaf\xa3\x98\x19\xc8\xb4\x5d\xa1\x28\xce\x05\xfb\x96\xc3\xff\x6a\x88\xc1\x1c\x86\xed\xa6\x28\xd5\xf2\x0d\xef\x51\xe6\x2a\x51\x04\x0b\x47\x72\x1b\x3b\xa6\x32\xcb\x88\x58\xca\xbb\xe6\xe8\x11\x60\xf9\x11\x87\x47\x5d\x97\xad\xfb\xe8\xbe\x6a\x7b\xeb\x0d\x6b\x42\x1b\xbf\x3e\x63\xbe\xf0\x33\x86\x9f\x33\x0a\xca\x95\x39\xd2\x50\x0a\x70\xbb\x82\x15\x9f\xb3\x34\x1c\xbc\x9f\x03\xce\x64\xda\x1f\xb7\xc8\xb3\x2d\xe0\xc8\x25\xfb\x9e\x35\xfe\xbd\x59\xd9\xde\x0c\x66\xdf\x10\x26\x00\x13\x41\x32\x9f\xad\x62\x8a\x90\x82\x30\x8c\xf0\x44\x2b\xa0\x3d\x78\x33\x53\x8e\x99\x89\x83\x28\x39\x46\xd8\x33\x6d\xf0\xe4\x26\xa5\xe7\xee\xc0\x52\x50\x20\x52\x9d\x54\x05\xc6\x7c\xf6\x8c\x53\x68\xab\x8d\x45\x69\x22\x15\xae\xa8\x50\x35\x53\xc4\x85\x62\x6c\xf1\x40\x30\xd1\x40\x90\x1e\x2e\x94\x97\x19\x61\x22\x64\x52\x41\x18\x3c\x29\xc9\x2a\x1a\x7b\x73\xfc\x04\xe2\x98\xb4\xeb\x66\xb6\x19\x40\x1c\x19\x4a\x91\x35\x24\x1d\x16\x9d\x3b\xf2\x4f\x4a\x6a\xb8\x9e\x1c\x6b\x89\xfb\x46\xf1\x75\xeb\xd3\x9b\xbe\xf5\xe2\x9d\xc4\x8c\x14\x83\x6d\xfa\xee\xfa\x70\xaf\xab\xf1\xca\xeb\x1a\xb0\xab\x43\x91\x55\x13\x9e\x70\x26\x1e\x96\x5f\xe2\xf0\x64\x90\x24\x07\xa9\xcd\x25\x09\x50\x7c\x00\xc2\xcd\x81\x1e\x80\x3e\x38\xc4\xbb\xa8\x9e\xb4\xd4\x26\x64\x91\xb3\x8c\xec\xfd\x20\x45\x7d\x90\x8b\x13\xbd\x78\x51\xe3\x77\x9a\x95\xfb\x7d\x01\x9d\x5a\x71\xa3\xc2\xa1\x7e\xed\x4b\xb9\x53\x64\x47\xc0\xd0\x2c\x52\xaa\x73\xbd\x33\x7c\x19\x12\xcd\xbd\xc5\x5f\x0f\xfa\xe5\xb6\xaa\xfd\x1c\x5e\x55\xfe\xc7\x79\xbc\x19\x87\xcc\x71\xd0\x1c\x3e\x19\x68\x18\x96\xe7\xf6\x66\x25\x23\xb4\x48\x67\x11\xf4\xc4\xbc\x9e\xa1\x75\xbe\x9e\x8c\x62\xfe\x19\x3b\x02\x8f\x02\xeb\x14\x53\x5f\x54\x46\xcc\x2f\xdf\x82\xa6\xce\x5b\xbf\x7b\xb4\x99\x1a\x5e\xe8\x30\xcf\xc3\xf5\x2f\xb1\x12\x47\x38\x23\x1a\xfc\xce\xee\xac\xc7\xda\xd6\x98\x3a\x7e\x0a\x5c\x13\x36\xd9\x7f\x3b\x65\x27\x44\x27\xdb\x0c\x2f\xdd\x3c\x4d\x75\x53\x54\xce\xad\x03\xd9\xf8\x93\xd6\x97\xac\x2c\x55\x3f\xf1\xee\x73\x45\xc9\x10\x5d\x07\x53\x12\xcd\x4f\xa9\x85\xce\x3c\x75\x0e\xf8\x55\xe7\xe3\xf2\x68\x38\xdd\x41\x42\x2f\x53\x53\x39\x58\xca\x82\xb6\x54\x54\x4c\x18\xd8\x17\xa5\x8c\x3d\x08\xe4\x5b\xce\xf4\x01\xd2\x39\x32\x28\x8d\xa4\x92\x87\x39\x86\x75\xf7\x27\xdc\x19\x1c\xf5\xd5\x45\xb9\x99\x42\x76\x64\x1c\xf6\x03\x8d\xb7\x52\x72\x20\xa2\x17\x28\x10\x48\x9a\x48\xc1\x4f\x01\x48\x6d\x08\x7a\x77\x25\x34\xd0\x1c\x99\x39\x25\x52\x99\xc5\xb3\x42\x7d\xc8\x12\xcd\xbe\x43\xdf\xf7\xce\xab\xbe\x6e\x68\x33\x18\xd0\x60\xff\x3c\xfa\xbd\x15\xf1\x8f\xd9\x8a\xd0\x27\x4d\xcd\x65\xb9\xb5\x36\x29\x13\x89\x54\x20\xbc\xbe\xa1\x8d\x54\xc9\x1e\x09\x85\x44\x01\x32\x69\x35\x45\x8f\x60\xd3\x1c\x49\xd1\xff\xb8\x19\xcd\xf6\x82\xd8\x79\xa7\x03\x35\x99\xda\x5d\xb8\x09\x60\x8c\xdf\xd9\x73\xce\x32\x36\xed\x34\x96\x55\x1b\x90\xaf\x55\xb9\x9a\x3d\x45\x73\xa4\x67\x41\x94\xed\xa8\x10\xdc\x05\x42\x40\x65\x70\x20\x38\x23\x74\x94\x8e\xb9\x9b\x88\x4f\xb6\xba\xc1\x3a\xae\xde\x49\x78\xd9\xde\xba\x1e\xc8\xc6\x8a\x9f\x95\x7a\x0d\x87\xb1\x99\xcc\x7e\xec\x4e\x95\x6b\x6f\x11\x57\x62\x84\x76\x15\x20\x2d\x74\x7c\xa4\x1b\xfd\x12\x0c\xdd\x9b\xa3\x12\x6e\x99\x9b\x00\x1e\xaf\x7b\x0a\xe4\xce\x97\x66\xfd\xe0\x8c\xa0\x23\x43\xa5\xd0\x4c\x1b\x10\xd4\xbe\xbf\x6a\x15\xda\xb2\xd1\xe1\xc5\xd8\x28\xee\xba\x2b\xac\xea\x2a\x51\x64\x5f\xf1\x6d\x70\xa1\x13\xee\xab\xf5\x69\xff\x4f\x51\x45\x48\x2a\xd5\xc4\xd4\x84\xab\x31\x37\xcc\x0e\xb6\x2e\x1c\x79\xe8\x14\x65\x3c\x4a\x7c\x28\x02\x52\xca\xec\xcc\xb1\x1a\x88\xcc\xb8\x2f\x30\xd8\xeb\x6b\x1a\xb0\x1d\x84\x77\xa1\xde\x8b\x03\xee\x43\xf9\x1a\x34\x79\x60\xce\x34\xd9\x0e\xce\x25\x6c\x81\xb6\x88\x0c\x78\xf4\xc7\x7b\x04\x83\x6c\x70\x94\xd0\x24\x4d\xdd\xd8\x0e\xfa\x6d\x6e\xb8\x1b\x96\x81\xcc\x9d\x47\xc2\xed\x45\x9f\xca\x80\xe7\x0b\x05\x9e\x49\xed\x20\x87\x73\x7a\xdf\x39\x40\xaa\xea\x72\xef\xc4\x85\x04\x2c\x10\x69\x79\xb4\x11\x14\xdd\x10\x14\x67\x94\x68\x5f\x06\x71\xc5\x2e\x70\xae\x52\x62\x20\xa9\xef\xa4\xcc\xc9\xd9\x1c\xc9\x9a\x22\x48\x38\x07\xce\x74\x16\x92\xfc\xc4\x29\x70\x62\x65\x7f\x6f\xde\x5b\x8a\xef\x08\xe3\x39\x42\x42\xe8\x24\x4d\x0f\x24\x32\x29\x98\x91\x56\x3a\x09\xeb\x32\x23\x4f\x49\xd3\x6d\x09\xf1\x78\x57\x29\x24\x31\xb5\x27\x3f\xeb\x62\x5d\xe4\x99\x25\xfd\x88\xcb\xc2\xf9\x66\xc7\x50\x9b\xaa\x4a\x95\xaa\xfe\xd5\xa7\xd9\xe7\xc9\xca\x3f\x74\xb3\xb8\xb3\xea\xaa\x3c\x61\x5e\x0a\xef\x58\x0e\xe7\x82\x60\x62\x75\x36\x3d\x8e\x2c\x86\xa0\x0b\x8a\x6b\xf7\xf2\xbd\xf2\x8b\x5a\xa1\x30\x7d\xa2\x24\x67\x55\x6a\xb2\x84\x29\xa8\x14\xd5\x38\x42\x56\xe9\x95\x6e\x51\xac\xd1\xa2\xb0\xca\x94\xf1\x32\x48\x29\xf0\xc8\x44\x2a\x1f\x67\x74\xb8\x9c\xb5\x15\x27\x14\x06\x8c\x7d\xad\xa1\xb5\x41\xc2\x84\x99\x7d\xc6\x35\x34\x8b\x42\xd8\x01\x82\x18\x7b\x44\xe4\xae\x35\xa2\xe9\x7a\xc3\xa7\x9b\x5f\xc3\x1a\xa1\x55\x91\x74\xbf\xc2\x56\xe3\xb5\x93\x7f\x45\xd6\xd6\xba\xbb\x27\xba\xb7\x38\x6f\xbe\x36\x15\xd1\xa9\xca\xbd\xe7\x65\x19\x64\xd2\x7d\x37\xe4\x8a\xab\xd7\x3e\x15\x1b\xd8\x02\xd9\x4b\xd0\x01\x6b\x8d\x4a\xa4\x5a\x7e\x87\xc7\x7f\x88\xba\xf1\xef\x2f\x30\x45\xb2\xa5\x38\x24\xf8\xc8\x39\xb6\xa6\x4f\xd1\x1b\x60\x87\x7c\x2b\xc2\x2e\x53\xbe\x31\x76\xe8\x5f\xe7\x28\x6f\x8b\x4c\xcc\xea\x7d\x5b\x1b\xad\x5b\x5b\x6d\x82\xa7\x78\xf2\xaa\xc6\x72\xe3\x2f\xcb\xb4\xe1\xb6\xac\xad\x9e\x23\xc6\x10\x7a\x08\x2a\xfd\x66\xe6\xfb\x57\xf0\xd0\x68\x83\xc2\x4a\x43\x35\x6a\x01\x16\x0a\xb9\x3b\xf3\xf7\x60\xaa\x5f\x7d\x5d\xff\xbc\x35\x58\x7f\x21\xe2\xfd\x52\xa1\x44\x5d\x1c\xeb\x03\xee\x82\xbe\x81\x39\x7b\xe5\xa9\x18\x05\x3a\xeb\x54\xd4\xa8\xdf\x53\xf1\xa2\x5e\xd1\x3f\xa6\xeb\x4c\xc9\x78\xd7\xce\x65\xc9\xe0\xbb\x44\xb5\xc4\xa6\x3f\x8c\x21\xcc\xf2\x3d\x65\x3f\xf7\x71\x1d\xe2\x37\x90\x89\x5d\xe2\x41\xa7\xb5\x11\xdd\x9a\x2f\xc8\xfb\xb7\x1f\x1c\x19\x9e\xeb\xce\xdf\x0b\xa5\x46\x0b\x5c\x90\xb0\xcf\xe9\xa0\x78\x6e\xac\x3b\xfe\x64\x6c\xda\xff\x1b\xf9\xd1\x07\x64\x85\x9e\xe2\x34\xda\x55\xfe\xd1\x3f\x12\xab\x3e\xfe\xda\xf4\xec\x33\x80\x54\x37\x68\x3b\x81\x76\xd3\xdd\x4f\x98\xbc\xf2\x6f\xfb\xac\x6c\x78\x20\xd7\x7c\xde\x35\x71\x47\x60\xd5\xfd\x5b\x7e\x8a\xb7\x7a\x5e\xfd\x15\x00\x00\xff\xff\xfa\xb6\x96\x65\xf4\x3c\x00\x00")
+var _dataConfig_schema_v34Json = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xec\x5b\x4f\x73\xdb\x3a\x0e\xbf\xfb\x53\x68\xf4\xde\xad\x76\xd2\x99\xed\xec\xcc\xf6\xb6\xc7\x3d\xed\x9e\x37\xe3\x6a\x68\x0a\xb6\xd9\x50\x24\x0b\x52\x4e\xdc\x4e\xbe\xfb\x8e\xfe\x9a\x92\x28\x91\xb2\x95\x26\xdd\xd7\x53\x62\x09\x00\x09\x10\xf8\x01\x20\xa9\x1f\xab\x28\x8a\xff\xd4\xf4\x08\x19\x89\x3f\x47\xf1\xd1\x18\xf5\xf9\xfe\xfe\xab\x96\x62\x53\x3d\xbd\x93\x78\xb8\x4f\x91\xec\xcd\xe6\xe3\xa7\xfb\xea\xd9\x1f\xf1\xba\xe0\x63\x69\xc1\x42\xa5\xd8\xb3\x43\x52\xbd\x49\x4e\x7f\xbb\xfb\x74\x57\xb0\x57\x24\xe6\xac\xa0\x20\x92\xbb\xaf\x40\x4d\xf5\x0c\xe1\x5b\xce\x10\x0a\xe6\x87\xf8\x04\xa8\x99\x14\xf1\x76\xbd\x2a\xde\x29\x94\x0a\xd0\x30\xd0\xf1\xe7\xa8\x98\x5c\x14\xb5\x24\xcd\x03\x4b\xac\x36\xc8\xc4\x21\x2e\x1f\xbf\x94\x12\xa2\x28\xd6\x80\x27\x46\x2d\x09\xed\x54\xff\xb8\xbf\xc8\xbf\x6f\xc9\xd6\x7d\xa9\xd6\x64\xcb\xe7\x8a\x18\x03\x28\xfe\x33\x9c\x5b\xf9\xfa\xcb\x03\xd9\x7c\xff\xe7\xe6\xbf\x1f\x37\xff\xb8\x4b\x36\xdb\x0f\x7f\x76\x5e\x17\xf6\x45\xd8\x57\xc3\xa7\xb0\x67\x82\x19\x26\x45\x3b\x7e\xdc\x52\xbe\xd4\xff\xbd\xb4\x03\x93\x34\x2d\x89\x09\xef\x8c\xbd\x27\x5c\x43\x57\x67\x01\xe6\x49\xe2\xa3\x4f\xe7\x96\xec\x8d\x74\xae\xc7\x77\xe8\xdc\x55\xe7\x24\x79\x9e\x79\x57\xb0\xa1\x7a\x23\x65\xaa\xe1\x97\x59\x3f\x0d\x14\xc1\xf8\x5d\xb6\xa2\x7a\x33\x8f\x2d\x86\x5f\x46\xe1\x0a\x35\x7c\x0a\x37\x54\x6f\xa4\x70\x35\xfc\x6d\x0a\xaf\x1a\xa5\xdd\x73\x8c\xbf\x3c\x6f\x8a\xbf\x2f\xa5\xcc\x49\x79\x95\x14\x6b\x7e\xa5\x12\x1d\xcc\x73\x99\xd3\x85\x39\xe3\xf6\x6c\x0d\x3a\x62\xc9\x14\x14\x97\xe7\x72\xe6\x6e\x9b\x55\x04\x19\x08\x13\xb7\x66\x8a\xa2\x78\x97\x33\x9e\xf6\xad\x2e\x05\xfc\xbb\x10\xf1\x60\x3d\x8c\xa2\x1f\x7d\x78\xb7\xe4\x94\xef\x3b\xbf\xc6\x9d\xa2\x7d\x3f\xa2\x4b\xfb\x9e\x4a\x61\xe0\xd9\x94\x4a\x4d\x0f\x5d\x99\x40\xd2\x47\xc0\x3d\xe3\x10\xca\x41\xb0\xf2\xf4\x11\x93\x71\xa6\x4d\x22\x31\x49\x19\x35\x4e\x7e\x4e\x76\xc0\x6f\x92\x40\x09\x3d\x42\xb2\x47\x99\x79\xa5\xec\x93\x4a\x13\xed\x14\xd4\x20\x78\xa0\xe6\x86\xe0\x01\xdc\x96\xed\x11\x0f\xb8\xfd\xb1\xd5\xb2\x5a\xbf\xb6\x2b\x87\xc0\x98\x12\x95\x90\x34\xed\xcc\x83\x20\x92\x73\xbc\x8e\x62\x66\x20\xd3\x6e\x85\xa2\x38\x17\xec\x5b\x0e\xff\xaa\x49\x0c\xe6\xd0\x97\x9b\xa2\x54\xcb\x0b\x3e\xa0\xcc\x55\xa2\x08\x16\x81\x34\x6d\xec\x98\xca\x2c\x23\x62\xa9\xe8\x9a\xa3\x47\x80\xe5\x07\x38\x1f\xd9\x21\x5b\x8f\x61\xbf\x6a\x47\xeb\x4c\x6b\x44\x1b\xbf\x3e\x43\xbc\xf0\x23\x86\x1f\x33\x0a\xc8\x95\x39\xd2\x50\x08\x98\x0e\x05\x27\x7d\xce\xd2\x70\xe2\xc3\x1c\xe2\x4c\xa6\xdd\x79\x8b\x3c\xdb\x01\x0e\x42\xb2\x1b\x59\xc3\xdf\xdb\x95\xeb\x4d\x6f\xf5\x0d\x61\x02\x30\x11\x24\xf3\xd9\x2a\xa6\x08\x29\x08\xc3\x08\x4f\xb4\x02\xda\x21\x6f\x56\x6a\x62\x65\xe2\x20\x48\x8e\x11\x0e\x4c\x1b\x3c\x4f\x83\xd2\x8b\x3d\xb1\x14\x14\x88\x54\x27\x55\x13\x32\x1f\x3d\xe3\x14\xda\x8e\x64\x51\x98\x48\xc5\x54\x56\xa8\xc4\x14\x79\xa1\x98\x5b\xdc\x63\x4c\x34\x10\xa4\xc7\x2b\xf9\x65\x46\x98\x08\x59\x54\x10\x06\xcf\x4a\xb2\x0a\xc6\xde\x1d\x3e\x81\x38\x25\xad\xdf\xcc\x36\x03\x88\x13\x43\x29\xb2\x06\xa4\xc3\xb2\xb3\xc5\xff\xac\xa4\x86\xdb\xc1\xb1\xe6\x78\x68\x14\x5f\xb7\x31\xbd\xed\x5a\x2f\xde\x4b\xcc\x48\x31\xd9\x66\x6c\x3b\x86\x3b\x43\x0d\x3d\xcf\x36\xa0\xad\x43\x51\xd5\x12\x9e\x70\x26\x1e\x97\x77\x71\x78\x36\x48\x92\xa3\xd4\xe6\x9a\x02\x28\x3e\x02\xe1\xe6\x48\x8f\x40\x1f\x27\xd8\x6d\xaa\x0e\xb7\xd4\x26\xc4\xc9\x59\x46\x0e\x7e\x22\x45\x7d\x24\x57\x17\x7a\xf1\xa2\xc6\xb7\xc4\xca\xc3\xa1\x20\x1d\xf3\xb8\x41\xe3\x50\xbf\xf6\x95\xdc\x29\xb2\x13\x60\x68\x15\x29\xd5\xa5\xdf\xe9\xbf\x0c\xc9\xe6\xde\x06\xb1\x43\xfa\xe5\xae\xea\x0f\x27\xa2\xaa\xfc\x8f\xf3\x78\x3b\x4c\x99\xc3\xa4\xd9\x7f\xd2\xd3\x30\xac\xce\xed\xac\x4a\x46\x68\x51\xce\x22\xe8\x91\x75\xbd\x90\xd6\xf5\x7a\x32\xc8\xf9\x17\xda\x01\xf1\x20\xb1\x8e\x21\xf5\x55\x6d\xc4\xfc\xf6\x2d\x68\xe9\xbc\x3d\xbe\x47\x9b\xb1\xe9\x85\x4e\xf3\x32\x5d\xbf\x8b\x95\x74\x84\x33\xa2\xc1\x1f\xec\x93\xfd\x58\x2b\x8d\xa9\xd3\xa7\x40\x9f\x70\xf1\xfe\x7d\x92\x77\x84\x75\x54\x66\x78\xeb\xe6\x11\x65\x97\xa8\x9c\x3b\x27\xb2\xf5\x17\xad\xaf\xd9\x59\xaa\x6e\xe1\xdd\xc5\x8a\x12\x21\xec\x00\x53\x12\xcd\x4f\xe9\x85\x2e\x38\x75\x49\xf8\xd5\xe0\xc3\xf6\xa8\xbf\xdc\x41\x4c\xaf\xd3\x53\x4d\xa0\x94\x83\xda\xd1\x51\x31\x61\xe0\x50\xb4\x32\xee\x24\x90\xef\x38\xd3\x47\x48\xe7\xf0\xa0\x34\x92\x4a\x1e\x16\x18\xce\xdd\x9f\xf0\x60\x98\xe8\xaf\xae\xaa\xcd\x14\xb2\x13\xe3\x70\xe8\x69\xbc\x93\x92\x03\x11\x9d\x44\x81\x40\xd2\x44\x0a\x7e\x0e\xa0\xd4\x86\xa0\x77\x57\x42\x03\xcd\x91\x99\x73\x22\x95\x59\xbc\x2a\xd4\xc7\x2c\xd1\xec\x3b\x74\x63\xef\xe2\xf5\xb5\xa0\x6d\x6f\x42\xbd\x3d\xf6\xe8\xf7\x56\xc4\x5f\x66\x2b\x42\x9f\x35\x35\xd7\xd5\xd6\xda\xa4\x4c\x24\x52\x81\xf0\xc6\x86\x36\x52\x25\x07\x24\x14\x12\x05\xc8\xa4\xd3\x14\x1d\x80\x4d\x73\x24\xc5\xf8\x43\x31\x9a\x1d\x04\x71\xe3\x8e\x45\x6a\x32\xb5\xbf\x72\x13\xc0\x18\x7f\xb0\xe7\x9c\x65\x6c\x3c\x68\x1c\x5e\x1b\x50\xaf\x55\xb5\x9a\xbb\x44\x9b\x28\xcf\x82\x20\x7b\xa2\x43\x98\x6e\x10\x02\x3a\x83\x23\xc1\x19\xa9\xa3\x0c\xcc\xfd\x48\x7e\x72\xf5\x0d\xce\x79\x75\x4e\xcb\x4b\x79\xeb\x7a\x22\x5b\x27\xfd\xac\xd2\xab\x3f\x8d\xed\x68\xf5\xe3\x0e\xaa\x5c\x7b\x9b\xb8\x92\x46\xe8\xa9\x06\xa4\x25\x1d\x1e\xfb\x46\xbf\x04\x42\x77\xd6\xa8\x24\x77\xac\x4d\x00\x8e\xd7\x23\x05\x62\xe7\x6b\xa3\x7e\x70\x45\x60\xf1\x50\x29\x34\xd3\x06\x04\x75\xef\xaf\x3a\x99\x76\x6c\x70\x78\x31\x34\xca\x74\xdf\x15\xd6\x75\x95\x54\xe4\x50\xe1\x6d\x70\xa3\x13\x1e\xab\xf5\x8d\x80\x9f\xa2\x8a\x90\x54\xaa\x91\xa5\x09\x57\x63\x6e\x9a\xed\x6d\x5d\x4c\xd4\xa1\x63\x90\xf1\x24\xf1\xb1\x48\x48\x29\x73\x23\xc7\xaa\xc7\x32\xe3\x4e\x41\x6f\xaf\xaf\x11\xe0\x3a\x08\xb7\x49\xbd\x97\x0b\xa6\x0f\xe5\x6b\xa2\xd1\x03\x73\xa6\xc9\xae\x77\x2e\xe1\x4a\xb4\x45\x66\xc0\x93\x3b\xdf\xfb\x0b\x06\x04\x83\xac\x77\xc0\xd0\x94\x52\x76\xc6\x07\xfd\x3e\xb7\xe1\x0d\xcb\x40\xe6\x4e\x70\x0a\xa9\x96\x08\x9a\xf9\xf5\xd6\xca\x76\xd3\x5a\x5e\x6c\x5d\x5f\xf0\xb8\x90\x45\xd9\xf7\xa0\x07\xeb\xb8\xaa\xda\x05\xf0\xba\x49\x48\x7a\x04\x91\x96\x07\x29\x41\xb9\x14\x41\x71\x46\x89\xf6\xd5\x2b\x37\xec\x39\xe7\x2a\x25\x06\x92\xfa\x96\xcc\x9c\x0a\x71\xa2\x34\x54\x04\x09\xe7\xc0\x99\xce\x42\x4a\xad\x38\x05\x4e\x9c\xb9\xc6\xeb\x37\x25\xfb\x9e\x30\x9e\x23\x24\x84\x8e\x26\x85\x1e\x47\x26\x05\x33\xd2\x09\x5e\x61\x43\x66\xe4\x39\x69\x86\x2d\x49\x3c\x51\x5b\x32\x49\x4c\xdd\xa5\xd6\xba\xf0\x8b\x3c\x73\x14\x3b\x55\x5c\x6c\xf6\x0c\xb5\xa9\x7a\x62\xa9\xea\x5f\x5d\x50\x7f\x19\xdd\x67\x08\xdd\x9a\xb6\xbc\xae\xaa\x4a\xe6\x35\x0c\x13\xee\x70\x69\x3f\x46\xbc\xb3\x19\x71\x60\x31\x04\x5d\x00\x6a\x7b\x72\xe0\xe5\x5f\xd4\x0a\x15\x24\x49\xce\xaa\x42\x68\x09\x53\x50\x29\xaa\x79\x84\x78\xe9\x8d\x61\x51\xf8\x68\xd1\xc6\x65\xca\x78\x11\xa4\x64\x78\x62\x22\x95\x4f\xf3\xd1\x77\x01\x6b\x2b\x4e\x28\xf4\x10\xfb\x56\x43\x6b\x83\x84\x09\x33\xfb\x44\xad\x6f\x16\x85\xb0\x07\x04\x31\x8c\x88\x68\xba\xb3\x89\xc6\xbb\x1b\x9f\x6e\x7e\x0d\x6b\x0a\xad\x8a\x12\xff\x0d\x36\x36\x6f\x5d\xfc\x1b\x6a\xc4\x36\xdc\x3d\xd9\xbd\xa5\xf3\x56\x87\x63\x19\x9d\xaa\xdc\x7b\x3a\x97\x41\x26\xa7\x6f\xa2\xdc\x70\x19\xdc\xa7\x62\x43\xb6\x40\xf5\x12\x74\x9c\x5b\x53\x25\x52\x2d\xbf\x9f\xe4\x3f\xb2\xdd\xfa\x77\x33\x98\x22\xd9\x52\x18\x12\x7c\xc0\x1d\x3b\xcb\xa7\xe8\x1d\xa0\x43\xbe\x13\x61\x57\x37\xdf\x19\x3a\x74\x2f\x8f\x94\x77\x53\x46\x56\xf5\xa1\xed\xc4\xd6\xad\xad\xb6\xc1\x4b\x3c\x7a\x31\x64\xb9\xf9\x97\x4d\x61\x7f\x13\xd8\xd5\x3d\x12\x63\x08\x3d\x06\x35\x9a\x33\xeb\xfd\x1b\x70\x68\xb0\x1d\xe2\x84\xa1\x9a\x6a\x01\x14\x0a\xb9\xa9\xf3\xff\x81\x54\xbf\xba\x5f\xff\x3c\x1f\xac\xbf\x59\xf1\x7e\x17\x51\x52\x5d\x9d\xeb\x03\x6e\x9e\xbe\x83\x35\x7b\xe3\xa5\x18\x24\x3a\xe7\x52\xd4\x54\xbf\x97\xe2\x55\xa3\xa2\x7b\x28\x68\x2d\xc9\x70\x37\x70\xca\x92\xc1\x37\x97\x6a\x8e\x6d\x77\x1a\x7d\x32\xc7\x17\x9e\xdd\xda\x67\xea\xca\x40\x43\x32\xb2\x27\xdd\x1b\xb4\x36\xe2\xb4\xe6\x0b\xe2\xfe\xdd\x87\x89\x0a\x6f\xea\x86\xe1\x2b\x95\x46\x0b\x5c\xc7\x70\xaf\x69\xaf\x79\x6e\xac\x3b\xfc\x40\x6d\x3c\xfe\x1b\xfe\xc1\xe7\x6a\x85\x9e\xe2\x3c\xd8\xad\xfe\xd1\x3d\x80\xab\x3e\x35\xdb\x76\xec\xd3\x23\xa9\xee\xeb\x5a\x89\x76\x6b\xef\x27\x8c\x7e\x60\xe0\xfa\x88\xad\x7f\xfc\xd7\x7c\x4c\x36\x72\x23\x61\x65\xff\x2d\x3f\x0e\x5c\xbd\xac\xfe\x17\x00\x00\xff\xff\xf4\xc7\x3d\x6c\x86\x3d\x00\x00")
func dataConfig_schema_v34JsonBytes() ([]byte, error) {
return bindataRead(
diff --git a/vendor/github.com/docker/cli/cli/compose/schema/schema_test.go b/vendor/github.com/docker/cli/cli/compose/schema/schema_test.go
index f293fe7f6..6a761fdde 100644
--- a/vendor/github.com/docker/cli/cli/compose/schema/schema_test.go
+++ b/vendor/github.com/docker/cli/cli/compose/schema/schema_test.go
@@ -36,6 +36,16 @@ func TestValidateUndefinedTopLevelOption(t *testing.T) {
assert.Contains(t, err.Error(), "Additional property helicopters is not allowed")
}
+func TestValidateAllowsXTopLevelFields(t *testing.T) {
+ config := dict{
+ "version": "3.4",
+ "x-extra-stuff": dict{},
+ }
+
+ err := Validate(config, "3.4")
+ assert.NoError(t, err)
+}
+
func TestValidateInvalidVersion(t *testing.T) {
config := dict{
"version": "2.1",
diff --git a/vendor/github.com/docker/cli/cli/compose/types/types.go b/vendor/github.com/docker/cli/cli/compose/types/types.go
index 8feaf4289..ec089bdfa 100644
--- a/vendor/github.com/docker/cli/cli/compose/types/types.go
+++ b/vendor/github.com/docker/cli/cli/compose/types/types.go
@@ -23,6 +23,7 @@ var UnsupportedProperties = []string{
"shm_size",
"sysctls",
"tmpfs",
+ "ulimits",
"userns_mode",
}
@@ -78,6 +79,7 @@ type Config struct {
type ServiceConfig struct {
Name string
+ Build BuildConfig
CapAdd []string `mapstructure:"cap_add"`
CapDrop []string `mapstructure:"cap_drop"`
CgroupParent string `mapstructure:"cgroup_parent"`
@@ -125,6 +127,18 @@ type ServiceConfig struct {
WorkingDir string `mapstructure:"working_dir"`
}
+// BuildConfig is a type for build
+// using the same format at libcompose: https://github.com/docker/libcompose/blob/master/yaml/build.go#L12
+type BuildConfig struct {
+ Context string
+ Dockerfile string
+ Args MappingWithEquals
+ Labels Labels
+ CacheFrom StringList `mapstructure:"cache_from"`
+ Network string
+ Target string
+}
+
// ShellCommand is a string or list of string args
type ShellCommand []string
@@ -169,10 +183,10 @@ type DeployConfig struct {
// HealthCheckConfig the healthcheck configuration for a service
type HealthCheckConfig struct {
Test HealthCheckTest
- Timeout string
- Interval string
+ Timeout *time.Duration
+ Interval *time.Duration
Retries *uint64
- StartPeriod string
+ StartPeriod *time.Duration `mapstructure:"start_period"`
Disable bool
}
diff --git a/vendor/github.com/docker/cli/cli/debug/debug.go b/vendor/github.com/docker/cli/cli/debug/debug.go
index 51dfab2a9..b00ea63ad 100644
--- a/vendor/github.com/docker/cli/cli/debug/debug.go
+++ b/vendor/github.com/docker/cli/cli/debug/debug.go
@@ -3,7 +3,7 @@ package debug
import (
"os"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
// Enable sets the DEBUG env var to true
diff --git a/vendor/github.com/docker/cli/cli/debug/debug_test.go b/vendor/github.com/docker/cli/cli/debug/debug_test.go
index ad8412a94..903115283 100644
--- a/vendor/github.com/docker/cli/cli/debug/debug_test.go
+++ b/vendor/github.com/docker/cli/cli/debug/debug_test.go
@@ -4,7 +4,7 @@ import (
"os"
"testing"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
func TestEnable(t *testing.T) {
diff --git a/vendor/github.com/docker/cli/cli/flags/common.go b/vendor/github.com/docker/cli/cli/flags/common.go
index ca402efcd..a07bc77a7 100644
--- a/vendor/github.com/docker/cli/cli/flags/common.go
+++ b/vendor/github.com/docker/cli/cli/flags/common.go
@@ -5,10 +5,10 @@ import (
"os"
"path/filepath"
- "github.com/Sirupsen/logrus"
cliconfig "github.com/docker/cli/cli/config"
"github.com/docker/cli/opts"
"github.com/docker/go-connections/tlsconfig"
+ "github.com/sirupsen/logrus"
"github.com/spf13/pflag"
)
diff --git a/vendor/github.com/docker/cli/cli/trust/trust.go b/vendor/github.com/docker/cli/cli/trust/trust.go
index 600a2acc4..13192fe11 100644
--- a/vendor/github.com/docker/cli/cli/trust/trust.go
+++ b/vendor/github.com/docker/cli/cli/trust/trust.go
@@ -10,7 +10,6 @@ import (
"path/filepath"
"time"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
cliconfig "github.com/docker/cli/cli/config"
"github.com/docker/distribution/registry/client/auth"
@@ -29,6 +28,7 @@ import (
"github.com/docker/notary/tuf/data"
"github.com/docker/notary/tuf/signed"
"github.com/pkg/errors"
+ "github.com/sirupsen/logrus"
)
var (
diff --git a/vendor/github.com/docker/cli/cmd/docker/docker.go b/vendor/github.com/docker/cli/cmd/docker/docker.go
index e7ec0428f..e6ab2a8bf 100644
--- a/vendor/github.com/docker/cli/cmd/docker/docker.go
+++ b/vendor/github.com/docker/cli/cmd/docker/docker.go
@@ -6,7 +6,6 @@ import (
"os"
"strings"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/command/commands"
@@ -16,6 +15,7 @@ import (
"github.com/docker/docker/api/types/versions"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/term"
+ "github.com/sirupsen/logrus"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
diff --git a/vendor/github.com/docker/cli/cmd/docker/docker_test.go b/vendor/github.com/docker/cli/cmd/docker/docker_test.go
index d5569fa14..cec08495a 100644
--- a/vendor/github.com/docker/cli/cmd/docker/docker_test.go
+++ b/vendor/github.com/docker/cli/cmd/docker/docker_test.go
@@ -5,9 +5,9 @@ import (
"os"
"testing"
- "github.com/Sirupsen/logrus"
"github.com/docker/cli/cli/command"
"github.com/docker/cli/cli/debug"
+ "github.com/sirupsen/logrus"
"github.com/stretchr/testify/assert"
)
diff --git a/vendor/github.com/docker/cli/contrib/completion/bash/docker b/vendor/github.com/docker/cli/contrib/completion/bash/docker
index 31cb03ec4..ecc8a040c 100644
--- a/vendor/github.com/docker/cli/contrib/completion/bash/docker
+++ b/vendor/github.com/docker/cli/contrib/completion/bash/docker
@@ -441,18 +441,23 @@ __docker_complete_stacks() {
# precedence over the environment setting.
# Completions may be added with `--add`, e.g. `--add self`.
__docker_nodes() {
+ local format
+ if [ "$DOCKER_COMPLETION_SHOW_NODE_IDS" = yes ] ; then
+ format='{{.ID}} {{.Hostname}}'
+ else
+ format='{{.Hostname}}'
+ fi
+
local add=()
- local fields='$2' # default: node name only
- [ "${DOCKER_COMPLETION_SHOW_NODE_IDS}" = yes ] && fields='$1,$2' # ID and name
while true ; do
case "$1" in
--id)
- fields='$1' # IDs only
+ format='{{.ID}}'
shift
;;
--name)
- fields='$2' # names only
+ format='{{.Hostname}}'
shift
;;
--add)
@@ -465,7 +470,7 @@ __docker_nodes() {
esac
done
- echo "$(__docker_q node ls "$@" | tr -d '*' | awk "NR>1 {print $fields}")" "${add[@]}"
+ echo "$(__docker_q node ls --format "$format" "$@")" "${add[@]}"
}
# __docker_complete_nodes applies completion of nodes based on the current
@@ -1862,7 +1867,7 @@ _docker_container_run_and_create() {
__docker_complete_containers_running
;;
*)
- COMPREPLY=( $( compgen -W 'host container:' -- "$cur" ) )
+ COMPREPLY=( $( compgen -W 'none host private shareable container:' -- "$cur" ) )
# shellcheck disable=SC2128
if [ "$COMPREPLY" = "container:" ]; then
__docker_nospace
diff --git a/vendor/github.com/docker/cli/docker.Makefile b/vendor/github.com/docker/cli/docker.Makefile
index b7a34da31..79f7b3c42 100644
--- a/vendor/github.com/docker/cli/docker.Makefile
+++ b/vendor/github.com/docker/cli/docker.Makefile
@@ -4,10 +4,10 @@
# Makefile for developing using Docker
#
-DEV_DOCKER_IMAGE_NAME = docker-cli-dev
-LINTER_IMAGE_NAME = docker-cli-lint
-CROSS_IMAGE_NAME = docker-cli-cross
-VALIDATE_IMAGE_NAME = docker-cli-shell-validate
+DEV_DOCKER_IMAGE_NAME = docker-cli-dev$(IMAGE_TAG)
+LINTER_IMAGE_NAME = docker-cli-lint$(IMAGE_TAG)
+CROSS_IMAGE_NAME = docker-cli-cross$(IMAGE_TAG)
+VALIDATE_IMAGE_NAME = docker-cli-shell-validate$(IMAGE_TAG)
MOUNTS = -v "$(CURDIR)":/go/src/github.com/docker/cli
VERSION = $(shell cat VERSION)
ENVVARS = -e VERSION=$(VERSION) -e GITCOMMIT
@@ -42,9 +42,12 @@ clean: build_docker_image
docker run --rm $(ENVVARS) $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make clean
# run go test
+.PHONY: test-unit
+test-unit: build_docker_image
+ docker run --rm $(ENVVARS) $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make test-unit
+
.PHONY: test
-test: build_docker_image
- docker run --rm $(ENVVARS) $(MOUNTS) $(DEV_DOCKER_IMAGE_NAME) make test
+test: test-unit test-e2e
# build the CLI for multiple architectures using a container
.PHONY: cross
@@ -90,3 +93,7 @@ yamldocs: build_docker_image
.PHONY: shellcheck
shellcheck: build_shell_validate_image
docker run -ti --rm $(ENVVARS) $(MOUNTS) $(VALIDATE_IMAGE_NAME) make shellcheck
+
+.PHONY: test-e2e
+test-e2e: binary
+ ./scripts/test/e2e/wrapper
diff --git a/vendor/github.com/docker/cli/dockerfiles/Dockerfile.test-e2e-env b/vendor/github.com/docker/cli/dockerfiles/Dockerfile.test-e2e-env
new file mode 100644
index 000000000..3c672f4e8
--- /dev/null
+++ b/vendor/github.com/docker/cli/dockerfiles/Dockerfile.test-e2e-env
@@ -0,0 +1,17 @@
+FROM docker/compose:1.15.0
+
+RUN apk add -U bash curl
+
+ARG DOCKER_CHANNEL=edge
+ARG DOCKER_VERSION=17.06.0-ce
+RUN export URL=https://download.docker.com/linux/static; \
+ curl -Ls $URL/$DOCKER_CHANNEL/x86_64/docker-$DOCKER_VERSION.tgz | \
+ tar -xz docker/docker && \
+ mv docker/docker /usr/local/bin/ && \
+ rmdir docker
+ENV DISABLE_WARN_OUTSIDE_CONTAINER=1
+WORKDIR /work
+COPY scripts/test/e2e scripts/test/e2e
+COPY e2e/compose-env.yaml e2e/compose-env.yaml
+
+ENTRYPOINT ["bash", "/work/scripts/test/e2e/run"]
diff --git a/vendor/github.com/docker/cli/docs/deprecated.md b/vendor/github.com/docker/cli/docs/deprecated.md
index e6714fee1..992ff65e9 100644
--- a/vendor/github.com/docker/cli/docs/deprecated.md
+++ b/vendor/github.com/docker/cli/docs/deprecated.md
@@ -24,7 +24,7 @@ see [Feature Deprecation Policy](https://docs.docker.com/engine/#feature-depreca
**Deprecated In Release: v17.05.0**
-**Disabled by default in release: v17.09**
+**Disabled by default in release: [v17.09](https://github.com/docker/docker-ce/releases/tag/v17.09.0-ce)**
Docker 17.05.0 added an optional `--detach=false` option to make the
`docker service create` and `docker service update` work synchronously. This
@@ -315,7 +315,7 @@ Since 1.9, Docker Content Trust Offline key has been renamed to Root key and the
**Deprecated In Release: [v1.6.0](https://github.com/docker/docker/releases/tag/v1.6.0)**
-**Target For Removal In Release: v17.09**
+**Removed In Release: [v17.09](https://github.com/docker/docker-ce/releases/tag/v17.09.0-ce)**
The flag `--api-enable-cors` is deprecated since v1.6.0. Use the flag
`--api-cors-header` instead.
diff --git a/vendor/github.com/docker/cli/docs/reference/builder.md b/vendor/github.com/docker/cli/docs/reference/builder.md
index cf4f79fae..f7f717d24 100644
--- a/vendor/github.com/docker/cli/docs/reference/builder.md
+++ b/vendor/github.com/docker/cli/docs/reference/builder.md
@@ -301,9 +301,9 @@ Results in:
---> Running in a2c157f842f5
Volume in drive C has no label.
Volume Serial Number is 7E6D-E0F7
-
+
Directory of c:\
-
+
10/05/2016 05:04 PM 1,894 License.txt
10/05/2016 02:22 PM Program Files
10/05/2016 02:14 PM Program Files (x86)
@@ -381,7 +381,7 @@ throughout the entire instruction. In other words, in this example:
ENV ghi=$abc
will result in `def` having a value of `hello`, not `bye`. However,
-`ghi` will have a value of `bye` because it is not part of the same instruction
+`ghi` will have a value of `bye` because it is not part of the same instruction
that set `abc` to `bye`.
## .dockerignore file
@@ -415,12 +415,12 @@ temp?
This file causes the following build behavior:
-| Rule | Behavior |
-|----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
-| `# comment` | Ignored. |
-| `*/temp*` | Exclude files and directories whose names start with `temp` in any immediate subdirectory of the root. For example, the plain file `/somedir/temporary.txt` is excluded, as is the directory `/somedir/temp`. |
-| `*/*/temp*` | Exclude files and directories starting with `temp` from any subdirectory that is two levels below the root. For example, `/somedir/subdir/temporary.txt` is excluded. |
-| `temp?` | Exclude files and directories in the root directory whose names are a one-character extension of `temp`. For example, `/tempa` and `/tempb` are excluded.
+| Rule | Behavior |
+|:------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| `# comment` | Ignored. |
+| `*/temp*` | Exclude files and directories whose names start with `temp` in any immediate subdirectory of the root. For example, the plain file `/somedir/temporary.txt` is excluded, as is the directory `/somedir/temp`. |
+| `*/*/temp*` | Exclude files and directories starting with `temp` from any subdirectory that is two levels below the root. For example, `/somedir/subdir/temporary.txt` is excluded. |
+| `temp?` | Exclude files and directories in the root directory whose names are a one-character extension of `temp`. For example, `/tempa` and `/tempb` are excluded. |
Matching is done using Go's
@@ -493,32 +493,32 @@ Or
FROM [@] [AS ]
-The `FROM` instruction initializes a new build stage and sets the
-[*Base Image*](glossary.md#base-image) for subsequent instructions. As such, a
+The `FROM` instruction initializes a new build stage and sets the
+[*Base Image*](glossary.md#base-image) for subsequent instructions. As such, a
valid `Dockerfile` must start with a `FROM` instruction. The image can be
-any valid image – it is especially easy to start by **pulling an image** from
+any valid image – it is especially easy to start by **pulling an image** from
the [*Public Repositories*](https://docs.docker.com/engine/tutorials/dockerrepos/).
- `ARG` is the only instruction that may precede `FROM` in the `Dockerfile`.
See [Understand how ARG and FROM interact](#understand-how-arg-and-from-interact).
-- `FROM` can appear multiple times within a single `Dockerfile` to
+- `FROM` can appear multiple times within a single `Dockerfile` to
create multiple images or use one build stage as a dependency for another.
- Simply make a note of the last image ID output by the commit before each new
+ Simply make a note of the last image ID output by the commit before each new
`FROM` instruction. Each `FROM` instruction clears any state created by previous
instructions.
-- Optionally a name can be given to a new build stage by adding `AS name` to the
+- Optionally a name can be given to a new build stage by adding `AS name` to the
`FROM` instruction. The name can be used in subsequent `FROM` and
`COPY --from=` instructions to refer to the image built in this stage.
-- The `tag` or `digest` values are optional. If you omit either of them, the
+- The `tag` or `digest` values are optional. If you omit either of them, the
builder assumes a `latest` tag by default. The builder returns an error if it
cannot find the `tag` value.
### Understand how ARG and FROM interact
-`FROM` instructions support variables that are declared by any `ARG`
+`FROM` instructions support variables that are declared by any `ARG`
instructions that occur before the first `FROM`.
```Dockerfile
@@ -754,20 +754,26 @@ This will then be visible from `docker inspect` with the other labels.
## EXPOSE
- EXPOSE [...]
+ EXPOSE [/...]
The `EXPOSE` instruction informs Docker that the container listens on the
-specified network ports at runtime. `EXPOSE` does not make the ports of the
-container accessible to the host. To do that, you must use either the `-p` flag
-to publish a range of ports or the `-P` flag to publish all of the exposed
-ports. You can expose one port number and publish it externally under another
-number.
+specified network ports at runtime. You can specify whether the port listens on
+TCP or UDP, and the default is TCP if the protocol is not specified.
+
+The `EXPOSE` instruction does not actually publish the port. It functions as a
+type of documentation between the person who builds the image and the person who
+runs the container, about which ports are intended to be published. To actually
+publish the port when running the container, use the `-p` flag on `docker run`
+to publish and map one or more ports, or the `-P` flag to publish all exposed
+ports and map them to to high-order ports.
To set up port redirection on the host system, see [using the -P
-flag](run.md#expose-incoming-ports). The Docker network feature supports
-creating networks without the need to expose ports within the network, for
-detailed information see the [overview of this
-feature](https://docs.docker.com/engine/userguide/networking/)).
+flag](run.md#expose-incoming-ports). The `docker network` command supports
+creating networks for communication among containers without the need to
+expose or publish specific ports, because the containers connected to the
+network can communicate with each other over any port. For detailed information,
+see the
+[overview of this feature](https://docs.docker.com/engine/userguide/networking/)).
## ENV
@@ -976,9 +982,9 @@ All new files and directories are created with a UID and GID of 0.
Optionally `COPY` accepts a flag `--from=` that can be used to set
the source location to a previous build stage (created with `FROM .. AS `)
-that will be used instead of a build context sent by the user. The flag also
-accepts a numeric index assigned for all previous build stages started with
-`FROM` instruction. In case a build stage with a specified name can't be found an
+that will be used instead of a build context sent by the user. The flag also
+accepts a numeric index assigned for all previous build stages started with
+`FROM` instruction. In case a build stage with a specified name can't be found an
image with the same name is attempted to be used instead.
`COPY` obeys the following rules:
@@ -1250,7 +1256,7 @@ or for executing an ad-hoc command in a container.
The table below shows what command is executed for different `ENTRYPOINT` / `CMD` combinations:
| | No ENTRYPOINT | ENTRYPOINT exec_entry p1_entry | ENTRYPOINT ["exec_entry", "p1_entry"] |
-|--------------------------------|----------------------------|--------------------------------|------------------------------------------------|
+|:-------------------------------|:---------------------------|:-------------------------------|:-----------------------------------------------|
| **No CMD** | *error, not allowed* | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry |
| **CMD ["exec_cmd", "p1_cmd"]** | exec_cmd p1_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry exec_cmd p1_cmd |
| **CMD ["p1_cmd", "p2_cmd"]** | p1_cmd p2_cmd | /bin/sh -c exec_entry p1_entry | exec_entry p1_entry p1_cmd p2_cmd |
@@ -1288,7 +1294,7 @@ Keep the following things in mind about volumes in the `Dockerfile`.
- **Volumes on Windows-based containers**: When using Windows-based containers,
the destination of a volume inside the container must be one of:
-
+
- a non-existing or empty directory
- a drive other than `C:`
@@ -1805,16 +1811,16 @@ Resulting in:
Removing intermediate container 6fcdb6855ae2
Step 3/5 : RUN New-Item -ItemType Directory C:\Example
---> Running in d0eef8386e97
-
-
+
+
Directory: C:\
-
-
+
+
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 10/28/2016 11:26 AM Example
-
-
+
+
---> 3f2fbf1395d9
Removing intermediate container d0eef8386e97
Step 4/5 : ADD Execute-MyCmdlet.ps1 c:\example\
diff --git a/vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md b/vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md
index f7a9da43c..ef2ad908a 100644
--- a/vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md
+++ b/vendor/github.com/docker/cli/docs/reference/commandline/dockerd.md
@@ -248,7 +248,7 @@ $ docker -H tcp://127.0.0.1:2375 pull ubuntu
### Daemon storage-driver
-The Docker daemon has support for several different image layer storage
+On Linux, the Docker daemon has support for several different image layer storage
drivers: `aufs`, `devicemapper`, `btrfs`, `zfs`, `overlay` and `overlay2`.
The `aufs` driver is the oldest, but is based on a Linux kernel patch-set that
@@ -296,11 +296,16 @@ to use it.
> **Note**: Both `overlay` and `overlay2` are currently unsupported on `btrfs`
> or any Copy on Write filesystem and should only be used over `ext4` partitions.
+On Windows, the Docker daemon supports a single image layer storage driver
+depending on the image platform: `windowsfilter` for Windows images, and
+`lcow` for Linux containers on Windows.
+
### Options per storage driver
Particular storage-driver can be configured with options specified with
`--storage-opt` flags. Options for `devicemapper` are prefixed with `dm`,
-options for `zfs` start with `zfs` and options for `btrfs` start with `btrfs`.
+options for `zfs` start with `zfs`, options for `btrfs` start with `btrfs`
+and options for `lcow` start with `lcow`.
#### Devicemapper options
@@ -780,6 +785,113 @@ conditions the user can pass any size less then the backing fs size.
$ sudo dockerd -s overlay2 --storage-opt overlay2.size=1G
```
+
+#### Windowsfilter options
+
+##### `size`
+
+Specifies the size to use when creating the sandbox which is used for containers.
+Defaults to 20G.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt size=40G
+```
+
+#### LCOW (Linux Containers on Windows) options
+
+##### `lcow.globalmode`
+
+Specifies whether the daemon instantiates utility VM instances as required
+(recommended and default if omitted), or uses single global utility VM (better
+performance, but has security implications and not recommended for production
+deployments).
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt lcow.globalmode=false
+```
+
+##### `lcow.kirdpath`
+
+Specifies the folder path to the location of a pair of kernel and initrd files
+used for booting a utility VM. Defaults to `%ProgramFiles%\Linux Containers`.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt lcow.kirdpath=c:\path\to\files
+```
+
+##### `lcow.kernel`
+
+Specifies the filename of a kernel file located in the `lcow.kirdpath` path.
+Defaults to `bootx64.efi`.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt lcow.kernel=kernel.efi
+```
+
+##### `lcow.initrd`
+
+Specifies the filename of an initrd file located in the `lcow.kirdpath` path.
+Defaults to `initrd.img`.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt lcow.initrd=myinitrd.img
+```
+
+##### `lcow.bootparameters`
+
+Specifies additional boot parameters for booting utility VMs when in kernel/
+initrd mode. Ignored if the utility VM is booting from VHD. These settings
+are kernel specific.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt "lcow.bootparameters='option=value'"
+```
+
+##### `lcow.vhdx`
+
+Specifies a custom VHDX to boot a utility VM, as an alternate to kernel
+and initrd booting. Defaults to `uvm.vhdx` under `lcow.kirdpath`.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt lcow.vhdx=custom.vhdx
+```
+
+##### `lcow.timeout`
+
+Specifies the timeout for utility VM operations in seconds. Defaults
+to 300.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt lcow.timeout=240
+```
+
+##### `lcow.sandboxsize`
+
+Specifies the size in GB to use when creating the sandbox which is used for
+containers. Defaults to 20. Cannot be less than 20.
+
+###### Example
+
+```PowerShell
+C:\> dockerd --storage-opt lcow.sandboxsize=40
+```
+
### Docker runtime execution options
The Docker daemon relies on a
diff --git a/vendor/github.com/docker/cli/docs/reference/commandline/service_create.md b/vendor/github.com/docker/cli/docs/reference/commandline/service_create.md
index f82c03099..d17f99de6 100644
--- a/vendor/github.com/docker/cli/docs/reference/commandline/service_create.md
+++ b/vendor/github.com/docker/cli/docs/reference/commandline/service_create.md
@@ -833,6 +833,10 @@ Valid placeholders for the Go template are listed below:
.Node.ID |
Node ID |
+
+ | .Node.Hostname |
+ Node Hostname |
+
| .Task.ID |
Task ID |
@@ -851,11 +855,11 @@ Valid placeholders for the Go template are listed below:
#### Template example
In this example, we are going to set the template of the created containers based on the
-service's name and the node's ID where it sits.
+service's name, the node's ID and hostname where it sits.
```bash
$ docker service create --name hosttempl \
- --hostname="{{.Node.ID}}-{{.Service.Name}}"\
+ --hostname="{{.Node.Hostname}}-{{.Node.ID}}-{{.Service.Name}}"\
busybox top
va8ew30grofhjoychbr6iot8c
@@ -865,7 +869,7 @@ $ docker service ps va8ew30grofhjoychbr6iot8c
ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS
wo41w8hg8qan hosttempl.1 busybox:latest@sha256:29f5d56d12684887bdfa50dcd29fc31eea4aaf4ad3bec43daf19026a7ce69912 2e7a8a9c4da2 Running Running about a minute ago
-$ docker inspect --format="{{.Config.Hostname}}" hosttempl.1.wo41w8hg8qanxwjwsg4kxpprj
+$ docker inspect --format="{{.Config.Hostname}}" 2e7a8a9c4da2-wo41w8hg8qanxwjwsg4kxpprj-hosttempl
x3ti0erg11rjpg64m75kej2mz-hosttempl
```
diff --git a/vendor/github.com/docker/cli/docs/reference/commandline/system_prune.md b/vendor/github.com/docker/cli/docs/reference/commandline/system_prune.md
index 2aa5c0e3e..96039ab6e 100644
--- a/vendor/github.com/docker/cli/docs/reference/commandline/system_prune.md
+++ b/vendor/github.com/docker/cli/docs/reference/commandline/system_prune.md
@@ -18,34 +18,72 @@ keywords: "system, prune, delete, remove"
```markdown
Usage: docker system prune [OPTIONS]
-Delete unused data
+Remove unused data
Options:
-a, --all Remove all unused images not just dangling ones
- --filter filter Provide filter values (e.g. 'until=')
+ --filter filter Provide filter values (e.g. 'label==')
-f, --force Do not prompt for confirmation
--help Print usage
+ --volumes Prune volumes
```
## Description
-Remove all unused containers, volumes, networks and images (both dangling and unreferenced).
+Remove all unused containers, networks, images (both dangling and unreferenced),
+and optionally, volumes.
## Examples
```bash
-$ docker system prune -a
+$ docker system prune
WARNING! This will remove:
- - all stopped containers
- - all volumes not used by at least one container
- - all networks not used by at least one container
- - all images without at least one container associated to them
+ - all stopped containers
+ - all networks not used by at least one container
+ - all dangling images
+ - all build cache
Are you sure you want to continue? [y/N] y
+
+Deleted Containers:
+f44f9b81948b3919590d5f79a680d8378f1139b41952e219830a33027c80c867
+792776e68ac9d75bce4092bc1b5cc17b779bc926ab04f4185aec9bf1c0d4641f
+
+Deleted Networks:
+network1
+network2
+
+Deleted Images:
+untagged: hello-world@sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
+deleted: sha256:1815c82652c03bfd8644afda26fb184f2ed891d921b20a0703b46768f9755c57
+deleted: sha256:45761469c965421a92a69cc50e92c01e0cfa94fe026cdd1233445ea00e96289a
+
+Total reclaimed space: 1.84kB
+```
+
+By default, volumes are not removed to prevent important data from being
+deleted if there is currently no container using the volume. Use the `--volumes`
+flag when running the command to prune volumes as well:
+
+```bash
+$ docker system prune -a --volumes
+
+WARNING! This will remove:
+ - all stopped containers
+ - all networks not used by at least one container
+ - all volumes not used by at least one container
+ - all images without at least one container associated to them
+ - all build cache
+Are you sure you want to continue? [y/N] y
+
Deleted Containers:
0998aa37185a1a7036b0e12cf1ac1b6442dcfa30a5c9650a42ed5010046f195b
73958bfb884fa81fa4cc6baf61055667e940ea2357b4036acbbe25a60f442a4d
+Deleted Networks:
+my-network-a
+my-network-b
+
Deleted Volumes:
named-vol
@@ -68,6 +106,13 @@ deleted: sha256:3a88a5c81eb5c283e72db2dbc6d65cbfd8e80b6c89bb6e714cfaaa0eed99c548
Total reclaimed space: 13.5 MB
```
+> **Note**: The `--volumes` option was added in Docker 17.06.1. Older versions
+> of Docker prune volumes by default, along with other Docker objects. On older
+> versions, run `docker container prune`, `docker network prune`, and
+> `docker image prune` separately to remove unused containers, networks, and
+> images, without removing volumes.
+
+
### Filtering
The filtering flag (`-f` or `--filter`) format is of "key=value". If there is more
diff --git a/vendor/github.com/docker/cli/docs/reference/commandline/update.md b/vendor/github.com/docker/cli/docs/reference/commandline/update.md
index bcd83ddda..9bb1f51ae 100644
--- a/vendor/github.com/docker/cli/docs/reference/commandline/update.md
+++ b/vendor/github.com/docker/cli/docs/reference/commandline/update.md
@@ -51,6 +51,10 @@ options on a running or a stopped container. On kernel version older than
4.6, you can only update `--kernel-memory` on a stopped container or on
a running container with kernel memory initialized.
+> **Warning**: The `docker update` and `docker container update` commands are
+> not supported for Windows containers.
+{: .warning }
+
## Examples
The following sections illustrate ways to use this command.
diff --git a/vendor/github.com/docker/cli/docs/reference/run.md b/vendor/github.com/docker/cli/docs/reference/run.md
index 7446740c3..b5ad3e39a 100644
--- a/vendor/github.com/docker/cli/docs/reference/run.md
+++ b/vendor/github.com/docker/cli/docs/reference/run.md
@@ -265,11 +265,21 @@ more advanced use case would be changing the host's hostname from a container.
## IPC settings (--ipc)
- --ipc="" : Set the IPC mode for the container,
- 'container:': reuses another container's IPC namespace
- 'host': use the host's IPC namespace inside the container
+ --ipc="MODE" : Set the IPC mode for the container
-By default, all containers have the IPC namespace enabled.
+The following values are accepted:
+
+| Value | Description |
+|:---------------------------|:----------------------------------------------------------------------------------|
+| "" | Use daemon's default. |
+| "none" | Own private IPC namespace, with /dev/shm not mounted. |
+| "private" | Own private IPC namespace. |
+| "shareable" | Own private IPC namespace, with a possibility to share it with other containers. |
+| "container:<_name-or-ID_>" | Join another ("shareable") container's IPC namespace. |
+| "host" | Use the host system's IPC namespace. |
+
+If not specified, daemon default is used, which can either be `"private"`
+or `"shareable"`, depending on the daemon version and configuration.
IPC (POSIX/SysV IPC) namespace provides separation of named shared memory
segments, semaphores and message queues.
@@ -280,7 +290,8 @@ memory is commonly used by databases and custom-built (typically C/OpenMPI,
C++/using boost libraries) high performance applications for scientific
computing and financial services industries. If these types of applications
are broken into multiple containers, you might need to share the IPC mechanisms
-of the containers.
+of the containers, using `"shareable"` mode for the main (i.e. "donor")
+container, and `"container:"` for other containers.
## Network settings
diff --git a/vendor/github.com/docker/cli/docs/yaml/yaml.go b/vendor/github.com/docker/cli/docs/yaml/yaml.go
index edf5e9dd7..2dbe406bd 100644
--- a/vendor/github.com/docker/cli/docs/yaml/yaml.go
+++ b/vendor/github.com/docker/cli/docs/yaml/yaml.go
@@ -14,10 +14,14 @@ import (
)
type cmdOption struct {
- Option string
- Shorthand string `yaml:",omitempty"`
- DefaultValue string `yaml:"default_value,omitempty"`
- Description string `yaml:",omitempty"`
+ Option string
+ Shorthand string `yaml:",omitempty"`
+ ValueType string `yaml:"value_type,omitempty"`
+ DefaultValue string `yaml:"default_value,omitempty"`
+ Description string `yaml:",omitempty"`
+ Deprecated bool
+ MinAPIVersion string `yaml:"min_api_version,omitempty"`
+ Experimental bool
}
type cmdDoc struct {
@@ -35,6 +39,9 @@ type cmdDoc struct {
Options []cmdOption `yaml:",omitempty"`
InheritedOptions []cmdOption `yaml:"inherited_options,omitempty"`
Example string `yaml:"examples,omitempty"`
+ Deprecated bool
+ MinAPIVersion string `yaml:"min_api_version,omitempty"`
+ Experimental bool
}
// GenYamlTree creates yaml structured ref files
@@ -73,12 +80,11 @@ func GenYamlTreeCustom(cmd *cobra.Command, dir string, filePrepender, linkHandle
}
// GenYamlCustom creates custom yaml output
+// nolint: gocyclo
func GenYamlCustom(cmd *cobra.Command, w io.Writer) error {
cliDoc := cmdDoc{}
cliDoc.Name = cmd.CommandPath()
- // Check experimental: ok := cmd.Tags["experimental"]
-
cliDoc.Aliases = strings.Join(cmd.Aliases, ", ")
cliDoc.Short = cmd.Short
cliDoc.Long = cmd.Long
@@ -93,6 +99,18 @@ func GenYamlCustom(cmd *cobra.Command, w io.Writer) error {
if len(cmd.Example) > 0 {
cliDoc.Example = cmd.Example
}
+ if len(cmd.Deprecated) > 0 {
+ cliDoc.Deprecated = true
+ }
+ // Check recursively so that, e.g., `docker stack ls` returns the same output as `docker stack`
+ for curr := cmd; curr != nil; curr = curr.Parent() {
+ if v, ok := curr.Tags["version"]; ok && cliDoc.MinAPIVersion == "" {
+ cliDoc.MinAPIVersion = v
+ }
+ if _, ok := curr.Tags["experimental"]; ok && !cliDoc.Experimental {
+ cliDoc.Experimental = true
+ }
+ }
flags := cmd.NonInheritedFlags()
if flags.HasFlags() {
@@ -142,28 +160,34 @@ func GenYamlCustom(cmd *cobra.Command, w io.Writer) error {
}
func genFlagResult(flags *pflag.FlagSet) []cmdOption {
- var result []cmdOption
+ var (
+ result []cmdOption
+ opt cmdOption
+ )
flags.VisitAll(func(flag *pflag.Flag) {
+ opt = cmdOption{
+ Option: flag.Name,
+ ValueType: flag.Value.Type(),
+ DefaultValue: forceMultiLine(flag.DefValue),
+ Description: forceMultiLine(flag.Usage),
+ Deprecated: len(flag.Deprecated) > 0,
+ }
+
// Todo, when we mark a shorthand is deprecated, but specify an empty message.
// The flag.ShorthandDeprecated is empty as the shorthand is deprecated.
// Using len(flag.ShorthandDeprecated) > 0 can't handle this, others are ok.
if !(len(flag.ShorthandDeprecated) > 0) && len(flag.Shorthand) > 0 {
- opt := cmdOption{
- Option: flag.Name,
- Shorthand: flag.Shorthand,
- DefaultValue: flag.DefValue,
- Description: forceMultiLine(flag.Usage),
- }
- result = append(result, opt)
- } else {
- opt := cmdOption{
- Option: flag.Name,
- DefaultValue: forceMultiLine(flag.DefValue),
- Description: forceMultiLine(flag.Usage),
- }
- result = append(result, opt)
+ opt.Shorthand = flag.Shorthand
}
+ if _, ok := flag.Annotations["experimental"]; ok {
+ opt.Experimental = true
+ }
+ if v, ok := flag.Annotations["version"]; ok {
+ opt.MinAPIVersion = v[0]
+ }
+
+ result = append(result, opt)
})
return result
diff --git a/vendor/github.com/docker/cli/e2e/compose-env.yaml b/vendor/github.com/docker/cli/e2e/compose-env.yaml
new file mode 100644
index 000000000..afc95e3af
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/compose-env.yaml
@@ -0,0 +1,10 @@
+version: '2.1'
+
+services:
+ registry:
+ image: 'registry:2'
+
+ engine:
+ image: 'docker:${TEST_ENGINE_VERSION:-edge-dind}'
+ privileged: true
+ command: ['--insecure-registry=registry:5000']
diff --git a/vendor/github.com/docker/cli/e2e/container/main_test.go b/vendor/github.com/docker/cli/e2e/container/main_test.go
new file mode 100644
index 000000000..4363c4388
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/container/main_test.go
@@ -0,0 +1,17 @@
+package container
+
+import (
+ "fmt"
+ "os"
+ "testing"
+
+ "github.com/docker/cli/internal/test/environment"
+)
+
+func TestMain(m *testing.M) {
+ if err := environment.Setup(); err != nil {
+ fmt.Println(err.Error())
+ os.Exit(3)
+ }
+ os.Exit(m.Run())
+}
diff --git a/vendor/github.com/docker/cli/e2e/container/run_test.go b/vendor/github.com/docker/cli/e2e/container/run_test.go
new file mode 100644
index 000000000..fa5f28b4f
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/container/run_test.go
@@ -0,0 +1,42 @@
+package container
+
+import (
+ "fmt"
+ "testing"
+
+ shlex "github.com/flynn-archive/go-shlex"
+ "github.com/gotestyourself/gotestyourself/golden"
+ "github.com/gotestyourself/gotestyourself/icmd"
+ "github.com/stretchr/testify/assert"
+ "github.com/stretchr/testify/require"
+)
+
+const alpineImage = "registry:5000/alpine:3.6"
+
+func TestRunAttachedFromRemoteImageAndRemove(t *testing.T) {
+ image := createRemoteImage(t)
+
+ result := icmd.RunCmd(shell(t,
+ "docker run --rm %s echo this is output", image))
+
+ result.Assert(t, icmd.Success)
+ assert.Equal(t, "this is output\n", result.Stdout())
+ golden.Assert(t, result.Stderr(), "run-attached-from-remote-and-remove.golden")
+}
+
+// TODO: create this with registry API instead of engine API
+func createRemoteImage(t *testing.T) string {
+ image := "registry:5000/alpine:test-run-pulls"
+ icmd.RunCommand("docker", "pull", alpineImage).Assert(t, icmd.Success)
+ icmd.RunCommand("docker", "tag", alpineImage, image).Assert(t, icmd.Success)
+ icmd.RunCommand("docker", "push", image).Assert(t, icmd.Success)
+ icmd.RunCommand("docker", "rmi", image).Assert(t, icmd.Success)
+ return image
+}
+
+// TODO: move to gotestyourself
+func shell(t *testing.T, format string, args ...interface{}) icmd.Cmd {
+ cmd, err := shlex.Split(fmt.Sprintf(format, args...))
+ require.NoError(t, err)
+ return icmd.Cmd{Command: cmd}
+}
diff --git a/vendor/github.com/docker/cli/e2e/container/testdata/run-attached-from-remote-and-remove.golden b/vendor/github.com/docker/cli/e2e/container/testdata/run-attached-from-remote-and-remove.golden
new file mode 100644
index 000000000..15e3430c7
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/container/testdata/run-attached-from-remote-and-remove.golden
@@ -0,0 +1,4 @@
+Unable to find image 'registry:5000/alpine:test-run-pulls' locally
+test-run-pulls: Pulling from alpine
+Digest: sha256:641b95ddb2ea9dc2af1a0113b6b348ebc20872ba615204fbe12148e98fd6f23d
+Status: Downloaded newer image for registry:5000/alpine:test-run-pulls
diff --git a/vendor/github.com/docker/cli/e2e/stack/main_test.go b/vendor/github.com/docker/cli/e2e/stack/main_test.go
new file mode 100644
index 000000000..0d36e45bd
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/stack/main_test.go
@@ -0,0 +1,17 @@
+package stack
+
+import (
+ "fmt"
+ "os"
+ "testing"
+
+ "github.com/docker/cli/internal/test/environment"
+)
+
+func TestMain(m *testing.M) {
+ if err := environment.Setup(); err != nil {
+ fmt.Println(err.Error())
+ os.Exit(3)
+ }
+ os.Exit(m.Run())
+}
diff --git a/vendor/github.com/docker/cli/e2e/stack/remove_test.go b/vendor/github.com/docker/cli/e2e/stack/remove_test.go
new file mode 100644
index 000000000..f57934079
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/stack/remove_test.go
@@ -0,0 +1,65 @@
+package stack
+
+import (
+ "fmt"
+ "strings"
+ "testing"
+
+ "github.com/docker/cli/internal/test/environment"
+ shlex "github.com/flynn-archive/go-shlex"
+ "github.com/gotestyourself/gotestyourself/golden"
+ "github.com/gotestyourself/gotestyourself/icmd"
+ "github.com/gotestyourself/gotestyourself/poll"
+ "github.com/stretchr/testify/require"
+)
+
+var pollSettings = environment.DefaultPollSettings
+
+func TestRemove(t *testing.T) {
+ stackname := "test-stack-remove"
+ deployFullStack(t, stackname)
+ defer cleanupFullStack(t, stackname)
+
+ result := icmd.RunCmd(shell(t, "docker stack rm %s", stackname))
+
+ result.Assert(t, icmd.Expected{Err: icmd.None})
+ golden.Assert(t, result.Stdout(), "stack-remove-success.golden")
+}
+
+func deployFullStack(t *testing.T, stackname string) {
+ // TODO: this stack should have full options not minimal options
+ result := icmd.RunCmd(shell(t,
+ "docker stack deploy --compose-file=./testdata/full-stack.yml %s", stackname))
+ result.Assert(t, icmd.Success)
+
+ poll.WaitOn(t, taskCount(stackname, 2), pollSettings)
+}
+
+func cleanupFullStack(t *testing.T, stackname string) {
+ result := icmd.RunCmd(shell(t, "docker stack rm %s", stackname))
+ result.Assert(t, icmd.Success)
+ poll.WaitOn(t, taskCount(stackname, 0), pollSettings)
+}
+
+func taskCount(stackname string, expected int) func(t poll.LogT) poll.Result {
+ return func(poll.LogT) poll.Result {
+ result := icmd.RunCommand(
+ "docker", "stack", "ps", "-f=desired-state=running", stackname)
+ count := lines(result.Stdout()) - 1
+ if count == expected {
+ return poll.Success()
+ }
+ return poll.Continue("task count is %d waiting for %d", count, expected)
+ }
+}
+
+func lines(out string) int {
+ return len(strings.Split(strings.TrimSpace(out), "\n"))
+}
+
+// TODO: move to gotestyourself
+func shell(t *testing.T, format string, args ...interface{}) icmd.Cmd {
+ cmd, err := shlex.Split(fmt.Sprintf(format, args...))
+ require.NoError(t, err)
+ return icmd.Cmd{Command: cmd}
+}
diff --git a/vendor/github.com/docker/cli/e2e/stack/testdata/full-stack.yml b/vendor/github.com/docker/cli/e2e/stack/testdata/full-stack.yml
new file mode 100644
index 000000000..8c4d06f85
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/stack/testdata/full-stack.yml
@@ -0,0 +1,9 @@
+version: '3.3'
+
+services:
+ one:
+ image: registry:5000/alpine:3.6
+ command: top
+ two:
+ image: registry:5000/alpine:3.6
+ command: top
diff --git a/vendor/github.com/docker/cli/e2e/stack/testdata/stack-remove-success.golden b/vendor/github.com/docker/cli/e2e/stack/testdata/stack-remove-success.golden
new file mode 100644
index 000000000..f41a89170
--- /dev/null
+++ b/vendor/github.com/docker/cli/e2e/stack/testdata/stack-remove-success.golden
@@ -0,0 +1,3 @@
+Removing service test-stack-remove_one
+Removing service test-stack-remove_two
+Removing network test-stack-remove_default
diff --git a/vendor/github.com/docker/cli/internal/test/builders/network.go b/vendor/github.com/docker/cli/internal/test/builders/network.go
new file mode 100644
index 000000000..cc4accc0b
--- /dev/null
+++ b/vendor/github.com/docker/cli/internal/test/builders/network.go
@@ -0,0 +1,45 @@
+package builders
+
+import (
+ "github.com/docker/docker/api/types"
+)
+
+// NetworkResource creates a network resource with default values.
+// Any number of networkResource function builder can be pass to modify the existing value.
+// feel free to add another builder func if you need to override another value
+func NetworkResource(builders ...func(resource *types.NetworkResource)) *types.NetworkResource {
+ resource := &types.NetworkResource{}
+
+ for _, builder := range builders {
+ builder(resource)
+ }
+ return resource
+}
+
+// NetworkResourceName sets the name of the resource network
+func NetworkResourceName(name string) func(networkResource *types.NetworkResource) {
+ return func(networkResource *types.NetworkResource) {
+ networkResource.Name = name
+ }
+}
+
+// NetworkResourceID sets the ID of the resource network
+func NetworkResourceID(id string) func(networkResource *types.NetworkResource) {
+ return func(networkResource *types.NetworkResource) {
+ networkResource.ID = id
+ }
+}
+
+// NetworkResourceDriver sets the driver of the resource network
+func NetworkResourceDriver(name string) func(networkResource *types.NetworkResource) {
+ return func(networkResource *types.NetworkResource) {
+ networkResource.Driver = name
+ }
+}
+
+// NetworkResourceScope sets the Scope of the resource network
+func NetworkResourceScope(scope string) func(networkResource *types.NetworkResource) {
+ return func(networkResource *types.NetworkResource) {
+ networkResource.Scope = scope
+ }
+}
diff --git a/vendor/github.com/docker/cli/internal/test/builders/secret.go b/vendor/github.com/docker/cli/internal/test/builders/secret.go
index 9e0f910e9..3cd5f7872 100644
--- a/vendor/github.com/docker/cli/internal/test/builders/secret.go
+++ b/vendor/github.com/docker/cli/internal/test/builders/secret.go
@@ -32,6 +32,15 @@ func SecretName(name string) func(secret *swarm.Secret) {
}
}
+// SecretDriver sets the secret's driver name
+func SecretDriver(driver string) func(secret *swarm.Secret) {
+ return func(secret *swarm.Secret) {
+ secret.Spec.Driver = &swarm.Driver{
+ Name: driver,
+ }
+ }
+}
+
// SecretID sets the secret's ID
func SecretID(ID string) func(secret *swarm.Secret) {
return func(secret *swarm.Secret) {
diff --git a/vendor/github.com/docker/cli/internal/test/builders/service.go b/vendor/github.com/docker/cli/internal/test/builders/service.go
index 29a7bc53f..2817e6e2e 100644
--- a/vendor/github.com/docker/cli/internal/test/builders/service.go
+++ b/vendor/github.com/docker/cli/internal/test/builders/service.go
@@ -56,7 +56,7 @@ func ReplicatedService(replicas uint64) func(*swarm.Service) {
// ServiceImage sets the service's image
func ServiceImage(image string) func(*swarm.Service) {
return func(service *swarm.Service) {
- service.Spec.TaskTemplate = swarm.TaskSpec{ContainerSpec: swarm.ContainerSpec{Image: image}}
+ service.Spec.TaskTemplate = swarm.TaskSpec{ContainerSpec: &swarm.ContainerSpec{Image: image}}
}
}
diff --git a/vendor/github.com/docker/cli/internal/test/builders/task.go b/vendor/github.com/docker/cli/internal/test/builders/task.go
index 479b6f14c..40efc3d93 100644
--- a/vendor/github.com/docker/cli/internal/test/builders/task.go
+++ b/vendor/github.com/docker/cli/internal/test/builders/task.go
@@ -140,7 +140,7 @@ func WithTaskSpec(specBuilders ...func(*swarm.TaskSpec)) func(*swarm.Task) {
// Any number of taskSpec function builder can be pass to augment it.
func TaskSpec(specBuilders ...func(*swarm.TaskSpec)) *swarm.TaskSpec {
taskSpec := &swarm.TaskSpec{
- ContainerSpec: swarm.ContainerSpec{
+ ContainerSpec: &swarm.ContainerSpec{
Image: "myimage:mytag",
},
}
diff --git a/vendor/github.com/docker/cli/internal/test/doc.go b/vendor/github.com/docker/cli/internal/test/doc.go
index 3a8609716..342441d53 100644
--- a/vendor/github.com/docker/cli/internal/test/doc.go
+++ b/vendor/github.com/docker/cli/internal/test/doc.go
@@ -1,5 +1,5 @@
// Package test is a test-only package that can be used by other cli package to write unit test.
//
-// It as an internal package and cannot be used outside of github.com/docker/cli/cli package.
+// It as an internal package and cannot be used outside of github.com/docker/cli package.
//
package test
diff --git a/vendor/github.com/docker/cli/internal/test/environment/testenv.go b/vendor/github.com/docker/cli/internal/test/environment/testenv.go
new file mode 100644
index 000000000..d30f22537
--- /dev/null
+++ b/vendor/github.com/docker/cli/internal/test/environment/testenv.go
@@ -0,0 +1,21 @@
+package environment
+
+import (
+ "os"
+ "time"
+
+ "github.com/gotestyourself/gotestyourself/poll"
+ "github.com/pkg/errors"
+)
+
+// Setup a new environment
+func Setup() error {
+ dockerHost := os.Getenv("TEST_DOCKER_HOST")
+ if dockerHost == "" {
+ return errors.New("$TEST_DOCKER_HOST must be set")
+ }
+ return os.Setenv("DOCKER_HOST", dockerHost)
+}
+
+// DefaultPollSettings used with gotestyourself/poll
+var DefaultPollSettings = poll.WithDelay(100 * time.Millisecond)
diff --git a/vendor/github.com/docker/cli/man/dockerd.8.md b/vendor/github.com/docker/cli/man/dockerd.8.md
index 8a7619ca2..733cc20f8 100644
--- a/vendor/github.com/docker/cli/man/dockerd.8.md
+++ b/vendor/github.com/docker/cli/man/dockerd.8.md
@@ -23,6 +23,7 @@ dockerd - Enable daemon mode
[**--default-gateway**[=*DEFAULT-GATEWAY*]]
[**--default-gateway-v6**[=*DEFAULT-GATEWAY-V6*]]
[**--default-runtime**[=*runc*]]
+[**--default-ipc-mode**=*MODE*]
[**--default-shm-size**[=*64MiB*]]
[**--default-ulimit**[=*[]*]]
[**--disable-legacy-registry**]
@@ -185,6 +186,10 @@ $ sudo dockerd --add-runtime runc=runc --add-runtime custom=/usr/local/bin/my-ru
**--default-runtime**="runc"
Set default runtime if there're more than one specified by `--add-runtime`.
+**--default-ipc-mode**="**private**|**shareable**"
+ Set the default IPC mode for newly created containers. The argument
+ can either be **private** or **shareable**.
+
**--default-shm-size**=*64MiB*
Set the daemon-wide default shm size for containers. Default is `64MiB`.
diff --git a/vendor/github.com/docker/cli/scripts/test/e2e/load-alpine b/vendor/github.com/docker/cli/scripts/test/e2e/load-alpine
new file mode 100755
index 000000000..6eb562137
--- /dev/null
+++ b/vendor/github.com/docker/cli/scripts/test/e2e/load-alpine
@@ -0,0 +1,8 @@
+#!/usr/bin/env bash
+set -eu -o pipefail
+
+src=alpine@sha256:f006ecbb824d87947d0b51ab8488634bf69fe4094959d935c0c103f4820a417d
+dest=registry:5000/alpine:3.6
+docker pull $src
+docker tag $src $dest
+docker push $dest
diff --git a/vendor/github.com/docker/cli/scripts/test/e2e/run b/vendor/github.com/docker/cli/scripts/test/e2e/run
new file mode 100755
index 000000000..4010e756c
--- /dev/null
+++ b/vendor/github.com/docker/cli/scripts/test/e2e/run
@@ -0,0 +1,86 @@
+#!/usr/bin/env bash
+# Run integration tests against the latest docker-ce dind
+set -eu -o pipefail
+
+function container_ip {
+ local cid=$1
+ local network=$2
+ docker inspect \
+ -f "{{.NetworkSettings.Networks.${network}.IPAddress}}" "$cid"
+}
+
+function setup {
+ local project=$1
+ COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose up -d >&2
+
+ local network="${project}_default"
+ # TODO: only run if inside a container
+ docker network connect "$network" "$(hostname)"
+
+ engine_ip="$(container_ip "${project}_engine_1" "$network")"
+ engine_host="tcp://$engine_ip:2375"
+ (
+ export DOCKER_HOST="$engine_host"
+ timeout -t 200 ./scripts/test/e2e/wait-on-daemon
+ ./scripts/test/e2e/load-alpine
+ is_swarm_enabled || docker swarm init
+ ) >&2
+ echo "$engine_host"
+}
+
+function is_swarm_enabled {
+ docker info 2> /dev/null | grep -q 'Swarm: active'
+}
+
+function cleanup {
+ COMPOSE_PROJECT_NAME=$1 COMPOSE_FILE=$2 docker-compose down >&2
+}
+
+function runtests {
+ local engine_host=$1
+
+ # shellcheck disable=SC2086
+ env -i \
+ TEST_DOCKER_HOST="$engine_host" \
+ GOPATH="$GOPATH" \
+ PATH="$PWD/build/" \
+ "$(which go)" test -v ./e2e/... ${TESTFLAGS-}
+}
+
+export unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
+compose_env_file=./e2e/compose-env.yaml
+
+cmd=${1-}
+
+case "$cmd" in
+ setup)
+ setup "$unique_id" "$compose_env_file"
+ exit
+ ;;
+ cleanup)
+ cleanup "$unique_id" "$compose_env_file"
+ exit
+ ;;
+ test)
+ engine_host=${2-}
+ if [[ -z "${engine_host}" ]]; then
+ echo "missing parameter docker engine host"
+ echo "Usage: $0 test ENGINE_HOST"
+ exit 3
+ fi
+ runtests "$engine_host"
+ ;;
+ run|"")
+ engine_host="$(setup "$unique_id" "$compose_env_file")"
+ testexit=0
+ runtests "$engine_host" || testexit=$?
+ cleanup "$unique_id" "$compose_env_file"
+ exit $testexit
+ ;;
+ *)
+ echo "Unknown command: $cmd"
+ echo "Usage: "
+ echo " $0 [setup | cleanup | test | run] [engine_host]"
+ exit 1
+ ;;
+esac
diff --git a/vendor/github.com/docker/cli/scripts/test/e2e/wait-on-daemon b/vendor/github.com/docker/cli/scripts/test/e2e/wait-on-daemon
new file mode 100755
index 000000000..d1dd5c39f
--- /dev/null
+++ b/vendor/github.com/docker/cli/scripts/test/e2e/wait-on-daemon
@@ -0,0 +1,9 @@
+#!/usr/bin/env bash
+set -eu -o pipefail
+
+echo "Waiting for docker daemon to become available at $DOCKER_HOST"
+while ! docker version > /dev/null; do
+ sleep 0.3
+done
+
+docker version
diff --git a/vendor/github.com/docker/cli/scripts/test/e2e/wrapper b/vendor/github.com/docker/cli/scripts/test/e2e/wrapper
new file mode 100755
index 000000000..0f85f4328
--- /dev/null
+++ b/vendor/github.com/docker/cli/scripts/test/e2e/wrapper
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+# Setup, run and teardown e2e test suite in containers.
+set -eu -o pipefail
+
+unique_id="${E2E_UNIQUE_ID:-cliendtoendsuite}"
+e2e_env_image=docker-cli-e2e-env:$unique_id
+dev_image=docker-cli-dev:$unique_id
+
+function run_in_env {
+ local cmd=$1
+ docker run -i --rm \
+ -v /var/run/docker.sock:/var/run/docker.sock \
+ -e E2E_UNIQUE_ID \
+ "$e2e_env_image" "$cmd"
+}
+
+docker build \
+ -t "$e2e_env_image" \
+ -f dockerfiles/Dockerfile.test-e2e-env .
+
+docker build \
+ -t "$dev_image" \
+ -f dockerfiles/Dockerfile.dev .
+
+engine_host=$(run_in_env setup)
+testexit=0
+docker run -i --rm \
+ -v "$PWD:/go/src/github.com/docker/cli" \
+ --network "${unique_id}_default" \
+ -e TESTFLAGS \
+ "$dev_image" \
+ ./scripts/test/e2e/run test "$engine_host" || testexit="$?"
+run_in_env cleanup
+exit "$testexit"
diff --git a/vendor/github.com/docker/cli/scripts/test/unit-with-coverage b/vendor/github.com/docker/cli/scripts/test/unit-with-coverage
index 0b7a3586a..a8dbed268 100755
--- a/vendor/github.com/docker/cli/scripts/test/unit-with-coverage
+++ b/vendor/github.com/docker/cli/scripts/test/unit-with-coverage
@@ -11,7 +11,7 @@ for pkg in "$@"; do
-coverprofile=profile.out \
-covermode=atomic \
"${pkg}"
-
+
if test -f profile.out; then
cat profile.out >> coverage.txt
rm profile.out
diff --git a/vendor/github.com/docker/cli/scripts/test/watch b/vendor/github.com/docker/cli/scripts/test/watch
index 6c9745aea..264eb7c24 100755
--- a/vendor/github.com/docker/cli/scripts/test/watch
+++ b/vendor/github.com/docker/cli/scripts/test/watch
@@ -1,3 +1,3 @@
#!/bin/sh
# shellcheck disable=SC2016
-exec filewatcher -L 6 -x build -x script go test -timeout 10s -v './${dir}'
+exec filewatcher -L 6 -x build -x script go test -timeout 30s -v './${dir}'
diff --git a/vendor/github.com/docker/cli/service/logs/parse_logs.go b/vendor/github.com/docker/cli/service/logs/parse_logs.go
new file mode 100644
index 000000000..c01564ced
--- /dev/null
+++ b/vendor/github.com/docker/cli/service/logs/parse_logs.go
@@ -0,0 +1,39 @@
+/*Package logs contains tools for parsing docker log lines.
+ */
+package logs
+
+import (
+ "net/url"
+ "strings"
+
+ "github.com/pkg/errors"
+)
+
+// ParseLogDetails parses a string of key value pairs in the form
+// "k=v,l=w", where the keys and values are url query escaped, and each pair
+// is separated by a comma. Returns a map of the key value pairs on success,
+// and an error if the details string is not in a valid format.
+//
+// The details string encoding is implemented in
+// github.com/moby/moby/api/server/httputils/write_log_stream.go
+func ParseLogDetails(details string) (map[string]string, error) {
+ pairs := strings.Split(details, ",")
+ detailsMap := make(map[string]string, len(pairs))
+ for _, pair := range pairs {
+ p := strings.SplitN(pair, "=", 2)
+ // if there is no equals sign, we will only get 1 part back
+ if len(p) != 2 {
+ return nil, errors.New("invalid details format")
+ }
+ k, err := url.QueryUnescape(p[0])
+ if err != nil {
+ return nil, err
+ }
+ v, err := url.QueryUnescape(p[1])
+ if err != nil {
+ return nil, err
+ }
+ detailsMap[k] = v
+ }
+ return detailsMap, nil
+}
diff --git a/vendor/github.com/docker/cli/service/logs/parse_logs_test.go b/vendor/github.com/docker/cli/service/logs/parse_logs_test.go
new file mode 100644
index 000000000..223323ea0
--- /dev/null
+++ b/vendor/github.com/docker/cli/service/logs/parse_logs_test.go
@@ -0,0 +1,33 @@
+package logs
+
+import (
+ "testing"
+
+ "github.com/pkg/errors"
+ "github.com/stretchr/testify/assert"
+)
+
+func TestParseLogDetails(t *testing.T) {
+ testCases := []struct {
+ line string
+ expected map[string]string
+ err error
+ }{
+ {"key=value", map[string]string{"key": "value"}, nil},
+ {"key1=value1,key2=value2", map[string]string{"key1": "value1", "key2": "value2"}, nil},
+ {"key+with+spaces=value%3Dequals,asdf%2C=", map[string]string{"key with spaces": "value=equals", "asdf,": ""}, nil},
+ {"key=,=nothing", map[string]string{"key": "", "": "nothing"}, nil},
+ {"=", map[string]string{"": ""}, nil},
+ {"errors", nil, errors.New("invalid details format")},
+ }
+ for _, testcase := range testCases {
+ t.Run(testcase.line, func(t *testing.T) {
+ actual, err := ParseLogDetails(testcase.line)
+ if testcase.err != nil {
+ assert.EqualError(t, err, testcase.err.Error())
+ return
+ }
+ assert.Equal(t, testcase.expected, actual)
+ })
+ }
+}
diff --git a/vendor/github.com/docker/cli/vendor.conf b/vendor/github.com/docker/cli/vendor.conf
index d27abce96..be845f426 100755
--- a/vendor/github.com/docker/cli/vendor.conf
+++ b/vendor/github.com/docker/cli/vendor.conf
@@ -1,57 +1,56 @@
-github.com/Azure/go-ansiterm 388960b655244e76e24c75f48631564eaefade62
-github.com/Microsoft/go-winio v0.4.2
-github.com/Nvveen/Gotty a8b993ba6abdb0e0c12b0125c603323a71c7790c https://github.com/ijc25/Gotty
-github.com/Sirupsen/logrus v0.11.0
github.com/agl/ed25519 d2b94fd789ea21d12fac1a4443dd3a3f79cda72c
+github.com/Azure/go-ansiterm 19f72df4d05d31cbe1c56bfc8045c96babff6c7e
github.com/coreos/etcd 824277cb3a577a0e8c829ca9ec557b973fe06d20
github.com/cpuguy83/go-md2man a65d4d2de4d5f7c74868dfa9b202a3c8be315aaa
github.com/davecgh/go-spew 346938d642f2ec3594ed81d874461961cd0faa76
-github.com/docker/distribution b38e5838b7b2f2ad48e06ec4b500011976080621
-github.com/docker/docker d58ffa0364c04d03a8f25704d7f0489ee6cd9634
+github.com/docker/distribution edc3ab29cdff8694dd6feb85cfeb4b5f1b38ed9c
+github.com/docker/docker 84144a8c66c1bb2af8fa997288f51ef2719971b4
github.com/docker/docker-credential-helpers v0.5.1
# the docker/go package contains a customized version of canonical/json
# and is used by Notary. The package is periodically rebased on current Go versions.
github.com/docker/go d30aec9fd63c35133f8f79c3412ad91a3b08be06
github.com/docker/go-connections 3ede32e2033de7505e6500d6c868c2b9ed9f169d
-github.com/docker/go-events 18b43f1bc85d9cdd42c05a6cd2d444c7a200a894
+github.com/docker/go-events 9461782956ad83b30282bf90e31fa6a70c255ba9
github.com/docker/go-units 9e638d38cf6977a37a8ea0078f3ee75a7cdb2dd1
-github.com/docker/libtrust 9cbd2a1374f46905c68a4eb3694a130610adc62a
-github.com/docker/notary v0.4.2
-github.com/docker/swarmkit 79381d0840be27f8b3f5c667b348a4467d866eeb
+github.com/docker/notary v0.4.2-sirupsen https://github.com/simonferquel/notary.git
+github.com/docker/swarmkit 0554c9bc9a485025e89b8e5c2c1f0d75961906a2
github.com/flynn-archive/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff
-github.com/gogo/protobuf 7efa791bd276fd4db00867cbd982b552627c24cb
+github.com/gogo/protobuf v0.4
github.com/golang/protobuf 7a211bcf3bce0e3f1d74f9894916e6f116ae83b4
-github.com/gotestyourself/gotestyourself v1.0.0
github.com/gorilla/context v1.1
github.com/gorilla/mux v1.1
+github.com/gotestyourself/gotestyourself v1.2.0
github.com/inconshreveable/mousetrap 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
github.com/mattn/go-shellwords v1.0.3
+github.com/Microsoft/go-winio v0.4.4
github.com/miekg/pkcs11 df8ae6ca730422dba20c768ff38ef7d79077a59f
github.com/mitchellh/mapstructure f3009df150dadf309fdee4a54ed65c124afad715
-github.com/opencontainers/go-digest a6d0ee40d4207ea02364bd3b9e8e77b9159ba1eb
-github.com/opencontainers/image-spec f03dbe35d449c54915d235f1a3cf8f585a24babe
-github.com/opencontainers/runc 9c2d8d184e5da67c95d601382adf14862e4f2228 https://github.com/docker/runc.git
-github.com/opencontainers/selinux v1.0.0-rc1
+github.com/moby/buildkit da2b9dc7dab99e824b2b1067ad7d0523e32dd2d9 https://github.com/dmcgowan/buildkit.git
+github.com/Nvveen/Gotty a8b993ba6abdb0e0c12b0125c603323a71c7790c https://github.com/ijc25/Gotty
+github.com/opencontainers/go-digest 21dfd564fd89c944783d00d069f33e3e7123c448
+github.com/opencontainers/image-spec v1.0.0
+github.com/opencontainers/runc d40db12e72a40109dfcf28539f5ee0930d2f0277
github.com/pkg/errors 839d9e913e063e28dfd0e6c7b7512793e0a48be9
github.com/pmezard/go-difflib v1.0.0
github.com/russross/blackfriday 1d6b8e9301e720b08a8938b8c25c018285885438
github.com/shurcooL/sanitized_anchor_name 10ef21a441db47d8b13ebcc5fd2310f636973c77
+github.com/sirupsen/logrus v1.0.1
github.com/spf13/cobra v1.5.1 https://github.com/dnephin/cobra.git
github.com/spf13/pflag 9ff6c6923cfffbcd502984b8e0c80539a94968b7
+github.com/stevvooe/continuity cd7a8e21e2b6f84799f5dd4b65faf49c8d3ee02d
github.com/stretchr/testify 4d4bfba8f1d1027c4fdbe371823030df51419987
+github.com/tonistiigi/fsutil 0ac4c11b053b9c5c7c47558f81f96c7100ce50fb
github.com/xeipuuv/gojsonpointer e0fe6f68307607d540ed8eac07a342c33fa1b54a
github.com/xeipuuv/gojsonreference e02fc20de94c78484cd5ffb007f8af96be030a45
github.com/xeipuuv/gojsonschema 93e72a773fade158921402d6a24c819b48aba29d
golang.org/x/crypto 3fbbcd23f1cb824e69491a5930cfeff09b12f4d2
golang.org/x/net 7dcfb8076726a3fdd9353b6b8a1f1b6be6811bd6
-golang.org/x/sys 8f0908ab3b2457e2e15403d3697c9ef5cb4b57a9
+golang.org/x/sync 450f422ab23cf9881c94e2db30cac0eb1b7cf80c
+golang.org/x/sys 07c182904dbd53199946ba614a412c61d3c548f5
golang.org/x/text f72d8390a633d5dfb0cc84043294db9f6c935756
golang.org/x/time a4bde12657593d5e90d0533a3e4fd95e635124cb
google.golang.org/genproto d80a6e20e776b0b17a324d0ba1ab50a39c8e8944
google.golang.org/grpc v1.3.0
gopkg.in/yaml.v2 4c78c975fe7c825c6d1466c42be594d1d6f3aba6
-github.com/tonistiigi/fsutil 0ac4c11b053b9c5c7c47558f81f96c7100ce50fb
-github.com/stevvooe/continuity cd7a8e21e2b6f84799f5dd4b65faf49c8d3ee02d
-golang.org/x/sync de49d9dcd27d4f764488181bea099dfe6179bcf0
vbom.ml/util 928aaa586d7718c70f4090ddf83f2b34c16fdc8d
diff --git a/vendor/github.com/docker/libnetwork/config/config.go b/vendor/github.com/docker/libnetwork/config/config.go
index 96a157a1f..3e8473d25 100644
--- a/vendor/github.com/docker/libnetwork/config/config.go
+++ b/vendor/github.com/docker/libnetwork/config/config.go
@@ -15,6 +15,11 @@ import (
"github.com/sirupsen/logrus"
)
+const (
+ warningThNetworkControlPlaneMTU = 1500
+ minimumNetworkControlPlaneMTU = 500
+)
+
// Config encapsulates configurations of various Libnetwork components
type Config struct {
Daemon DaemonCfg
@@ -226,9 +231,12 @@ func OptionExperimental(exp bool) Option {
func OptionNetworkControlPlaneMTU(exp int) Option {
return func(c *Config) {
logrus.Debugf("Network Control Plane MTU: %d", exp)
- if exp < 1500 {
- // if exp == 0 the value won't be used
- logrus.Warnf("Received a MTU of %d, this value is very low, the network control plane can misbehave", exp)
+ if exp < warningThNetworkControlPlaneMTU {
+ logrus.Warnf("Received a MTU of %d, this value is very low, the network control plane can misbehave,"+
+ " defaulting to minimum value (%d)", exp, minimumNetworkControlPlaneMTU)
+ if exp < minimumNetworkControlPlaneMTU {
+ exp = minimumNetworkControlPlaneMTU
+ }
}
c.Daemon.NetworkControlPlaneMTU = exp
}
diff --git a/vendor/github.com/docker/libnetwork/endpoint.go b/vendor/github.com/docker/libnetwork/endpoint.go
index 724d0e531..a2d1dbc4c 100644
--- a/vendor/github.com/docker/libnetwork/endpoint.go
+++ b/vendor/github.com/docker/libnetwork/endpoint.go
@@ -75,6 +75,7 @@ type endpoint struct {
dbIndex uint64
dbExists bool
serviceEnabled bool
+ loadBalancer bool
sync.Mutex
}
@@ -101,6 +102,7 @@ func (ep *endpoint) MarshalJSON() ([]byte, error) {
epMap["virtualIP"] = ep.virtualIP.String()
epMap["ingressPorts"] = ep.ingressPorts
epMap["svcAliases"] = ep.svcAliases
+ epMap["loadBalancer"] = ep.loadBalancer
return json.Marshal(epMap)
}
@@ -201,6 +203,10 @@ func (ep *endpoint) UnmarshalJSON(b []byte) (err error) {
ep.virtualIP = net.ParseIP(vip.(string))
}
+ if v, ok := epMap["loadBalancer"]; ok {
+ ep.loadBalancer = v.(bool)
+ }
+
sal, _ := json.Marshal(epMap["svcAliases"])
var svcAliases []string
json.Unmarshal(sal, &svcAliases)
@@ -238,6 +244,7 @@ func (ep *endpoint) CopyTo(o datastore.KVObject) error {
dstEp.svcName = ep.svcName
dstEp.svcID = ep.svcID
dstEp.virtualIP = ep.virtualIP
+ dstEp.loadBalancer = ep.loadBalancer
dstEp.svcAliases = make([]string, len(ep.svcAliases))
copy(dstEp.svcAliases, ep.svcAliases)
@@ -985,7 +992,7 @@ func CreateOptionDisableResolution() EndpointOption {
}
}
-//CreateOptionAlias function returns an option setter for setting endpoint alias
+// CreateOptionAlias function returns an option setter for setting endpoint alias
func CreateOptionAlias(name string, alias string) EndpointOption {
return func(ep *endpoint) {
if ep.aliases == nil {
@@ -1006,13 +1013,20 @@ func CreateOptionService(name, id string, vip net.IP, ingressPorts []*PortConfig
}
}
-//CreateOptionMyAlias function returns an option setter for setting endpoint's self alias
+// CreateOptionMyAlias function returns an option setter for setting endpoint's self alias
func CreateOptionMyAlias(alias string) EndpointOption {
return func(ep *endpoint) {
ep.myAliases = append(ep.myAliases, alias)
}
}
+// CreateOptionLoadBalancer function returns an option setter for denoting the endpoint is a load balancer for a network
+func CreateOptionLoadBalancer() EndpointOption {
+ return func(ep *endpoint) {
+ ep.loadBalancer = true
+ }
+}
+
// JoinOptionPriority function returns an option setter for priority option to
// be passed to the endpoint.Join() method.
func JoinOptionPriority(ep Endpoint, prio int) EndpointOption {
diff --git a/vendor/github.com/docker/libnetwork/endpoint_info.go b/vendor/github.com/docker/libnetwork/endpoint_info.go
index 47bff432c..b5d3fabcb 100644
--- a/vendor/github.com/docker/libnetwork/endpoint_info.go
+++ b/vendor/github.com/docker/libnetwork/endpoint_info.go
@@ -31,6 +31,9 @@ type EndpointInfo interface {
// Sandbox returns the attached sandbox if there, nil otherwise.
Sandbox() Sandbox
+
+ // LoadBalancer returns whether the endpoint is the load balancer endpoint for the network.
+ LoadBalancer() bool
}
// InterfaceInfo provides an interface to retrieve interface addresses bound to the endpoint.
@@ -327,6 +330,12 @@ func (ep *endpoint) Sandbox() Sandbox {
return cnt
}
+func (ep *endpoint) LoadBalancer() bool {
+ ep.Lock()
+ defer ep.Unlock()
+ return ep.loadBalancer
+}
+
func (ep *endpoint) StaticRoutes() []*types.StaticRoute {
ep.Lock()
defer ep.Unlock()
diff --git a/vendor/github.com/docker/libnetwork/libnetwork_test.go b/vendor/github.com/docker/libnetwork/libnetwork_test.go
index 2b04f58fe..21cfb33c3 100644
--- a/vendor/github.com/docker/libnetwork/libnetwork_test.go
+++ b/vendor/github.com/docker/libnetwork/libnetwork_test.go
@@ -417,7 +417,7 @@ func TestNetworkConfig(t *testing.T) {
libnetwork.NetworkOptionIpam("", "", ipamV4ConfList, nil, nil),
libnetwork.NetworkOptionIpam("", "", nil, ipamV6ConfList, nil),
libnetwork.NetworkOptionLabels(map[string]string{"number": "two"}),
- libnetwork.NetworkOptionDriverOpts(map[string]string{"com.docker.network.mtu": "1600"}),
+ libnetwork.NetworkOptionDriverOpts(map[string]string{"com.docker.network.driver.mtu": "1600"}),
} {
_, err = controller.NewNetwork(bridgeNetType, "testBR", "",
libnetwork.NetworkOptionConfigFrom("config_network0"), opt)
diff --git a/vendor/github.com/docker/libnetwork/sandbox.go b/vendor/github.com/docker/libnetwork/sandbox.go
index 6f4c2508b..315195ebb 100644
--- a/vendor/github.com/docker/libnetwork/sandbox.go
+++ b/vendor/github.com/docker/libnetwork/sandbox.go
@@ -916,6 +916,13 @@ func (sb *sandbox) clearNetworkResources(origEp *endpoint) error {
break
}
}
+
+ if index == -1 {
+ logrus.Warnf("Endpoint %s has already been deleted", ep.Name())
+ sb.Unlock()
+ return nil
+ }
+
heap.Remove(&sb.endpoints, index)
for _, e := range sb.endpoints {
if len(e.Gateway()) > 0 {
diff --git a/vendor/github.com/docker/libnetwork/service.go b/vendor/github.com/docker/libnetwork/service.go
index 5a0d7e005..63095f31b 100644
--- a/vendor/github.com/docker/libnetwork/service.go
+++ b/vendor/github.com/docker/libnetwork/service.go
@@ -89,4 +89,5 @@ type loadBalancer struct {
// Back pointer to service to which the loadbalancer belongs.
service *service
+ sync.Mutex
}
diff --git a/vendor/github.com/docker/libnetwork/service_common.go b/vendor/github.com/docker/libnetwork/service_common.go
index 64d283e54..fe54ea30c 100644
--- a/vendor/github.com/docker/libnetwork/service_common.go
+++ b/vendor/github.com/docker/libnetwork/service_common.go
@@ -287,7 +287,7 @@ func (c *controller) addServiceBinding(svcName, svcID, nID, eID, containerName s
// Add loadbalancer service and backend in all sandboxes in
// the network only if vip is valid.
if len(vip) != 0 {
- n.(*network).addLBBackend(ip, vip, lb.fwMark, ingressPorts)
+ n.(*network).addLBBackend(ip, vip, lb, ingressPorts)
}
// Add the appropriate name resolutions
@@ -355,7 +355,7 @@ func (c *controller) rmServiceBinding(svcName, svcID, nID, eID, containerName st
// Remove loadbalancer service(if needed) and backend in all
// sandboxes in the network only if the vip is valid.
if len(vip) != 0 && entries == 0 {
- n.(*network).rmLBBackend(ip, vip, lb.fwMark, ingressPorts, rmService)
+ n.(*network).rmLBBackend(ip, vip, lb, ingressPorts, rmService)
}
// Delete the name resolutions
diff --git a/vendor/github.com/docker/libnetwork/service_linux.go b/vendor/github.com/docker/libnetwork/service_linux.go
index 00665941e..d8a95b2f5 100644
--- a/vendor/github.com/docker/libnetwork/service_linux.go
+++ b/vendor/github.com/docker/libnetwork/service_linux.go
@@ -111,7 +111,7 @@ func (sb *sandbox) populateLoadbalancers(ep *endpoint) {
// Add loadbalancer backend to all sandboxes which has a connection to
// this network. If needed add the service as well.
-func (n *network) addLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*PortConfig) {
+func (n *network) addLBBackend(ip, vip net.IP, lb *loadBalancer, ingressPorts []*PortConfig) {
n.WalkEndpoints(func(e Endpoint) bool {
ep := e.(*endpoint)
if sb, ok := ep.getSandbox(); ok {
@@ -124,7 +124,7 @@ func (n *network) addLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*Po
gwIP = ep.Iface().Address().IP
}
- sb.addLBBackend(ip, vip, fwMark, ingressPorts, ep.Iface().Address(), gwIP, n.ingress)
+ sb.addLBBackend(ip, vip, lb.fwMark, ingressPorts, ep.Iface().Address(), gwIP, n.ingress)
}
return false
@@ -134,7 +134,7 @@ func (n *network) addLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*Po
// Remove loadbalancer backend from all sandboxes which has a
// connection to this network. If needed remove the service entry as
// well, as specified by the rmService bool.
-func (n *network) rmLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*PortConfig, rmService bool) {
+func (n *network) rmLBBackend(ip, vip net.IP, lb *loadBalancer, ingressPorts []*PortConfig, rmService bool) {
n.WalkEndpoints(func(e Endpoint) bool {
ep := e.(*endpoint)
if sb, ok := ep.getSandbox(); ok {
@@ -147,7 +147,7 @@ func (n *network) rmLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*Por
gwIP = ep.Iface().Address().IP
}
- sb.rmLBBackend(ip, vip, fwMark, ingressPorts, ep.Iface().Address(), gwIP, rmService, n.ingress)
+ sb.rmLBBackend(ip, vip, lb.fwMark, ingressPorts, ep.Iface().Address(), gwIP, rmService, n.ingress)
}
return false
diff --git a/vendor/github.com/docker/libnetwork/service_windows.go b/vendor/github.com/docker/libnetwork/service_windows.go
index 6fe521ef9..9ed3e0604 100644
--- a/vendor/github.com/docker/libnetwork/service_windows.go
+++ b/vendor/github.com/docker/libnetwork/service_windows.go
@@ -1,11 +1,146 @@
package libnetwork
-import "net"
+import (
+ "net"
-func (n *network) addLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*PortConfig) {
+ "github.com/Microsoft/hcsshim"
+ "github.com/docker/docker/pkg/system"
+ "github.com/sirupsen/logrus"
+)
+
+type policyLists struct {
+ ilb *hcsshim.PolicyList
+ elb *hcsshim.PolicyList
}
-func (n *network) rmLBBackend(ip, vip net.IP, fwMark uint32, ingressPorts []*PortConfig, rmService bool) {
+var lbPolicylistMap map[*loadBalancer]*policyLists
+
+func init() {
+ lbPolicylistMap = make(map[*loadBalancer]*policyLists)
+}
+
+func (n *network) addLBBackend(ip, vip net.IP, lb *loadBalancer, ingressPorts []*PortConfig) {
+
+ if system.GetOSVersion().Build > 16236 {
+ lb.Lock()
+ defer lb.Unlock()
+ //find the load balancer IP for the network.
+ var sourceVIP string
+ for _, e := range n.Endpoints() {
+ epInfo := e.Info()
+ if epInfo == nil {
+ continue
+ }
+ if epInfo.LoadBalancer() {
+ sourceVIP = epInfo.Iface().Address().IP.String()
+ break
+ }
+ }
+
+ if sourceVIP == "" {
+ logrus.Errorf("Failed to find load balancer IP for network %s", n.Name())
+ return
+ }
+
+ var endpoints []hcsshim.HNSEndpoint
+
+ for eid := range lb.backEnds {
+ //Call HNS to get back ID (GUID) corresponding to the endpoint.
+ hnsEndpoint, err := hcsshim.GetHNSEndpointByName(eid)
+ if err != nil {
+ logrus.Errorf("Failed to find HNS ID for endpoint %v: %v", eid, err)
+ return
+ }
+
+ endpoints = append(endpoints, *hnsEndpoint)
+ }
+
+ if policies, ok := lbPolicylistMap[lb]; ok {
+
+ if policies.ilb != nil {
+ policies.ilb.Delete()
+ policies.ilb = nil
+ }
+
+ if policies.elb != nil {
+ policies.elb.Delete()
+ policies.elb = nil
+ }
+ delete(lbPolicylistMap, lb)
+ }
+
+ ilbPolicy, err := hcsshim.AddLoadBalancer(endpoints, true, sourceVIP, vip.String(), 0, 0, 0)
+ if err != nil {
+ logrus.Errorf("Failed to add ILB policy for service %s (%s) with endpoints %v using load balancer IP %s on network %s: %v",
+ lb.service.name, vip.String(), endpoints, sourceVIP, n.Name(), err)
+ return
+ }
+
+ lbPolicylistMap[lb] = &policyLists{
+ ilb: ilbPolicy,
+ }
+
+ publishedPorts := make(map[uint32]uint32)
+
+ for i, port := range ingressPorts {
+ protocol := uint16(6)
+
+ // Skip already published port
+ if publishedPorts[port.PublishedPort] == port.TargetPort {
+ continue
+ }
+
+ if port.Protocol == ProtocolUDP {
+ protocol = 17
+ }
+
+ // check if already has udp matching to add wild card publishing
+ for j := i + 1; j < len(ingressPorts); j++ {
+ if ingressPorts[j].TargetPort == port.TargetPort &&
+ ingressPorts[j].PublishedPort == port.PublishedPort {
+ protocol = 0
+ }
+ }
+
+ publishedPorts[port.PublishedPort] = port.TargetPort
+
+ lbPolicylistMap[lb].elb, err = hcsshim.AddLoadBalancer(endpoints, false, sourceVIP, "", protocol, uint16(port.TargetPort), uint16(port.PublishedPort))
+ if err != nil {
+ logrus.Errorf("Failed to add ELB policy for service %s (ip:%s target port:%v published port:%v) with endpoints %v using load balancer IP %s on network %s: %v",
+ lb.service.name, vip.String(), uint16(port.TargetPort), uint16(port.PublishedPort), endpoints, sourceVIP, n.Name(), err)
+ return
+ }
+ }
+ }
+}
+
+func (n *network) rmLBBackend(ip, vip net.IP, lb *loadBalancer, ingressPorts []*PortConfig, rmService bool) {
+ if system.GetOSVersion().Build > 16236 {
+ if len(lb.backEnds) > 0 {
+ //Reprogram HNS (actually VFP) with the existing backends.
+ n.addLBBackend(ip, vip, lb, ingressPorts)
+ } else {
+ lb.Lock()
+ defer lb.Unlock()
+ logrus.Debugf("No more backends for service %s (ip:%s). Removing all policies", lb.service.name, lb.vip.String())
+
+ if policyLists, ok := lbPolicylistMap[lb]; ok {
+ if policyLists.ilb != nil {
+ policyLists.ilb.Delete()
+ policyLists.ilb = nil
+ }
+
+ if policyLists.elb != nil {
+ policyLists.elb.Delete()
+ policyLists.elb = nil
+ }
+ delete(lbPolicylistMap, lb)
+
+ } else {
+ logrus.Errorf("Failed to find policies for service %s (%s)", lb.service.name, lb.vip.String())
+ }
+ }
+ }
}
func (sb *sandbox) populateLoadbalancers(ep *endpoint) {
diff --git a/vendor/github.com/docker/libnetwork/vendor.conf b/vendor/github.com/docker/libnetwork/vendor.conf
index 6751cba47..c97f5517d 100644
--- a/vendor/github.com/docker/libnetwork/vendor.conf
+++ b/vendor/github.com/docker/libnetwork/vendor.conf
@@ -1,7 +1,7 @@
github.com/Azure/go-ansiterm 19f72df4d05d31cbe1c56bfc8045c96babff6c7e
github.com/BurntSushi/toml f706d00e3de6abe700c994cdd545a1a4915af060
github.com/Microsoft/go-winio ce2922f643c8fd76b46cadc7f404a06282678b34
-github.com/Microsoft/hcsshim v0.6.1
+github.com/Microsoft/hcsshim v0.6.3
github.com/armon/go-metrics eb0af217e5e9747e41dd5303755356b62d28e3ec
github.com/armon/go-radix e39d623f12e8e41c7b5529e9a9dd67a1e2261f80
github.com/boltdb/bolt c6ba97b89e0454fec9aa92e1d33a4e2c5fc1f631
diff --git a/vendor/github.com/docker/swarmkit/api/api.pb.txt b/vendor/github.com/docker/swarmkit/api/api.pb.txt
index 1cde79716..192cfabce 100755
--- a/vendor/github.com/docker/swarmkit/api/api.pb.txt
+++ b/vendor/github.com/docker/swarmkit/api/api.pb.txt
@@ -2253,6 +2253,14 @@ file {
}
json_name: "readonly"
}
+ field {
+ name: "consistency"
+ number: 8
+ label: LABEL_OPTIONAL
+ type: TYPE_ENUM
+ type_name: ".docker.swarmkit.v1.Mount.Consistency"
+ json_name: "consistency"
+ }
field {
name: "bind_options"
number: 5
@@ -2435,6 +2443,41 @@ file {
62023: "MountType"
}
}
+ enum_type {
+ name: "Consistency"
+ value {
+ name: "DEFAULT"
+ number: 0
+ options {
+ 66001: "MountConsistencyDefault"
+ }
+ }
+ value {
+ name: "CONSISTENT"
+ number: 1
+ options {
+ 66001: "MountConsistencyFull"
+ }
+ }
+ value {
+ name: "CACHED"
+ number: 2
+ options {
+ 66001: "MountConsistencyCached"
+ }
+ }
+ value {
+ name: "DELEGATED"
+ number: 3
+ options {
+ 66001: "MountConsistencyDelegated"
+ }
+ }
+ options {
+ 62001: 0
+ 62023: "MountConsistency"
+ }
+ }
}
message_type {
name: "RestartPolicy"
diff --git a/vendor/github.com/docker/swarmkit/api/objects.pb.go b/vendor/github.com/docker/swarmkit/api/objects.pb.go
index d7a2f015a..cc1a6480f 100644
--- a/vendor/github.com/docker/swarmkit/api/objects.pb.go
+++ b/vendor/github.com/docker/swarmkit/api/objects.pb.go
@@ -57,6 +57,7 @@ type Node struct {
// ManagerStatus provides the current status of the node's manager
// component, if the node is a manager.
ManagerStatus *ManagerStatus `protobuf:"bytes,6,opt,name=manager_status,json=managerStatus" json:"manager_status,omitempty"`
+ // DEPRECATED: Use lb_attachments to find the ingress network
// The node attachment to the ingress network.
Attachment *NetworkAttachment `protobuf:"bytes,7,opt,name=attachment" json:"attachment,omitempty"`
// Certificate is the TLS certificate issued for the node, if any.
@@ -71,6 +72,10 @@ type Node struct {
// shows the privilege level that the CA would currently grant when
// issuing or renewing the node's certificate.
Role NodeRole `protobuf:"varint,9,opt,name=role,proto3,enum=docker.swarmkit.v1.NodeRole" json:"role,omitempty"`
+ // Each node uses the network attachment to set up an endpoint on the
+ // node to be used for load balancing. Each overlay network, including
+ // ingress network, will have an NetworkAttachment.
+ LbAttachments []*NetworkAttachment `protobuf:"bytes,10,rep,name=lb_attachments,json=lbAttachments" json:"lb_attachments,omitempty"`
}
func (m *Node) Reset() { *m = Node{} }
@@ -403,6 +408,14 @@ func (m *Node) CopyFrom(src interface{}) {
github_com_docker_swarmkit_api_deepcopy.Copy(m.Attachment, o.Attachment)
}
github_com_docker_swarmkit_api_deepcopy.Copy(&m.Certificate, &o.Certificate)
+ if o.LbAttachments != nil {
+ m.LbAttachments = make([]*NetworkAttachment, len(o.LbAttachments))
+ for i := range m.LbAttachments {
+ m.LbAttachments[i] = &NetworkAttachment{}
+ github_com_docker_swarmkit_api_deepcopy.Copy(m.LbAttachments[i], o.LbAttachments[i])
+ }
+ }
+
}
func (m *Service) Copy() *Service {
@@ -849,6 +862,18 @@ func (m *Node) MarshalTo(dAtA []byte) (int, error) {
i++
i = encodeVarintObjects(dAtA, i, uint64(m.Role))
}
+ if len(m.LbAttachments) > 0 {
+ for _, msg := range m.LbAttachments {
+ dAtA[i] = 0x52
+ i++
+ i = encodeVarintObjects(dAtA, i, uint64(msg.Size()))
+ n, err := msg.MarshalTo(dAtA[i:])
+ if err != nil {
+ return 0, err
+ }
+ i += n
+ }
+ }
return i, nil
}
@@ -1670,6 +1695,12 @@ func (m *Node) Size() (n int) {
if m.Role != 0 {
n += 1 + sovObjects(uint64(m.Role))
}
+ if len(m.LbAttachments) > 0 {
+ for _, e := range m.LbAttachments {
+ l = e.Size()
+ n += 1 + l + sovObjects(uint64(l))
+ }
+ }
return n
}
@@ -4383,6 +4414,7 @@ func (this *Node) String() string {
`Attachment:` + strings.Replace(fmt.Sprintf("%v", this.Attachment), "NetworkAttachment", "NetworkAttachment", 1) + `,`,
`Certificate:` + strings.Replace(strings.Replace(this.Certificate.String(), "Certificate", "Certificate", 1), `&`, ``, 1) + `,`,
`Role:` + fmt.Sprintf("%v", this.Role) + `,`,
+ `LbAttachments:` + strings.Replace(fmt.Sprintf("%v", this.LbAttachments), "NetworkAttachment", "NetworkAttachment", 1) + `,`,
`}`,
}, "")
return s
@@ -5017,6 +5049,37 @@ func (m *Node) Unmarshal(dAtA []byte) error {
break
}
}
+ case 10:
+ if wireType != 2 {
+ return fmt.Errorf("proto: wrong wireType = %d for field LbAttachments", wireType)
+ }
+ var msglen int
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowObjects
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ msglen |= (int(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
+ if msglen < 0 {
+ return ErrInvalidLengthObjects
+ }
+ postIndex := iNdEx + msglen
+ if postIndex > l {
+ return io.ErrUnexpectedEOF
+ }
+ m.LbAttachments = append(m.LbAttachments, &NetworkAttachment{})
+ if err := m.LbAttachments[len(m.LbAttachments)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
+ return err
+ }
+ iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := skipObjects(dAtA[iNdEx:])
@@ -7689,100 +7752,101 @@ var (
func init() { proto.RegisterFile("github.com/docker/swarmkit/api/objects.proto", fileDescriptorObjects) }
var fileDescriptorObjects = []byte{
- // 1513 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6f, 0x1b, 0x4f,
- 0x19, 0xef, 0xda, 0x1b, 0xbf, 0x3c, 0x4e, 0x4c, 0x98, 0x7f, 0x08, 0x5b, 0x13, 0xec, 0xe0, 0x0a,
- 0x54, 0x55, 0x95, 0x53, 0x42, 0x81, 0x34, 0x50, 0x5a, 0x3b, 0x89, 0x5a, 0xab, 0x94, 0x46, 0xd3,
- 0xd2, 0x72, 0x5b, 0x26, 0xbb, 0x53, 0x77, 0xf1, 0x7a, 0x67, 0xb5, 0x33, 0x76, 0xf1, 0x8d, 0x73,
- 0xf8, 0x00, 0xb9, 0x71, 0xe8, 0x57, 0x80, 0x0b, 0x17, 0x0e, 0x9c, 0x7a, 0xe4, 0x84, 0x38, 0x45,
- 0xd4, 0xdf, 0x02, 0x89, 0x03, 0x9a, 0xd9, 0x59, 0x7b, 0x13, 0xaf, 0x93, 0x14, 0x55, 0xd1, 0xff,
- 0x94, 0x99, 0x9d, 0xdf, 0xef, 0x79, 0x9b, 0xe7, 0x65, 0x62, 0xb8, 0xdb, 0xf3, 0xc4, 0xbb, 0xe1,
- 0x51, 0xcb, 0x61, 0x83, 0x2d, 0x97, 0x39, 0x7d, 0x1a, 0x6d, 0xf1, 0xf7, 0x24, 0x1a, 0xf4, 0x3d,
- 0xb1, 0x45, 0x42, 0x6f, 0x8b, 0x1d, 0xfd, 0x8e, 0x3a, 0x82, 0xb7, 0xc2, 0x88, 0x09, 0x86, 0x50,
- 0x0c, 0x69, 0x25, 0x90, 0xd6, 0xe8, 0x87, 0xb5, 0x3b, 0x97, 0x48, 0x10, 0xe3, 0x90, 0x6a, 0xfe,
- 0xa5, 0x58, 0x1e, 0x52, 0x27, 0xc1, 0x36, 0x7a, 0x8c, 0xf5, 0x7c, 0xba, 0xa5, 0x76, 0x47, 0xc3,
- 0xb7, 0x5b, 0xc2, 0x1b, 0x50, 0x2e, 0xc8, 0x20, 0xd4, 0x80, 0xb5, 0x1e, 0xeb, 0x31, 0xb5, 0xdc,
- 0x92, 0x2b, 0xfd, 0xf5, 0xe6, 0x79, 0x1a, 0x09, 0xc6, 0xfa, 0xe8, 0xa7, 0x17, 0x68, 0x9f, 0xc2,
- 0x43, 0x7f, 0xd8, 0xf3, 0x02, 0xfd, 0x27, 0x26, 0x36, 0xff, 0x6a, 0x80, 0xf9, 0x9c, 0x0a, 0x82,
- 0x7e, 0x06, 0xc5, 0x11, 0x8d, 0xb8, 0xc7, 0x02, 0xcb, 0xd8, 0x34, 0x6e, 0x57, 0xb6, 0xbf, 0xd3,
- 0x9a, 0x8f, 0x48, 0xeb, 0x75, 0x0c, 0xe9, 0x98, 0x1f, 0x4f, 0x1b, 0x37, 0x70, 0xc2, 0x40, 0x0f,
- 0x00, 0x9c, 0x88, 0x12, 0x41, 0x5d, 0x9b, 0x08, 0x2b, 0xa7, 0xf8, 0xb5, 0x56, 0x6c, 0x6e, 0x2b,
- 0xd1, 0xdf, 0x7a, 0x95, 0x78, 0x89, 0xcb, 0x1a, 0xdd, 0x16, 0x92, 0x3a, 0x0c, 0xdd, 0x84, 0x9a,
- 0xbf, 0x9c, 0xaa, 0xd1, 0x6d, 0xd1, 0xfc, 0xb3, 0x09, 0xe6, 0xaf, 0x98, 0x4b, 0xd1, 0x3a, 0xe4,
- 0x3c, 0x57, 0x99, 0x5d, 0xee, 0x14, 0x26, 0xa7, 0x8d, 0x5c, 0x77, 0x1f, 0xe7, 0x3c, 0x17, 0x6d,
- 0x83, 0x39, 0xa0, 0x82, 0x68, 0x83, 0xac, 0x2c, 0x87, 0xa4, 0xef, 0xda, 0x1b, 0x85, 0x45, 0x3f,
- 0x01, 0x53, 0x5e, 0x95, 0xb6, 0x64, 0x23, 0x8b, 0x23, 0x75, 0xbe, 0x0c, 0xa9, 0x93, 0xf0, 0x24,
- 0x1e, 0x1d, 0x40, 0xc5, 0xa5, 0xdc, 0x89, 0xbc, 0x50, 0xc8, 0x18, 0x9a, 0x8a, 0x7e, 0x6b, 0x11,
- 0x7d, 0x7f, 0x06, 0xc5, 0x69, 0x1e, 0xfa, 0x39, 0x14, 0xb8, 0x20, 0x62, 0xc8, 0xad, 0x25, 0x25,
- 0xa1, 0xbe, 0xd0, 0x00, 0x85, 0xd2, 0x26, 0x68, 0x0e, 0x7a, 0x0a, 0xd5, 0x01, 0x09, 0x48, 0x8f,
- 0x46, 0xb6, 0x96, 0x52, 0x50, 0x52, 0xbe, 0x97, 0xe9, 0x7a, 0x8c, 0x8c, 0x05, 0xe1, 0x95, 0x41,
- 0x7a, 0x8b, 0x0e, 0x00, 0x88, 0x10, 0xc4, 0x79, 0x37, 0xa0, 0x81, 0xb0, 0x8a, 0x4a, 0xca, 0xf7,
- 0x33, 0x6d, 0xa1, 0xe2, 0x3d, 0x8b, 0xfa, 0xed, 0x29, 0x18, 0xa7, 0x88, 0xe8, 0x09, 0x54, 0x1c,
- 0x1a, 0x09, 0xef, 0xad, 0xe7, 0x10, 0x41, 0xad, 0x92, 0x92, 0xd3, 0xc8, 0x92, 0xb3, 0x37, 0x83,
- 0x69, 0xa7, 0xd2, 0x4c, 0x74, 0x0f, 0xcc, 0x88, 0xf9, 0xd4, 0x2a, 0x6f, 0x1a, 0xb7, 0xab, 0x8b,
- 0xaf, 0x05, 0x33, 0x9f, 0x62, 0x85, 0xdc, 0x5d, 0x3f, 0x3e, 0x69, 0x22, 0x58, 0x2d, 0x19, 0xab,
- 0x86, 0x4a, 0x0d, 0xe3, 0x9e, 0xf1, 0x1b, 0xe3, 0xb7, 0x46, 0xf3, 0xbf, 0x79, 0x28, 0xbe, 0xa4,
- 0xd1, 0xc8, 0x73, 0xbe, 0x6c, 0xe2, 0x3c, 0x38, 0x93, 0x38, 0x99, 0x3e, 0x6a, 0xb5, 0x73, 0xb9,
- 0xb3, 0x03, 0x25, 0x1a, 0xb8, 0x21, 0xf3, 0x02, 0xa1, 0x13, 0x27, 0xd3, 0xc1, 0x03, 0x8d, 0xc1,
- 0x53, 0x34, 0x3a, 0x80, 0x95, 0xb8, 0x1e, 0xec, 0x33, 0x59, 0xb3, 0x99, 0x45, 0xff, 0xb5, 0x02,
- 0xea, 0xeb, 0x5e, 0x1e, 0xa6, 0x76, 0x68, 0x1f, 0x56, 0xc2, 0x88, 0x8e, 0x3c, 0x36, 0xe4, 0xb6,
- 0x72, 0xa2, 0x70, 0x25, 0x27, 0xf0, 0x72, 0xc2, 0x92, 0x3b, 0xf4, 0x0b, 0x58, 0x96, 0x64, 0x3b,
- 0xe9, 0x23, 0x70, 0x69, 0x1f, 0xc1, 0x15, 0x49, 0xd0, 0x1b, 0xf4, 0x02, 0xbe, 0x75, 0xc6, 0x8a,
- 0xa9, 0xa0, 0xca, 0xe5, 0x82, 0xbe, 0x4a, 0x5b, 0xa2, 0x3f, 0xee, 0xa2, 0xe3, 0x93, 0x66, 0x15,
- 0x96, 0xd3, 0x29, 0xd0, 0xfc, 0x53, 0x0e, 0x4a, 0x49, 0x20, 0xd1, 0x7d, 0x7d, 0x67, 0xc6, 0xe2,
- 0xa8, 0x25, 0x58, 0xe5, 0x6f, 0x7c, 0x5d, 0xf7, 0x61, 0x29, 0x64, 0x91, 0xe0, 0x56, 0x6e, 0x33,
- 0xbf, 0xa8, 0x44, 0x0f, 0x59, 0x24, 0xf6, 0x58, 0xf0, 0xd6, 0xeb, 0xe1, 0x18, 0x8c, 0xde, 0x40,
- 0x65, 0xe4, 0x45, 0x62, 0x48, 0x7c, 0xdb, 0x0b, 0xb9, 0x95, 0x57, 0xdc, 0x1f, 0x5c, 0xa4, 0xb2,
- 0xf5, 0x3a, 0xc6, 0x77, 0x0f, 0x3b, 0xd5, 0xc9, 0x69, 0x03, 0xa6, 0x5b, 0x8e, 0x41, 0x8b, 0xea,
- 0x86, 0xbc, 0xf6, 0x1c, 0xca, 0xd3, 0x13, 0x74, 0x17, 0x20, 0x88, 0x2b, 0xd2, 0x9e, 0x66, 0xf6,
- 0xca, 0xe4, 0xb4, 0x51, 0xd6, 0x75, 0xda, 0xdd, 0xc7, 0x65, 0x0d, 0xe8, 0xba, 0x08, 0x81, 0x49,
- 0x5c, 0x37, 0x52, 0x79, 0x5e, 0xc6, 0x6a, 0xdd, 0xfc, 0x63, 0x11, 0xcc, 0x57, 0x84, 0xf7, 0xaf,
- 0xbb, 0xab, 0x4a, 0x9d, 0x73, 0x95, 0x71, 0x17, 0x80, 0xc7, 0xf9, 0x26, 0xdd, 0x31, 0x67, 0xee,
- 0xe8, 0x2c, 0x94, 0xee, 0x68, 0x40, 0xec, 0x0e, 0xf7, 0x99, 0x50, 0x45, 0x60, 0x62, 0xb5, 0x46,
- 0xb7, 0xa0, 0x18, 0x30, 0x57, 0xd1, 0x0b, 0x8a, 0x0e, 0x93, 0xd3, 0x46, 0x41, 0xf6, 0x8a, 0xee,
- 0x3e, 0x2e, 0xc8, 0xa3, 0xae, 0x2b, 0xdb, 0x14, 0x09, 0x02, 0x26, 0x88, 0xec, 0xc1, 0x5c, 0xb7,
- 0xbb, 0xcc, 0xec, 0x6f, 0xcf, 0x60, 0x49, 0x9b, 0x4a, 0x31, 0xd1, 0x6b, 0xf8, 0x2a, 0xb1, 0x37,
- 0x2d, 0xb0, 0xf4, 0x39, 0x02, 0x91, 0x96, 0x90, 0x3a, 0x49, 0x8d, 0x85, 0xf2, 0xe2, 0xb1, 0xa0,
- 0x22, 0x98, 0x35, 0x16, 0x3a, 0xb0, 0xe2, 0x52, 0xee, 0x45, 0xd4, 0x55, 0x6d, 0x82, 0xaa, 0xca,
- 0xac, 0x6e, 0x7f, 0xf7, 0x22, 0x21, 0x14, 0x2f, 0x6b, 0x8e, 0xda, 0xa1, 0x36, 0x94, 0x74, 0xde,
- 0x70, 0xab, 0xa2, 0x72, 0xf7, 0x8a, 0xe3, 0x60, 0x4a, 0x3b, 0xd3, 0xe6, 0x96, 0x3f, 0xab, 0xcd,
- 0x3d, 0x00, 0xf0, 0x59, 0xcf, 0x76, 0x23, 0x6f, 0x44, 0x23, 0x6b, 0x45, 0x3f, 0x12, 0x32, 0xb8,
- 0xfb, 0x0a, 0x81, 0xcb, 0x3e, 0xeb, 0xc5, 0xcb, 0xb9, 0xa6, 0x54, 0xfd, 0xcc, 0xa6, 0x44, 0xa0,
- 0x46, 0x38, 0xf7, 0x7a, 0x01, 0x75, 0xed, 0x1e, 0x0d, 0x68, 0xe4, 0x39, 0x76, 0x44, 0x39, 0x1b,
- 0x46, 0x0e, 0xe5, 0xd6, 0x37, 0x54, 0x24, 0x32, 0xc7, 0xfc, 0x93, 0x18, 0x8c, 0x35, 0x16, 0x5b,
- 0x89, 0x98, 0x73, 0x07, 0x7c, 0xb7, 0x76, 0x7c, 0xd2, 0x5c, 0x87, 0xb5, 0x74, 0x9b, 0xda, 0x31,
- 0x1e, 0x1b, 0x4f, 0x8d, 0x43, 0xa3, 0xf9, 0xf7, 0x1c, 0x7c, 0x73, 0x2e, 0xa6, 0xe8, 0xc7, 0x50,
- 0xd4, 0x51, 0xbd, 0xe8, 0xb1, 0xa6, 0x79, 0x38, 0xc1, 0xa2, 0x0d, 0x28, 0xcb, 0x12, 0xa7, 0x9c,
- 0xd3, 0xb8, 0x79, 0x95, 0xf1, 0xec, 0x03, 0xb2, 0xa0, 0x48, 0x7c, 0x8f, 0xc8, 0xb3, 0xbc, 0x3a,
- 0x4b, 0xb6, 0x68, 0x08, 0xeb, 0x71, 0xe8, 0xed, 0xd9, 0x68, 0xb7, 0x59, 0x28, 0xb8, 0x65, 0x2a,
- 0xff, 0x1f, 0x5d, 0x29, 0x13, 0xf4, 0xe5, 0xcc, 0x3e, 0xbc, 0x08, 0x05, 0x3f, 0x08, 0x44, 0x34,
- 0xc6, 0x6b, 0x6e, 0xc6, 0x51, 0xed, 0x09, 0xdc, 0x5c, 0x48, 0x41, 0xab, 0x90, 0xef, 0xd3, 0x71,
- 0xdc, 0x9e, 0xb0, 0x5c, 0xa2, 0x35, 0x58, 0x1a, 0x11, 0x7f, 0x48, 0x75, 0x37, 0x8b, 0x37, 0xbb,
- 0xb9, 0x1d, 0xa3, 0xf9, 0x21, 0x07, 0x45, 0x6d, 0xce, 0x75, 0x8f, 0x7c, 0xad, 0x76, 0xae, 0xb1,
- 0x3d, 0x84, 0x65, 0x1d, 0xd2, 0xb8, 0x22, 0xcd, 0x4b, 0x73, 0xba, 0x12, 0xe3, 0xe3, 0x6a, 0x7c,
- 0x08, 0xa6, 0x17, 0x92, 0x81, 0x1e, 0xf7, 0x99, 0x9a, 0xbb, 0x87, 0xed, 0xe7, 0x2f, 0xc2, 0xb8,
- 0xb1, 0x94, 0x26, 0xa7, 0x0d, 0x53, 0x7e, 0xc0, 0x8a, 0x96, 0x39, 0x18, 0xff, 0xb2, 0x04, 0xc5,
- 0x3d, 0x7f, 0xc8, 0x05, 0x8d, 0xae, 0x3b, 0x48, 0x5a, 0xed, 0x5c, 0x90, 0xf6, 0xa0, 0x18, 0x31,
- 0x26, 0x6c, 0x87, 0x5c, 0x14, 0x1f, 0xcc, 0x98, 0xd8, 0x6b, 0x77, 0xaa, 0x92, 0x28, 0x7b, 0x7b,
- 0xbc, 0xc7, 0x05, 0x49, 0xdd, 0x23, 0xe8, 0x0d, 0xac, 0x27, 0x13, 0xf1, 0x88, 0x31, 0xc1, 0x45,
- 0x44, 0x42, 0xbb, 0x4f, 0xc7, 0xf2, 0xad, 0x94, 0x5f, 0xf4, 0x36, 0x3e, 0x08, 0x9c, 0x68, 0xac,
- 0x82, 0xf7, 0x8c, 0x8e, 0xf1, 0x9a, 0x16, 0xd0, 0x49, 0xf8, 0xcf, 0xe8, 0x98, 0xa3, 0x47, 0xb0,
- 0x41, 0xa7, 0x30, 0x29, 0xd1, 0xf6, 0xc9, 0x40, 0xce, 0x7a, 0xdb, 0xf1, 0x99, 0xd3, 0x57, 0xe3,
- 0xc6, 0xc4, 0x37, 0x69, 0x5a, 0xd4, 0x2f, 0x63, 0xc4, 0x9e, 0x04, 0x20, 0x0e, 0xd6, 0x91, 0x4f,
- 0x9c, 0xbe, 0xef, 0x71, 0xf9, 0xef, 0x4f, 0xea, 0xb9, 0x2b, 0x27, 0x86, 0xb4, 0x6d, 0xe7, 0x82,
- 0x68, 0xb5, 0x3a, 0x33, 0x6e, 0xea, 0xf1, 0xac, 0x2b, 0xea, 0xdb, 0x47, 0xd9, 0xa7, 0xa8, 0x03,
- 0x95, 0x61, 0x20, 0xd5, 0xc7, 0x31, 0x28, 0x5f, 0x35, 0x06, 0x10, 0xb3, 0xa4, 0xe7, 0xb5, 0x11,
- 0x6c, 0x5c, 0xa4, 0x3c, 0xa3, 0x36, 0x1f, 0xa7, 0x6b, 0xb3, 0xb2, 0x7d, 0x27, 0x4b, 0x5f, 0xb6,
- 0xc8, 0x54, 0x1d, 0x67, 0xa6, 0xed, 0xdf, 0x0c, 0x28, 0xbc, 0xa4, 0x4e, 0x44, 0xc5, 0x17, 0xcd,
- 0xda, 0x9d, 0x33, 0x59, 0x5b, 0xcf, 0x7e, 0x08, 0x4b, 0xad, 0x73, 0x49, 0x5b, 0x83, 0x92, 0x17,
- 0x08, 0x1a, 0x05, 0xc4, 0x57, 0x59, 0x5b, 0xc2, 0xd3, 0x7d, 0xa6, 0x03, 0x1f, 0x0c, 0x28, 0xc4,
- 0x2f, 0xc5, 0xeb, 0x76, 0x20, 0xd6, 0x7a, 0xde, 0x81, 0x4c, 0x23, 0xff, 0x63, 0x40, 0x29, 0x19,
- 0x58, 0x5f, 0xd4, 0xcc, 0x73, 0x2f, 0xaf, 0xfc, 0xff, 0xfd, 0xf2, 0x42, 0x60, 0xf6, 0xbd, 0x40,
- 0xbf, 0x11, 0xb1, 0x5a, 0xa3, 0x16, 0x14, 0x43, 0x32, 0xf6, 0x19, 0x71, 0x75, 0xa3, 0x5c, 0x9b,
- 0xfb, 0x61, 0xa1, 0x1d, 0x8c, 0x71, 0x02, 0xda, 0x5d, 0x3b, 0x3e, 0x69, 0xae, 0x42, 0x35, 0xed,
- 0xf9, 0x3b, 0xa3, 0xf9, 0x4f, 0x03, 0xca, 0x07, 0xbf, 0x17, 0x34, 0x50, 0xef, 0x81, 0xaf, 0xa5,
- 0xf3, 0x9b, 0xf3, 0x3f, 0x3e, 0x94, 0xcf, 0xfc, 0xae, 0x90, 0x75, 0xa9, 0x1d, 0xeb, 0xe3, 0xa7,
- 0xfa, 0x8d, 0x7f, 0x7d, 0xaa, 0xdf, 0xf8, 0xc3, 0xa4, 0x6e, 0x7c, 0x9c, 0xd4, 0x8d, 0x7f, 0x4c,
- 0xea, 0xc6, 0xbf, 0x27, 0x75, 0xe3, 0xa8, 0xa0, 0xe2, 0xf3, 0xa3, 0xff, 0x05, 0x00, 0x00, 0xff,
- 0xff, 0x34, 0x0b, 0x7d, 0x79, 0x43, 0x13, 0x00, 0x00,
+ // 1536 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcd, 0x72, 0x1b, 0x4b,
+ 0x15, 0xce, 0x48, 0x63, 0xfd, 0x1c, 0xd9, 0xc2, 0xf4, 0x35, 0x66, 0x22, 0x8c, 0x64, 0x74, 0x0b,
+ 0xea, 0xd6, 0xad, 0x94, 0x1c, 0x4c, 0x00, 0xc7, 0x10, 0x12, 0xc9, 0x76, 0x25, 0xaa, 0x24, 0xc4,
+ 0xd5, 0x09, 0x09, 0xbb, 0xa1, 0x35, 0xd3, 0x51, 0x06, 0x8d, 0xa6, 0xa7, 0xa6, 0x5b, 0x0a, 0xda,
+ 0xb1, 0x61, 0x63, 0x1e, 0xc0, 0x3b, 0x16, 0x79, 0x06, 0x36, 0x6c, 0x58, 0xb0, 0xca, 0x92, 0x15,
+ 0xc5, 0xca, 0x45, 0xf4, 0x16, 0x54, 0xb1, 0xa0, 0xba, 0xa7, 0x47, 0x1a, 0x5b, 0xe3, 0x3f, 0x2a,
+ 0xe5, 0x62, 0xe5, 0xee, 0xe9, 0xef, 0x3b, 0x7f, 0x7d, 0xce, 0xe9, 0x63, 0xc1, 0x9d, 0xbe, 0x27,
+ 0xde, 0x8d, 0x7a, 0x2d, 0x87, 0x0d, 0xb7, 0x5c, 0xe6, 0x0c, 0x68, 0xb4, 0xc5, 0xdf, 0x93, 0x68,
+ 0x38, 0xf0, 0xc4, 0x16, 0x09, 0xbd, 0x2d, 0xd6, 0xfb, 0x2d, 0x75, 0x04, 0x6f, 0x85, 0x11, 0x13,
+ 0x0c, 0xa1, 0x18, 0xd2, 0x4a, 0x20, 0xad, 0xf1, 0x0f, 0x6b, 0x5f, 0x5f, 0x22, 0x41, 0x4c, 0x42,
+ 0xaa, 0xf9, 0x97, 0x62, 0x79, 0x48, 0x9d, 0x04, 0xdb, 0xe8, 0x33, 0xd6, 0xf7, 0xe9, 0x96, 0xda,
+ 0xf5, 0x46, 0x6f, 0xb7, 0x84, 0x37, 0xa4, 0x5c, 0x90, 0x61, 0xa8, 0x01, 0x6b, 0x7d, 0xd6, 0x67,
+ 0x6a, 0xb9, 0x25, 0x57, 0xfa, 0xeb, 0xed, 0xb3, 0x34, 0x12, 0x4c, 0xf4, 0xd1, 0x4f, 0x2f, 0xd0,
+ 0x3e, 0x83, 0x87, 0xfe, 0xa8, 0xef, 0x05, 0xfa, 0x4f, 0x4c, 0x6c, 0xfe, 0xc5, 0x00, 0xf3, 0x39,
+ 0x15, 0x04, 0xfd, 0x0c, 0x8a, 0x63, 0x1a, 0x71, 0x8f, 0x05, 0x96, 0xb1, 0x69, 0x7c, 0x55, 0xd9,
+ 0xfe, 0x4e, 0x6b, 0x31, 0x22, 0xad, 0xd7, 0x31, 0xa4, 0x63, 0x7e, 0x3c, 0x69, 0xdc, 0xc2, 0x09,
+ 0x03, 0xdd, 0x07, 0x70, 0x22, 0x4a, 0x04, 0x75, 0x6d, 0x22, 0xac, 0x9c, 0xe2, 0xd7, 0x5a, 0xb1,
+ 0xb9, 0xad, 0x44, 0x7f, 0xeb, 0x55, 0xe2, 0x25, 0x2e, 0x6b, 0x74, 0x5b, 0x48, 0xea, 0x28, 0x74,
+ 0x13, 0x6a, 0xfe, 0x72, 0xaa, 0x46, 0xb7, 0x45, 0xf3, 0x0f, 0x4b, 0x60, 0xfe, 0x92, 0xb9, 0x14,
+ 0xad, 0x43, 0xce, 0x73, 0x95, 0xd9, 0xe5, 0x4e, 0x61, 0x7a, 0xd2, 0xc8, 0x75, 0xf7, 0x71, 0xce,
+ 0x73, 0xd1, 0x36, 0x98, 0x43, 0x2a, 0x88, 0x36, 0xc8, 0xca, 0x72, 0x48, 0xfa, 0xae, 0xbd, 0x51,
+ 0x58, 0xf4, 0x13, 0x30, 0xe5, 0x55, 0x69, 0x4b, 0x36, 0xb2, 0x38, 0x52, 0xe7, 0xcb, 0x90, 0x3a,
+ 0x09, 0x4f, 0xe2, 0xd1, 0x01, 0x54, 0x5c, 0xca, 0x9d, 0xc8, 0x0b, 0x85, 0x8c, 0xa1, 0xa9, 0xe8,
+ 0x5f, 0x9e, 0x47, 0xdf, 0x9f, 0x43, 0x71, 0x9a, 0x87, 0x7e, 0x0e, 0x05, 0x2e, 0x88, 0x18, 0x71,
+ 0x6b, 0x49, 0x49, 0xa8, 0x9f, 0x6b, 0x80, 0x42, 0x69, 0x13, 0x34, 0x07, 0x3d, 0x81, 0xea, 0x90,
+ 0x04, 0xa4, 0x4f, 0x23, 0x5b, 0x4b, 0x29, 0x28, 0x29, 0xdf, 0xcb, 0x74, 0x3d, 0x46, 0xc6, 0x82,
+ 0xf0, 0xca, 0x30, 0xbd, 0x45, 0x5d, 0x00, 0x22, 0x04, 0x71, 0xde, 0x0d, 0x69, 0x20, 0xac, 0xa2,
+ 0x92, 0xf2, 0xfd, 0x4c, 0x5b, 0xa8, 0x78, 0xcf, 0xa2, 0x41, 0x7b, 0x06, 0xee, 0xe4, 0x2c, 0x03,
+ 0xa7, 0xc8, 0xe8, 0x31, 0x54, 0x1c, 0x1a, 0x09, 0xef, 0xad, 0xe7, 0x10, 0x41, 0xad, 0x92, 0x92,
+ 0xd5, 0xc8, 0x92, 0xb5, 0x37, 0x87, 0x69, 0xc7, 0xd2, 0x4c, 0x74, 0x17, 0xcc, 0x88, 0xf9, 0xd4,
+ 0x2a, 0x6f, 0x1a, 0x5f, 0x55, 0xcf, 0xbf, 0x1a, 0xcc, 0x7c, 0x8a, 0x15, 0x12, 0x3d, 0x83, 0xaa,
+ 0xdf, 0xb3, 0xe7, 0xb6, 0x70, 0x0b, 0x36, 0xf3, 0x57, 0xf6, 0x04, 0xaf, 0xf8, 0xbd, 0xf9, 0x8e,
+ 0xef, 0xae, 0x1f, 0x1d, 0x37, 0x11, 0xac, 0x96, 0x8c, 0x55, 0x43, 0x25, 0x9b, 0x71, 0xd7, 0xf8,
+ 0xb5, 0xf1, 0x1b, 0xa3, 0xf9, 0x9f, 0x3c, 0x14, 0x5f, 0xd2, 0x68, 0xec, 0x39, 0x9f, 0x37, 0x15,
+ 0xef, 0x9f, 0x4a, 0xc5, 0xcc, 0x88, 0x69, 0xb5, 0x0b, 0xd9, 0xb8, 0x03, 0x25, 0x1a, 0xb8, 0x21,
+ 0xf3, 0x02, 0xa1, 0x53, 0x31, 0x33, 0x5c, 0x07, 0x1a, 0x83, 0x67, 0x68, 0x74, 0x00, 0x2b, 0x71,
+ 0x85, 0xd9, 0xa7, 0xf2, 0x70, 0x33, 0x8b, 0xfe, 0x2b, 0x05, 0xd4, 0x09, 0xb4, 0x3c, 0x4a, 0xed,
+ 0xd0, 0x3e, 0xac, 0x84, 0x11, 0x1d, 0x7b, 0x6c, 0xc4, 0x6d, 0xe5, 0x44, 0xe1, 0x4a, 0x4e, 0xe0,
+ 0xe5, 0x84, 0x25, 0x77, 0xe8, 0x17, 0xb0, 0x2c, 0xc9, 0x76, 0xd2, 0x99, 0xe0, 0xd2, 0xce, 0x84,
+ 0x2b, 0x92, 0xa0, 0x37, 0xe8, 0x05, 0x7c, 0xeb, 0x94, 0x15, 0x33, 0x41, 0x95, 0xcb, 0x05, 0x7d,
+ 0x91, 0xb6, 0x44, 0x7f, 0xdc, 0x45, 0x47, 0xc7, 0xcd, 0x2a, 0x2c, 0xa7, 0x53, 0xa0, 0xf9, 0xa7,
+ 0x1c, 0x94, 0x92, 0x40, 0xa2, 0x7b, 0xfa, 0xce, 0x8c, 0xf3, 0xa3, 0x96, 0x60, 0x95, 0xbf, 0xf1,
+ 0x75, 0xdd, 0x83, 0xa5, 0x90, 0x45, 0x82, 0x5b, 0x39, 0x95, 0x9e, 0x99, 0x45, 0x7f, 0xc8, 0x22,
+ 0xb1, 0xc7, 0x82, 0xb7, 0x5e, 0x1f, 0xc7, 0x60, 0xf4, 0x06, 0x2a, 0x63, 0x2f, 0x12, 0x23, 0xe2,
+ 0xdb, 0x5e, 0xc8, 0xad, 0xbc, 0xe2, 0xfe, 0xe0, 0x22, 0x95, 0xad, 0xd7, 0x31, 0xbe, 0x7b, 0xd8,
+ 0xa9, 0x4e, 0x4f, 0x1a, 0x30, 0xdb, 0x72, 0x0c, 0x5a, 0x54, 0x37, 0xe4, 0xb5, 0xe7, 0x50, 0x9e,
+ 0x9d, 0xa0, 0x3b, 0x00, 0x41, 0x5c, 0x19, 0xf6, 0x2c, 0xb3, 0x57, 0xa6, 0x27, 0x8d, 0xb2, 0xae,
+ 0x97, 0xee, 0x3e, 0x2e, 0x6b, 0x40, 0xd7, 0x45, 0x08, 0x4c, 0xe2, 0xba, 0x91, 0xca, 0xf3, 0x32,
+ 0x56, 0xeb, 0xe6, 0x1f, 0x8b, 0x60, 0xbe, 0x22, 0x7c, 0x70, 0xd3, 0x7d, 0x5a, 0xea, 0x5c, 0xa8,
+ 0x8c, 0x3b, 0x00, 0x3c, 0xce, 0x37, 0xe9, 0x8e, 0x39, 0x77, 0x47, 0x67, 0xa1, 0x74, 0x47, 0x03,
+ 0x62, 0x77, 0xb8, 0xcf, 0x84, 0x2a, 0x02, 0x13, 0xab, 0x35, 0xfa, 0x12, 0x8a, 0x01, 0x73, 0x15,
+ 0xbd, 0xa0, 0xe8, 0x30, 0x3d, 0x69, 0x14, 0x64, 0xe7, 0xe9, 0xee, 0xe3, 0x82, 0x3c, 0xea, 0xba,
+ 0xb2, 0xe9, 0x91, 0x20, 0x60, 0x82, 0xc8, 0xae, 0xce, 0x75, 0x03, 0xcd, 0xcc, 0xfe, 0xf6, 0x1c,
+ 0x96, 0x34, 0xbd, 0x14, 0x13, 0xbd, 0x86, 0x2f, 0x12, 0x7b, 0xd3, 0x02, 0x4b, 0xd7, 0x11, 0x88,
+ 0xb4, 0x84, 0xd4, 0x49, 0xea, 0xa1, 0x29, 0x9f, 0xff, 0xd0, 0xa8, 0x08, 0x66, 0x3d, 0x34, 0x1d,
+ 0x58, 0x71, 0x29, 0xf7, 0x22, 0xea, 0xaa, 0x36, 0x41, 0x55, 0x65, 0x56, 0xb7, 0xbf, 0x7b, 0x91,
+ 0x10, 0x8a, 0x97, 0x35, 0x47, 0xed, 0x50, 0x1b, 0x4a, 0x3a, 0x6f, 0xb8, 0x55, 0xb9, 0x4e, 0x5b,
+ 0x9e, 0xd1, 0x4e, 0xb5, 0xb9, 0xe5, 0x6b, 0xb5, 0xb9, 0xfb, 0x00, 0x3e, 0xeb, 0xdb, 0x6e, 0xe4,
+ 0x8d, 0x69, 0x64, 0xad, 0xe8, 0xb1, 0x23, 0x83, 0xbb, 0xaf, 0x10, 0xb8, 0xec, 0xb3, 0x7e, 0xbc,
+ 0x5c, 0x68, 0x4a, 0xd5, 0x6b, 0x36, 0x25, 0x02, 0x35, 0xc2, 0xb9, 0xd7, 0x0f, 0xa8, 0x6b, 0xf7,
+ 0x69, 0x40, 0x23, 0xcf, 0xb1, 0x23, 0xca, 0xd9, 0x28, 0x72, 0x28, 0xb7, 0xbe, 0xa1, 0x22, 0x91,
+ 0x39, 0x38, 0x3c, 0x8e, 0xc1, 0x58, 0x63, 0xb1, 0x95, 0x88, 0x39, 0x73, 0xc0, 0x77, 0x6b, 0x47,
+ 0xc7, 0xcd, 0x75, 0x58, 0x4b, 0xb7, 0xa9, 0x1d, 0xe3, 0x91, 0xf1, 0xc4, 0x38, 0x34, 0x9a, 0x7f,
+ 0xcb, 0xc1, 0x37, 0x17, 0x62, 0x8a, 0x7e, 0x0c, 0x45, 0x1d, 0xd5, 0x8b, 0xc6, 0x3f, 0xcd, 0xc3,
+ 0x09, 0x16, 0x6d, 0x40, 0x59, 0x96, 0x38, 0xe5, 0x9c, 0xc6, 0xcd, 0xab, 0x8c, 0xe7, 0x1f, 0x90,
+ 0x05, 0x45, 0xe2, 0x7b, 0x44, 0x9e, 0xe5, 0xd5, 0x59, 0xb2, 0x45, 0x23, 0x58, 0x8f, 0x43, 0x9f,
+ 0x7a, 0x9c, 0x6d, 0x16, 0x0a, 0x6e, 0x99, 0xca, 0xff, 0x87, 0x57, 0xca, 0x04, 0x7d, 0x39, 0xf3,
+ 0x0f, 0x2f, 0x42, 0xc1, 0x0f, 0x02, 0x11, 0x4d, 0xf0, 0x9a, 0x9b, 0x71, 0x54, 0x7b, 0x0c, 0xb7,
+ 0xcf, 0xa5, 0xa0, 0x55, 0xc8, 0x0f, 0xe8, 0x24, 0x6e, 0x4f, 0x58, 0x2e, 0xd1, 0x1a, 0x2c, 0x8d,
+ 0x89, 0x3f, 0xa2, 0xba, 0x9b, 0xc5, 0x9b, 0xdd, 0xdc, 0x8e, 0xd1, 0xfc, 0x90, 0x83, 0xa2, 0x36,
+ 0xe7, 0xa6, 0x9f, 0x7c, 0xad, 0x76, 0xa1, 0xb1, 0x3d, 0x80, 0x65, 0x1d, 0xd2, 0xb8, 0x22, 0xcd,
+ 0x4b, 0x73, 0xba, 0x12, 0xe3, 0xe3, 0x6a, 0x7c, 0x00, 0xa6, 0x17, 0x92, 0xa1, 0x7e, 0xee, 0x33,
+ 0x35, 0x77, 0x0f, 0xdb, 0xcf, 0x5f, 0x84, 0x71, 0x63, 0x29, 0x4d, 0x4f, 0x1a, 0xa6, 0xfc, 0x80,
+ 0x15, 0x2d, 0xf3, 0x61, 0xfc, 0xf3, 0x12, 0x14, 0xf7, 0xfc, 0x11, 0x17, 0x34, 0xba, 0xe9, 0x20,
+ 0x69, 0xb5, 0x0b, 0x41, 0xda, 0x83, 0x62, 0xc4, 0x98, 0xb0, 0x1d, 0x72, 0x51, 0x7c, 0x30, 0x63,
+ 0x62, 0xaf, 0xdd, 0xa9, 0x4a, 0xa2, 0xec, 0xed, 0xf1, 0x1e, 0x17, 0x24, 0x75, 0x8f, 0xa0, 0x37,
+ 0xb0, 0x9e, 0xbc, 0x88, 0x3d, 0xc6, 0x04, 0x17, 0x11, 0x09, 0xed, 0x01, 0x9d, 0xc8, 0x59, 0x29,
+ 0x7f, 0xde, 0xb4, 0x7d, 0x10, 0x38, 0xd1, 0x44, 0x05, 0xef, 0x29, 0x9d, 0xe0, 0x35, 0x2d, 0xa0,
+ 0x93, 0xf0, 0x9f, 0xd2, 0x09, 0x47, 0x0f, 0x61, 0x83, 0xce, 0x60, 0x52, 0xa2, 0xed, 0x93, 0xa1,
+ 0x7c, 0xeb, 0x6d, 0xc7, 0x67, 0xce, 0x40, 0x3d, 0x37, 0x26, 0xbe, 0x4d, 0xd3, 0xa2, 0x9e, 0xc5,
+ 0x88, 0x3d, 0x09, 0x40, 0x1c, 0xac, 0x9e, 0x4f, 0x9c, 0x81, 0xef, 0x71, 0xf9, 0x0f, 0x55, 0x6a,
+ 0x78, 0x96, 0x2f, 0x86, 0xb4, 0x6d, 0xe7, 0x82, 0x68, 0xb5, 0x3a, 0x73, 0x6e, 0x6a, 0x14, 0xd7,
+ 0x15, 0xf5, 0xed, 0x5e, 0xf6, 0x29, 0xea, 0x40, 0x65, 0x14, 0x48, 0xf5, 0x71, 0x0c, 0xca, 0x57,
+ 0x8d, 0x01, 0xc4, 0x2c, 0xe9, 0x79, 0x6d, 0x0c, 0x1b, 0x17, 0x29, 0xcf, 0xa8, 0xcd, 0x47, 0xe9,
+ 0xda, 0xac, 0x6c, 0x7f, 0x9d, 0xa5, 0x2f, 0x5b, 0x64, 0xaa, 0x8e, 0x33, 0xd3, 0xf6, 0xaf, 0x06,
+ 0x14, 0x5e, 0x52, 0x27, 0xa2, 0xe2, 0xb3, 0x66, 0xed, 0xce, 0xa9, 0xac, 0xad, 0x67, 0x0f, 0xc2,
+ 0x52, 0xeb, 0x42, 0xd2, 0xd6, 0xa0, 0xe4, 0x05, 0x82, 0x46, 0x01, 0xf1, 0x55, 0xd6, 0x96, 0xf0,
+ 0x6c, 0x9f, 0xe9, 0xc0, 0x07, 0x03, 0x0a, 0xf1, 0xa4, 0x78, 0xd3, 0x0e, 0xc4, 0x5a, 0xcf, 0x3a,
+ 0x90, 0x69, 0xe4, 0xbf, 0x0d, 0x28, 0x25, 0x0f, 0xd6, 0x67, 0x35, 0xf3, 0xcc, 0xe4, 0x95, 0xff,
+ 0x9f, 0x27, 0x2f, 0x04, 0xe6, 0xc0, 0x0b, 0xf4, 0x8c, 0x88, 0xd5, 0x1a, 0xb5, 0xa0, 0x18, 0x92,
+ 0x89, 0xcf, 0x88, 0xab, 0x1b, 0xe5, 0xda, 0xc2, 0x4f, 0x15, 0xed, 0x60, 0x82, 0x13, 0xd0, 0xee,
+ 0xda, 0xd1, 0x71, 0x73, 0x15, 0xaa, 0x69, 0xcf, 0xdf, 0x19, 0xcd, 0x7f, 0x18, 0x50, 0x3e, 0xf8,
+ 0x9d, 0xa0, 0x81, 0x9a, 0x07, 0xfe, 0x2f, 0x9d, 0xdf, 0x5c, 0xfc, 0x39, 0xa3, 0x7c, 0xea, 0x97,
+ 0x8a, 0xac, 0x4b, 0xed, 0x58, 0x1f, 0x3f, 0xd5, 0x6f, 0xfd, 0xf3, 0x53, 0xfd, 0xd6, 0xef, 0xa7,
+ 0x75, 0xe3, 0xe3, 0xb4, 0x6e, 0xfc, 0x7d, 0x5a, 0x37, 0xfe, 0x35, 0xad, 0x1b, 0xbd, 0x82, 0x8a,
+ 0xcf, 0x8f, 0xfe, 0x1b, 0x00, 0x00, 0xff, 0xff, 0xbd, 0x5c, 0xf5, 0x06, 0x95, 0x13, 0x00, 0x00,
}
diff --git a/vendor/github.com/docker/swarmkit/api/objects.proto b/vendor/github.com/docker/swarmkit/api/objects.proto
index fd5aff73a..43bffca38 100644
--- a/vendor/github.com/docker/swarmkit/api/objects.proto
+++ b/vendor/github.com/docker/swarmkit/api/objects.proto
@@ -59,8 +59,9 @@ message Node {
// component, if the node is a manager.
ManagerStatus manager_status = 6;
+ // DEPRECATED: Use lb_attachments to find the ingress network
// The node attachment to the ingress network.
- NetworkAttachment attachment = 7;
+ NetworkAttachment attachment = 7 [deprecated=true];
// Certificate is the TLS certificate issued for the node, if any.
Certificate certificate = 8 [(gogoproto.nullable) = false];
@@ -75,6 +76,11 @@ message Node {
// shows the privilege level that the CA would currently grant when
// issuing or renewing the node's certificate.
NodeRole role = 9;
+
+ // Each node uses the network attachment to set up an endpoint on the
+ // node to be used for load balancing. Each overlay network, including
+ // ingress network, will have an NetworkAttachment.
+ repeated NetworkAttachment lb_attachments = 10;
}
message Service {
@@ -257,7 +263,7 @@ message NetworkAttachment {
// List of aliases by which a task is resolved in a network
repeated string aliases = 3;
-
+
// Map of all the driver attachment options for this network
map driver_attachment_opts = 4;
}
diff --git a/vendor/github.com/docker/swarmkit/api/types.pb.go b/vendor/github.com/docker/swarmkit/api/types.pb.go
index 07e1fe006..9ce04eb0b 100644
--- a/vendor/github.com/docker/swarmkit/api/types.pb.go
+++ b/vendor/github.com/docker/swarmkit/api/types.pb.go
@@ -219,6 +219,36 @@ func (x Mount_MountType) String() string {
}
func (Mount_MountType) EnumDescriptor() ([]byte, []int) { return fileDescriptorTypes, []int{16, 0} }
+// Consistency indicates the tolerable level of file system consistency
+type Mount_MountConsistency int32
+
+const (
+ MountConsistencyDefault Mount_MountConsistency = 0
+ MountConsistencyFull Mount_MountConsistency = 1
+ MountConsistencyCached Mount_MountConsistency = 2
+ MountConsistencyDelegated Mount_MountConsistency = 3
+)
+
+var Mount_MountConsistency_name = map[int32]string{
+ 0: "DEFAULT",
+ 1: "CONSISTENT",
+ 2: "CACHED",
+ 3: "DELEGATED",
+}
+var Mount_MountConsistency_value = map[string]int32{
+ "DEFAULT": 0,
+ "CONSISTENT": 1,
+ "CACHED": 2,
+ "DELEGATED": 3,
+}
+
+func (x Mount_MountConsistency) String() string {
+ return proto.EnumName(Mount_MountConsistency_name, int32(x))
+}
+func (Mount_MountConsistency) EnumDescriptor() ([]byte, []int) {
+ return fileDescriptorTypes, []int{16, 1}
+}
+
type Mount_BindOptions_MountPropagation int32
const (
@@ -871,7 +901,8 @@ type Mount struct {
// Target path in container
Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"`
// ReadOnly should be set to true if the mount should not be writable.
- ReadOnly bool `protobuf:"varint,4,opt,name=readonly,proto3" json:"readonly,omitempty"`
+ ReadOnly bool `protobuf:"varint,4,opt,name=readonly,proto3" json:"readonly,omitempty"`
+ Consistency Mount_MountConsistency `protobuf:"varint,8,opt,name=consistency,proto3,enum=docker.swarmkit.v1.Mount_MountConsistency" json:"consistency,omitempty"`
// BindOptions configures properties of a bind mount type.
//
// For mounts of type bind, the source must be an absolute host path.
@@ -2127,6 +2158,7 @@ func init() {
proto.RegisterEnum("docker.swarmkit.v1.RaftMemberStatus_Reachability", RaftMemberStatus_Reachability_name, RaftMemberStatus_Reachability_value)
proto.RegisterEnum("docker.swarmkit.v1.NodeStatus_State", NodeStatus_State_name, NodeStatus_State_value)
proto.RegisterEnum("docker.swarmkit.v1.Mount_MountType", Mount_MountType_name, Mount_MountType_value)
+ proto.RegisterEnum("docker.swarmkit.v1.Mount_MountConsistency", Mount_MountConsistency_name, Mount_MountConsistency_value)
proto.RegisterEnum("docker.swarmkit.v1.Mount_BindOptions_MountPropagation", Mount_BindOptions_MountPropagation_name, Mount_BindOptions_MountPropagation_value)
proto.RegisterEnum("docker.swarmkit.v1.RestartPolicy_RestartCondition", RestartPolicy_RestartCondition_name, RestartPolicy_RestartCondition_value)
proto.RegisterEnum("docker.swarmkit.v1.UpdateConfig_FailureAction", UpdateConfig_FailureAction_name, UpdateConfig_FailureAction_value)
@@ -4160,6 +4192,11 @@ func (m *Mount) MarshalTo(dAtA []byte) (int, error) {
}
i += n12
}
+ if m.Consistency != 0 {
+ dAtA[i] = 0x40
+ i++
+ i = encodeVarintTypes(dAtA, i, uint64(m.Consistency))
+ }
return i, nil
}
@@ -6398,6 +6435,9 @@ func (m *Mount) Size() (n int) {
l = m.TmpfsOptions.Size()
n += 1 + l + sovTypes(uint64(l))
}
+ if m.Consistency != 0 {
+ n += 1 + sovTypes(uint64(m.Consistency))
+ }
return n
}
@@ -7498,6 +7538,7 @@ func (this *Mount) String() string {
`BindOptions:` + strings.Replace(fmt.Sprintf("%v", this.BindOptions), "Mount_BindOptions", "Mount_BindOptions", 1) + `,`,
`VolumeOptions:` + strings.Replace(fmt.Sprintf("%v", this.VolumeOptions), "Mount_VolumeOptions", "Mount_VolumeOptions", 1) + `,`,
`TmpfsOptions:` + strings.Replace(fmt.Sprintf("%v", this.TmpfsOptions), "Mount_TmpfsOptions", "Mount_TmpfsOptions", 1) + `,`,
+ `Consistency:` + fmt.Sprintf("%v", this.Consistency) + `,`,
`}`,
}, "")
return s
@@ -10464,6 +10505,25 @@ func (m *Mount) Unmarshal(dAtA []byte) error {
return err
}
iNdEx = postIndex
+ case 8:
+ if wireType != 0 {
+ return fmt.Errorf("proto: wrong wireType = %d for field Consistency", wireType)
+ }
+ m.Consistency = 0
+ for shift := uint(0); ; shift += 7 {
+ if shift >= 64 {
+ return ErrIntOverflowTypes
+ }
+ if iNdEx >= l {
+ return io.ErrUnexpectedEOF
+ }
+ b := dAtA[iNdEx]
+ iNdEx++
+ m.Consistency |= (Mount_MountConsistency(b) & 0x7F) << shift
+ if b < 0x80 {
+ break
+ }
+ }
default:
iNdEx = preIndex
skippy, err := skipTypes(dAtA[iNdEx:])
@@ -16964,312 +17024,319 @@ var (
func init() { proto.RegisterFile("github.com/docker/swarmkit/api/types.proto", fileDescriptorTypes) }
var fileDescriptorTypes = []byte{
- // 4905 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x7a, 0x4d, 0x6c, 0x24, 0x49,
- 0x56, 0xbf, 0xeb, 0xd3, 0x55, 0xaf, 0xca, 0x76, 0x3a, 0xda, 0xdb, 0xe3, 0xae, 0xed, 0xb1, 0x3d,
- 0x39, 0xd3, 0x3b, 0x33, 0xbd, 0xf3, 0xaf, 0xfe, 0x9a, 0x19, 0xf5, 0xcc, 0xfc, 0xe7, 0xa3, 0xbe,
- 0xdc, 0xae, 0x6d, 0xbb, 0xaa, 0x14, 0x55, 0xee, 0xde, 0x41, 0x82, 0x54, 0x3a, 0x33, 0x5c, 0xce,
- 0x71, 0x56, 0x46, 0x91, 0x99, 0x65, 0x77, 0xb1, 0x20, 0x5a, 0x1c, 0x00, 0xf9, 0x04, 0xb7, 0x45,
- 0xc8, 0x5c, 0xe0, 0x84, 0x90, 0x38, 0x80, 0x84, 0xe0, 0x34, 0x48, 0x1c, 0xe6, 0xc6, 0x02, 0x12,
- 0x5a, 0x81, 0x64, 0x18, 0x1f, 0xb8, 0x21, 0xb8, 0xac, 0xb8, 0x80, 0x84, 0xe2, 0x23, 0xb3, 0xb2,
- 0xaa, 0xd3, 0x76, 0x0f, 0xb3, 0x17, 0x3b, 0xe3, 0xbd, 0xdf, 0x7b, 0xf1, 0xe2, 0x45, 0xc4, 0x8b,
- 0xf7, 0x22, 0x0a, 0x6e, 0xf7, 0x2d, 0xff, 0x60, 0xb4, 0x57, 0x36, 0xe8, 0xe0, 0x8e, 0x49, 0x8d,
- 0x43, 0xe2, 0xde, 0xf1, 0x8e, 0x75, 0x77, 0x70, 0x68, 0xf9, 0x77, 0xf4, 0xa1, 0x75, 0xc7, 0x1f,
- 0x0f, 0x89, 0x57, 0x1e, 0xba, 0xd4, 0xa7, 0x08, 0x09, 0x40, 0x39, 0x00, 0x94, 0x8f, 0xee, 0x95,
- 0xd6, 0xfb, 0x94, 0xf6, 0x6d, 0x72, 0x87, 0x23, 0xf6, 0x46, 0xfb, 0x77, 0x7c, 0x6b, 0x40, 0x3c,
- 0x5f, 0x1f, 0x0c, 0x85, 0x50, 0x69, 0x6d, 0x16, 0x60, 0x8e, 0x5c, 0xdd, 0xb7, 0xa8, 0x23, 0xf9,
- 0x2b, 0x7d, 0xda, 0xa7, 0xfc, 0xf3, 0x0e, 0xfb, 0x12, 0x54, 0x75, 0x1d, 0xe6, 0x9f, 0x10, 0xd7,
- 0xb3, 0xa8, 0x83, 0x56, 0x20, 0x63, 0x39, 0x26, 0x79, 0xb6, 0x9a, 0xd8, 0x48, 0xbc, 0x95, 0xc6,
- 0xa2, 0xa1, 0xde, 0x05, 0x68, 0xb2, 0x8f, 0x86, 0xe3, 0xbb, 0x63, 0xa4, 0x40, 0xea, 0x90, 0x8c,
- 0x39, 0x22, 0x8f, 0xd9, 0x27, 0xa3, 0x1c, 0xe9, 0xf6, 0x6a, 0x52, 0x50, 0x8e, 0x74, 0x5b, 0xfd,
- 0x3a, 0x01, 0x85, 0x8a, 0xe3, 0x50, 0x9f, 0xf7, 0xee, 0x21, 0x04, 0x69, 0x47, 0x1f, 0x10, 0x29,
- 0xc4, 0xbf, 0x51, 0x0d, 0xb2, 0xb6, 0xbe, 0x47, 0x6c, 0x6f, 0x35, 0xb9, 0x91, 0x7a, 0xab, 0x70,
- 0xff, 0xfb, 0xe5, 0x17, 0x87, 0x5c, 0x8e, 0x28, 0x29, 0x6f, 0x73, 0x34, 0x37, 0x02, 0x4b, 0x51,
- 0xf4, 0x09, 0xcc, 0x5b, 0x8e, 0x69, 0x19, 0xc4, 0x5b, 0x4d, 0x73, 0x2d, 0x6b, 0x71, 0x5a, 0x26,
- 0xd6, 0x57, 0xd3, 0x5f, 0x9d, 0xad, 0xcf, 0xe1, 0x40, 0xa8, 0xf4, 0x01, 0x14, 0x22, 0x6a, 0x63,
- 0xc6, 0xb6, 0x02, 0x99, 0x23, 0xdd, 0x1e, 0x11, 0x39, 0x3a, 0xd1, 0xf8, 0x30, 0xf9, 0x30, 0xa1,
- 0x7e, 0x06, 0x2b, 0x2d, 0x7d, 0x40, 0xcc, 0x47, 0xc4, 0x21, 0xae, 0x65, 0x60, 0xe2, 0xd1, 0x91,
- 0x6b, 0x10, 0x36, 0xd6, 0x43, 0xcb, 0x31, 0x83, 0xb1, 0xb2, 0xef, 0x78, 0x2d, 0x6a, 0x0d, 0x5e,
- 0xa9, 0x5b, 0x9e, 0xe1, 0x12, 0x9f, 0x7c, 0x63, 0x25, 0xa9, 0x40, 0xc9, 0x59, 0x02, 0x96, 0x66,
- 0xa5, 0x7f, 0x01, 0xae, 0x31, 0x17, 0x9b, 0x9a, 0x2b, 0x29, 0x9a, 0x37, 0x24, 0x06, 0x57, 0x56,
- 0xb8, 0xff, 0x56, 0x9c, 0x87, 0xe2, 0x46, 0xb2, 0x35, 0x87, 0x97, 0xb9, 0x9a, 0x80, 0xd0, 0x1d,
- 0x12, 0x03, 0x19, 0x70, 0xdd, 0x94, 0x46, 0xcf, 0xa8, 0x4f, 0x72, 0xf5, 0xb1, 0xd3, 0x78, 0xc1,
- 0x30, 0xb7, 0xe6, 0xf0, 0x4a, 0xa0, 0x2c, 0xda, 0x49, 0x15, 0x20, 0x17, 0xe8, 0x56, 0x7f, 0x9c,
- 0x80, 0x7c, 0xc0, 0xf4, 0xd0, 0xdb, 0x90, 0x77, 0x74, 0x87, 0x6a, 0xc6, 0x70, 0xe4, 0xf1, 0x01,
- 0xa5, 0xaa, 0xc5, 0xf3, 0xb3, 0xf5, 0x5c, 0x4b, 0x77, 0x68, 0xad, 0xb3, 0xeb, 0xe1, 0x1c, 0x63,
- 0xd7, 0x86, 0x23, 0x0f, 0xbd, 0x06, 0xc5, 0x01, 0x19, 0x50, 0x77, 0xac, 0xed, 0x8d, 0x7d, 0xe2,
- 0x49, 0xb7, 0x15, 0x04, 0xad, 0xca, 0x48, 0xe8, 0x63, 0x98, 0xef, 0x0b, 0x93, 0x56, 0x53, 0x7c,
- 0xf9, 0xbc, 0x1e, 0x67, 0xfd, 0x8c, 0xd5, 0x38, 0x90, 0x51, 0x7f, 0x27, 0x01, 0x2b, 0x21, 0x95,
- 0xfc, 0xf2, 0xc8, 0x72, 0xc9, 0x80, 0x38, 0xbe, 0x87, 0xde, 0x83, 0xac, 0x6d, 0x0d, 0x2c, 0xdf,
- 0x93, 0x3e, 0x7f, 0x35, 0x4e, 0x6d, 0x38, 0x28, 0x2c, 0xc1, 0xa8, 0x02, 0x45, 0x97, 0x78, 0xc4,
- 0x3d, 0x12, 0x2b, 0x5e, 0x7a, 0xf4, 0x0a, 0xe1, 0x29, 0x11, 0x75, 0x13, 0x72, 0x1d, 0x5b, 0xf7,
- 0xf7, 0xa9, 0x3b, 0x40, 0x2a, 0x14, 0x75, 0xd7, 0x38, 0xb0, 0x7c, 0x62, 0xf8, 0x23, 0x37, 0xd8,
- 0x7d, 0x53, 0x34, 0x74, 0x1d, 0x92, 0x54, 0x74, 0x94, 0xaf, 0x66, 0xcf, 0xcf, 0xd6, 0x93, 0xed,
- 0x2e, 0x4e, 0x52, 0x4f, 0xfd, 0x08, 0x96, 0x3b, 0xf6, 0xa8, 0x6f, 0x39, 0x75, 0xe2, 0x19, 0xae,
- 0x35, 0x64, 0xda, 0xd9, 0xaa, 0x64, 0x31, 0x2a, 0x58, 0x95, 0xec, 0x3b, 0xdc, 0xda, 0xc9, 0xc9,
- 0xd6, 0x56, 0x7f, 0x2b, 0x09, 0xcb, 0x0d, 0xa7, 0x6f, 0x39, 0x24, 0x2a, 0x7d, 0x0b, 0x16, 0x09,
- 0x27, 0x6a, 0x47, 0x22, 0xdc, 0x48, 0x3d, 0x0b, 0x82, 0x1a, 0xc4, 0xa0, 0xe6, 0x4c, 0x5c, 0xb8,
- 0x17, 0x37, 0xfc, 0x17, 0xb4, 0xc7, 0x46, 0x87, 0x06, 0xcc, 0x0f, 0xf9, 0x20, 0x3c, 0x39, 0xbd,
- 0xb7, 0xe2, 0x74, 0xbd, 0x30, 0xce, 0x20, 0x48, 0x48, 0xd9, 0x6f, 0x13, 0x24, 0xfe, 0x24, 0x09,
- 0x4b, 0x2d, 0x6a, 0x4e, 0xf9, 0xa1, 0x04, 0xb9, 0x03, 0xea, 0xf9, 0x91, 0x80, 0x18, 0xb6, 0xd1,
- 0x43, 0xc8, 0x0d, 0xe5, 0xf4, 0xc9, 0xd9, 0xbf, 0x19, 0x6f, 0xb2, 0xc0, 0xe0, 0x10, 0x8d, 0x3e,
- 0x82, 0x7c, 0xb0, 0x65, 0xd8, 0x68, 0x5f, 0x62, 0xe1, 0x4c, 0xf0, 0xe8, 0x63, 0xc8, 0x8a, 0x49,
- 0x58, 0x4d, 0x73, 0xc9, 0x5b, 0x2f, 0xe5, 0x73, 0x2c, 0x85, 0xd0, 0x23, 0xc8, 0xf9, 0xb6, 0xa7,
- 0x59, 0xce, 0x3e, 0x5d, 0xcd, 0x70, 0x05, 0xeb, 0xb1, 0x41, 0x86, 0x9a, 0xa4, 0xb7, 0xdd, 0x6d,
- 0x3a, 0xfb, 0xb4, 0x5a, 0x38, 0x3f, 0x5b, 0x9f, 0x97, 0x0d, 0x3c, 0xef, 0xdb, 0x1e, 0xfb, 0x50,
- 0x7f, 0x37, 0x01, 0x85, 0x08, 0x0a, 0xbd, 0x0a, 0xe0, 0xbb, 0x23, 0xcf, 0xd7, 0x5c, 0x4a, 0x7d,
- 0xee, 0xac, 0x22, 0xce, 0x73, 0x0a, 0xa6, 0xd4, 0x47, 0x65, 0xb8, 0x66, 0x10, 0xd7, 0xd7, 0x2c,
- 0xcf, 0x1b, 0x11, 0x57, 0xf3, 0x46, 0x7b, 0x5f, 0x10, 0xc3, 0xe7, 0x8e, 0x2b, 0xe2, 0x65, 0xc6,
- 0x6a, 0x72, 0x4e, 0x57, 0x30, 0xd0, 0x03, 0xb8, 0x1e, 0xc5, 0x0f, 0x47, 0x7b, 0xb6, 0x65, 0x68,
- 0x6c, 0x32, 0x53, 0x5c, 0xe4, 0xda, 0x44, 0xa4, 0xc3, 0x79, 0x8f, 0xc9, 0x58, 0xfd, 0x69, 0x02,
- 0x14, 0xac, 0xef, 0xfb, 0x3b, 0x64, 0xb0, 0x47, 0xdc, 0xae, 0xaf, 0xfb, 0x23, 0x0f, 0x5d, 0x87,
- 0xac, 0x4d, 0x74, 0x93, 0xb8, 0xdc, 0xa8, 0x1c, 0x96, 0x2d, 0xb4, 0xcb, 0x76, 0xb0, 0x6e, 0x1c,
- 0xe8, 0x7b, 0x96, 0x6d, 0xf9, 0x63, 0x6e, 0xca, 0x62, 0xfc, 0x12, 0x9e, 0xd5, 0x59, 0xc6, 0x11,
- 0x41, 0x3c, 0xa5, 0x06, 0xad, 0xc2, 0xfc, 0x80, 0x78, 0x9e, 0xde, 0x27, 0xdc, 0xd2, 0x3c, 0x0e,
- 0x9a, 0xea, 0x47, 0x50, 0x8c, 0xca, 0xa1, 0x02, 0xcc, 0xef, 0xb6, 0x1e, 0xb7, 0xda, 0x4f, 0x5b,
- 0xca, 0x1c, 0x5a, 0x82, 0xc2, 0x6e, 0x0b, 0x37, 0x2a, 0xb5, 0xad, 0x4a, 0x75, 0xbb, 0xa1, 0x24,
- 0xd0, 0x02, 0xe4, 0x27, 0xcd, 0xa4, 0xfa, 0x67, 0x09, 0x00, 0xe6, 0x6e, 0x39, 0xa8, 0x0f, 0x21,
- 0xe3, 0xf9, 0xba, 0x2f, 0x56, 0xe5, 0xe2, 0xfd, 0x37, 0x2e, 0x9a, 0x43, 0x69, 0x2f, 0xfb, 0x47,
- 0xb0, 0x10, 0x89, 0x5a, 0x98, 0x9c, 0xb2, 0x90, 0x05, 0x08, 0xdd, 0x34, 0x5d, 0x69, 0x38, 0xff,
- 0x56, 0x3f, 0x82, 0x0c, 0x97, 0x9e, 0x36, 0x37, 0x07, 0xe9, 0x3a, 0xfb, 0x4a, 0xa0, 0x3c, 0x64,
- 0x70, 0xa3, 0x52, 0xff, 0x5c, 0x49, 0x22, 0x05, 0x8a, 0xf5, 0x66, 0xb7, 0xd6, 0x6e, 0xb5, 0x1a,
- 0xb5, 0x5e, 0xa3, 0xae, 0xa4, 0xd4, 0x5b, 0x90, 0x69, 0x0e, 0x98, 0xe6, 0x9b, 0x6c, 0xc9, 0xef,
- 0x13, 0x97, 0x38, 0x46, 0xb0, 0x93, 0x26, 0x04, 0xf5, 0x27, 0x79, 0xc8, 0xec, 0xd0, 0x91, 0xe3,
- 0xa3, 0xfb, 0x91, 0xb0, 0xb5, 0x18, 0x9f, 0x21, 0x70, 0x60, 0xb9, 0x37, 0x1e, 0x12, 0x19, 0xd6,
- 0xae, 0x43, 0x56, 0x6c, 0x0e, 0x39, 0x1c, 0xd9, 0x62, 0x74, 0x5f, 0x77, 0xfb, 0xc4, 0x97, 0xe3,
- 0x91, 0x2d, 0xf4, 0x16, 0x3b, 0xb1, 0x74, 0x93, 0x3a, 0xf6, 0x98, 0xef, 0xa1, 0x9c, 0x38, 0x96,
- 0x30, 0xd1, 0xcd, 0xb6, 0x63, 0x8f, 0x71, 0xc8, 0x45, 0x5b, 0x50, 0xdc, 0xb3, 0x1c, 0x53, 0xa3,
- 0x43, 0x11, 0xe4, 0x33, 0x17, 0xef, 0x38, 0x61, 0x55, 0xd5, 0x72, 0xcc, 0xb6, 0x00, 0xe3, 0xc2,
- 0xde, 0xa4, 0x81, 0x5a, 0xb0, 0x78, 0x44, 0xed, 0xd1, 0x80, 0x84, 0xba, 0xb2, 0x5c, 0xd7, 0x9b,
- 0x17, 0xeb, 0x7a, 0xc2, 0xf1, 0x81, 0xb6, 0x85, 0xa3, 0x68, 0x13, 0x3d, 0x86, 0x05, 0x7f, 0x30,
- 0xdc, 0xf7, 0x42, 0x75, 0xf3, 0x5c, 0xdd, 0xf7, 0x2e, 0x71, 0x18, 0x83, 0x07, 0xda, 0x8a, 0x7e,
- 0xa4, 0x55, 0xfa, 0x8d, 0x14, 0x14, 0x22, 0x96, 0xa3, 0x2e, 0x14, 0x86, 0x2e, 0x1d, 0xea, 0x7d,
- 0x7e, 0x50, 0xc9, 0xb9, 0xb8, 0xf7, 0x52, 0xa3, 0x2e, 0x77, 0x26, 0x82, 0x38, 0xaa, 0x45, 0x3d,
- 0x4d, 0x42, 0x21, 0xc2, 0x44, 0xb7, 0x21, 0x87, 0x3b, 0xb8, 0xf9, 0xa4, 0xd2, 0x6b, 0x28, 0x73,
- 0xa5, 0x9b, 0x27, 0xa7, 0x1b, 0xab, 0x5c, 0x5b, 0x54, 0x41, 0xc7, 0xb5, 0x8e, 0xd8, 0xd2, 0x7b,
- 0x0b, 0xe6, 0x03, 0x68, 0xa2, 0xf4, 0xdd, 0x93, 0xd3, 0x8d, 0x57, 0x66, 0xa1, 0x11, 0x24, 0xee,
- 0x6e, 0x55, 0x70, 0xa3, 0xae, 0x24, 0xe3, 0x91, 0xb8, 0x7b, 0xa0, 0xbb, 0xc4, 0x44, 0xdf, 0x83,
- 0xac, 0x04, 0xa6, 0x4a, 0xa5, 0x93, 0xd3, 0x8d, 0xeb, 0xb3, 0xc0, 0x09, 0x0e, 0x77, 0xb7, 0x2b,
- 0x4f, 0x1a, 0x4a, 0x3a, 0x1e, 0x87, 0xbb, 0xb6, 0x7e, 0x44, 0xd0, 0x1b, 0x90, 0x11, 0xb0, 0x4c,
- 0xe9, 0xc6, 0xc9, 0xe9, 0xc6, 0x77, 0x5e, 0x50, 0xc7, 0x50, 0xa5, 0xd5, 0xdf, 0xfe, 0xc3, 0xb5,
- 0xb9, 0xbf, 0xfa, 0xa3, 0x35, 0x65, 0x96, 0x5d, 0xfa, 0xef, 0x04, 0x2c, 0x4c, 0x4d, 0x39, 0x52,
- 0x21, 0xeb, 0x50, 0x83, 0x0e, 0xc5, 0xf9, 0x95, 0xab, 0xc2, 0xf9, 0xd9, 0x7a, 0xb6, 0x45, 0x6b,
- 0x74, 0x38, 0xc6, 0x92, 0x83, 0x1e, 0xcf, 0x9c, 0xc0, 0x0f, 0x5e, 0x72, 0x3d, 0xc5, 0x9e, 0xc1,
- 0x9f, 0xc2, 0x82, 0xe9, 0x5a, 0x47, 0xc4, 0xd5, 0x0c, 0xea, 0xec, 0x5b, 0x7d, 0x79, 0x36, 0x95,
- 0x62, 0xd3, 0x44, 0x0e, 0xc4, 0x45, 0x21, 0x50, 0xe3, 0xf8, 0x6f, 0x71, 0xfa, 0x96, 0x9e, 0x40,
- 0x31, 0xba, 0x42, 0xd9, 0x71, 0xe2, 0x59, 0xbf, 0x42, 0x64, 0x3e, 0xc8, 0xb3, 0x47, 0x9c, 0x67,
- 0x14, 0x91, 0x0d, 0xbe, 0x09, 0xe9, 0x01, 0x35, 0x85, 0x9e, 0x85, 0xea, 0x35, 0x96, 0x04, 0xfc,
- 0xd3, 0xd9, 0x7a, 0x81, 0x7a, 0xe5, 0x4d, 0xcb, 0x26, 0x3b, 0xd4, 0x24, 0x98, 0x03, 0xd4, 0x23,
- 0x48, 0xb3, 0x50, 0x81, 0xbe, 0x0b, 0xe9, 0x6a, 0xb3, 0x55, 0x57, 0xe6, 0x4a, 0xcb, 0x27, 0xa7,
- 0x1b, 0x0b, 0xdc, 0x25, 0x8c, 0xc1, 0xd6, 0x2e, 0x5a, 0x87, 0xec, 0x93, 0xf6, 0xf6, 0xee, 0x0e,
- 0x5b, 0x5e, 0xd7, 0x4e, 0x4e, 0x37, 0x96, 0x42, 0xb6, 0x70, 0x1a, 0x7a, 0x15, 0x32, 0xbd, 0x9d,
- 0xce, 0x66, 0x57, 0x49, 0x96, 0xd0, 0xc9, 0xe9, 0xc6, 0x62, 0xc8, 0xe7, 0x36, 0x97, 0x96, 0xe5,
- 0xac, 0xe6, 0x43, 0xba, 0xfa, 0xb3, 0x24, 0x2c, 0x60, 0x56, 0xf1, 0xb9, 0x7e, 0x87, 0xda, 0x96,
- 0x31, 0x46, 0x1d, 0xc8, 0x1b, 0xd4, 0x31, 0xad, 0xc8, 0x9e, 0xba, 0x7f, 0xc1, 0xa9, 0x3f, 0x91,
- 0x0a, 0x5a, 0xb5, 0x40, 0x12, 0x4f, 0x94, 0xa0, 0x3b, 0x90, 0x31, 0x89, 0xad, 0x8f, 0x65, 0xfa,
- 0x71, 0xa3, 0x2c, 0x6a, 0xca, 0x72, 0x50, 0x53, 0x96, 0xeb, 0xb2, 0xa6, 0xc4, 0x02, 0xc7, 0xd3,
- 0x6c, 0xfd, 0x99, 0xa6, 0xfb, 0x3e, 0x19, 0x0c, 0x7d, 0x91, 0x7b, 0xa4, 0x71, 0x61, 0xa0, 0x3f,
- 0xab, 0x48, 0x12, 0xba, 0x07, 0xd9, 0x63, 0xcb, 0x31, 0xe9, 0xb1, 0x4c, 0x2f, 0x2e, 0x51, 0x2a,
- 0x81, 0xea, 0x09, 0x3b, 0x75, 0x67, 0xcc, 0x64, 0xfe, 0x6e, 0xb5, 0x5b, 0x8d, 0xc0, 0xdf, 0x92,
- 0xdf, 0x76, 0x5a, 0xd4, 0x61, 0x7b, 0x05, 0xda, 0x2d, 0x6d, 0xb3, 0xd2, 0xdc, 0xde, 0xc5, 0xcc,
- 0xe7, 0x2b, 0x27, 0xa7, 0x1b, 0x4a, 0x08, 0xd9, 0xd4, 0x2d, 0x9b, 0xe5, 0xbb, 0x37, 0x20, 0x55,
- 0x69, 0x7d, 0xae, 0x24, 0x4b, 0xca, 0xc9, 0xe9, 0x46, 0x31, 0x64, 0x57, 0x9c, 0xf1, 0x64, 0x1b,
- 0xcd, 0xf6, 0xab, 0xfe, 0x6d, 0x0a, 0x8a, 0xbb, 0x43, 0x53, 0xf7, 0x89, 0x58, 0x93, 0x68, 0x03,
- 0x0a, 0x43, 0xdd, 0xd5, 0x6d, 0x9b, 0xd8, 0x96, 0x37, 0x90, 0xd5, 0x72, 0x94, 0x84, 0x3e, 0x78,
- 0x59, 0x37, 0x56, 0x73, 0x6c, 0x9d, 0xfd, 0xf8, 0x5f, 0xd6, 0x13, 0x81, 0x43, 0x77, 0x61, 0x71,
- 0x5f, 0x58, 0xab, 0xe9, 0x06, 0x9f, 0xd8, 0x14, 0x9f, 0xd8, 0x72, 0xdc, 0xc4, 0x46, 0xcd, 0x2a,
- 0xcb, 0x41, 0x56, 0xb8, 0x14, 0x5e, 0xd8, 0x8f, 0x36, 0xd1, 0x03, 0x98, 0x1f, 0x50, 0xc7, 0xf2,
- 0xa9, 0x7b, 0xf5, 0x2c, 0x04, 0x48, 0x74, 0x1b, 0x96, 0xd9, 0xe4, 0x06, 0xf6, 0x70, 0x36, 0x3f,
- 0xb1, 0x92, 0x78, 0x69, 0xa0, 0x3f, 0x93, 0x1d, 0x62, 0x46, 0x46, 0x55, 0xc8, 0x50, 0x97, 0xa5,
- 0x44, 0x59, 0x6e, 0xee, 0x3b, 0x57, 0x9a, 0x2b, 0x1a, 0x6d, 0x26, 0x83, 0x85, 0xa8, 0xfa, 0x3e,
- 0x2c, 0x4c, 0x0d, 0x82, 0x65, 0x02, 0x9d, 0xca, 0x6e, 0xb7, 0xa1, 0xcc, 0xa1, 0x22, 0xe4, 0x6a,
- 0xed, 0x56, 0xaf, 0xd9, 0xda, 0x65, 0xa9, 0x4c, 0x11, 0x72, 0xb8, 0xbd, 0xbd, 0x5d, 0xad, 0xd4,
- 0x1e, 0x2b, 0x49, 0xb5, 0x0c, 0x85, 0x88, 0x36, 0xb4, 0x08, 0xd0, 0xed, 0xb5, 0x3b, 0xda, 0x66,
- 0x13, 0x77, 0x7b, 0x22, 0x11, 0xea, 0xf6, 0x2a, 0xb8, 0x27, 0x09, 0x09, 0xf5, 0x3f, 0x92, 0xc1,
- 0x8c, 0xca, 0xdc, 0xa7, 0x3a, 0x9d, 0xfb, 0x5c, 0x62, 0xbc, 0xcc, 0x7e, 0x26, 0x8d, 0x30, 0x07,
- 0xfa, 0x00, 0x80, 0x2f, 0x1c, 0x62, 0x6a, 0xba, 0x2f, 0x27, 0xbe, 0xf4, 0x82, 0x93, 0x7b, 0xc1,
- 0xa5, 0x0d, 0xce, 0x4b, 0x74, 0xc5, 0x47, 0x1f, 0x43, 0xd1, 0xa0, 0x83, 0xa1, 0x4d, 0xa4, 0x70,
- 0xea, 0x4a, 0xe1, 0x42, 0x88, 0xaf, 0xf8, 0xd1, 0xec, 0x2b, 0x3d, 0x9d, 0x1f, 0xfe, 0x66, 0x22,
- 0xf0, 0x4c, 0x4c, 0xc2, 0x55, 0x84, 0xdc, 0x6e, 0xa7, 0x5e, 0xe9, 0x35, 0x5b, 0x8f, 0x94, 0x04,
- 0x02, 0xc8, 0x72, 0x57, 0xd7, 0x95, 0x24, 0x4b, 0x14, 0x6b, 0xed, 0x9d, 0xce, 0x76, 0x83, 0xa7,
- 0x5c, 0x68, 0x05, 0x94, 0xc0, 0xd9, 0x1a, 0x77, 0x64, 0xa3, 0xae, 0xa4, 0xd1, 0x35, 0x58, 0x0a,
- 0xa9, 0x52, 0x32, 0x83, 0xae, 0x03, 0x0a, 0x89, 0x13, 0x15, 0x59, 0xf5, 0xd7, 0x60, 0xa9, 0x46,
- 0x1d, 0x5f, 0xb7, 0x9c, 0x30, 0x89, 0xbe, 0xcf, 0x06, 0x2d, 0x49, 0x9a, 0x25, 0x2f, 0x3b, 0xaa,
- 0x4b, 0xe7, 0x67, 0xeb, 0x85, 0x10, 0xda, 0xac, 0xb3, 0x91, 0x06, 0x0d, 0x93, 0xed, 0xdf, 0xa1,
- 0x65, 0x72, 0xe7, 0x66, 0xaa, 0xf3, 0xe7, 0x67, 0xeb, 0xa9, 0x4e, 0xb3, 0x8e, 0x19, 0x0d, 0x7d,
- 0x17, 0xf2, 0xe4, 0x99, 0xe5, 0x6b, 0x06, 0x8b, 0xe1, 0xcc, 0x81, 0x19, 0x9c, 0x63, 0x84, 0x1a,
- 0x0b, 0xd9, 0x55, 0x80, 0x0e, 0x75, 0x7d, 0xd9, 0xf3, 0xbb, 0x90, 0x19, 0x52, 0x97, 0x97, 0xe7,
- 0x17, 0x5e, 0x1a, 0x31, 0xb8, 0x58, 0xa8, 0x58, 0x80, 0xd5, 0xdf, 0x4b, 0x01, 0xf4, 0x74, 0xef,
- 0x50, 0x2a, 0x79, 0x08, 0xf9, 0xf0, 0x02, 0x4e, 0xd6, 0xf9, 0x97, 0xce, 0x76, 0x08, 0x46, 0x0f,
- 0x82, 0xc5, 0x26, 0xca, 0x83, 0xd8, 0x3a, 0x2d, 0xe8, 0x28, 0x2e, 0xc3, 0x9e, 0xae, 0x01, 0xd8,
- 0x91, 0x48, 0x5c, 0x57, 0xce, 0x3c, 0xfb, 0x44, 0x35, 0x7e, 0x2c, 0x08, 0xa7, 0xc9, 0x04, 0x33,
- 0xf6, 0x66, 0x63, 0x66, 0x46, 0xb6, 0xe6, 0xf0, 0x44, 0x0e, 0x7d, 0x0a, 0x05, 0x36, 0x6e, 0xcd,
- 0xe3, 0x3c, 0x99, 0x5b, 0x5e, 0xe8, 0x2a, 0xa1, 0x01, 0xc3, 0x70, 0xe2, 0xe5, 0x57, 0x01, 0xf4,
- 0xe1, 0xd0, 0xb6, 0x88, 0xa9, 0xed, 0x8d, 0x79, 0x32, 0x99, 0xc7, 0x79, 0x49, 0xa9, 0x8e, 0xd9,
- 0x76, 0x09, 0xd8, 0xba, 0xbf, 0x9a, 0xbb, 0xda, 0x81, 0x12, 0x5d, 0xf1, 0xab, 0x0a, 0x2c, 0xba,
- 0x23, 0x87, 0x39, 0x54, 0x5a, 0xa7, 0xfe, 0x69, 0x12, 0x5e, 0x69, 0x11, 0xff, 0x98, 0xba, 0x87,
- 0x15, 0xdf, 0xd7, 0x8d, 0x83, 0x01, 0x71, 0xe4, 0xf4, 0x45, 0x72, 0xf6, 0xc4, 0x54, 0xce, 0xbe,
- 0x0a, 0xf3, 0xba, 0x6d, 0xe9, 0x1e, 0x11, 0x89, 0x4e, 0x1e, 0x07, 0x4d, 0x56, 0x59, 0xb0, 0x3a,
- 0x85, 0x78, 0x1e, 0x11, 0x57, 0x07, 0xcc, 0xf0, 0x80, 0x80, 0x7e, 0x04, 0xd7, 0x65, 0x4a, 0xa3,
- 0x87, 0x5d, 0xb1, 0x9c, 0x39, 0xb8, 0x83, 0x6c, 0xc4, 0x16, 0x4e, 0xf1, 0xc6, 0xc9, 0x9c, 0x67,
- 0x42, 0x6e, 0x0f, 0x7d, 0x99, 0x41, 0xad, 0x98, 0x31, 0xac, 0xd2, 0x23, 0xb8, 0x71, 0xa1, 0xc8,
- 0x37, 0xba, 0x9a, 0xf8, 0x87, 0x24, 0x40, 0xb3, 0x53, 0xd9, 0x91, 0x4e, 0xaa, 0x43, 0x76, 0x5f,
- 0x1f, 0x58, 0xf6, 0xf8, 0xb2, 0x08, 0x38, 0xc1, 0x97, 0x2b, 0xc2, 0x1d, 0x9b, 0x5c, 0x06, 0x4b,
- 0x59, 0x5e, 0x36, 0x8d, 0xf6, 0x1c, 0xe2, 0x87, 0x65, 0x13, 0x6f, 0x31, 0x33, 0x5c, 0xdd, 0x09,
- 0x97, 0xae, 0x68, 0xb0, 0x09, 0xe8, 0xeb, 0x3e, 0x39, 0xd6, 0xc7, 0x41, 0xd8, 0x92, 0x4d, 0xb4,
- 0xc5, 0x2f, 0x00, 0x89, 0x7b, 0x44, 0xcc, 0xd5, 0x0c, 0x77, 0xea, 0x55, 0xf6, 0x60, 0x09, 0x17,
- 0xbe, 0x0b, 0xa5, 0x4b, 0x1f, 0xf1, 0x94, 0x69, 0xc2, 0xfa, 0x46, 0x3e, 0xba, 0x0b, 0x0b, 0x53,
- 0xe3, 0x7c, 0xa1, 0x5e, 0x6d, 0x76, 0x9e, 0xbc, 0xab, 0xa4, 0xe5, 0xd7, 0xfb, 0x4a, 0x56, 0xfd,
- 0xe3, 0x94, 0x08, 0x34, 0xd2, 0xab, 0xf1, 0x17, 0xdf, 0x39, 0xbe, 0xba, 0x0d, 0x6a, 0xcb, 0x00,
- 0xf0, 0xe6, 0xe5, 0xf1, 0x87, 0xd5, 0x3f, 0x1c, 0x8e, 0x43, 0x41, 0xb4, 0x0e, 0x05, 0xb1, 0x8a,
- 0x35, 0xb6, 0xe1, 0xb8, 0x5b, 0x17, 0x30, 0x08, 0x12, 0x93, 0x44, 0xb7, 0x60, 0x91, 0xdf, 0x6f,
- 0x78, 0x07, 0xc4, 0x14, 0x98, 0x34, 0xc7, 0x2c, 0x84, 0x54, 0x0e, 0xdb, 0x81, 0xa2, 0x24, 0x68,
- 0x3c, 0xf7, 0xcd, 0x70, 0x83, 0x6e, 0x5f, 0x65, 0x90, 0x10, 0xe1, 0x29, 0x71, 0x61, 0x38, 0x69,
- 0xa8, 0x75, 0xc8, 0x05, 0xc6, 0xa2, 0x55, 0x48, 0xf5, 0x6a, 0x1d, 0x65, 0xae, 0xb4, 0x74, 0x72,
- 0xba, 0x51, 0x08, 0xc8, 0xbd, 0x5a, 0x87, 0x71, 0x76, 0xeb, 0x1d, 0x25, 0x31, 0xcd, 0xd9, 0xad,
- 0x77, 0x4a, 0x69, 0x96, 0x83, 0xa9, 0xfb, 0x50, 0x88, 0xf4, 0x80, 0x5e, 0x87, 0xf9, 0x66, 0xeb,
- 0x11, 0x6e, 0x74, 0xbb, 0xca, 0x5c, 0xe9, 0xfa, 0xc9, 0xe9, 0x06, 0x8a, 0x70, 0x9b, 0x4e, 0x9f,
- 0xcd, 0x0f, 0x7a, 0x15, 0xd2, 0x5b, 0x6d, 0x76, 0xb6, 0x8b, 0x64, 0x3b, 0x82, 0xd8, 0xa2, 0x9e,
- 0x5f, 0xba, 0x26, 0x93, 0xbb, 0xa8, 0x62, 0xf5, 0xf7, 0x13, 0x90, 0x15, 0x9b, 0x29, 0x76, 0xa2,
- 0x2a, 0x30, 0x1f, 0x54, 0xc2, 0xa2, 0x10, 0x7a, 0xf3, 0xe2, 0xa2, 0xa5, 0x2c, 0x6b, 0x0c, 0xb1,
- 0xfc, 0x02, 0xb9, 0xd2, 0x87, 0x50, 0x8c, 0x32, 0xbe, 0xd1, 0xe2, 0xfb, 0x11, 0x14, 0xd8, 0xfa,
- 0x0e, 0x8a, 0x97, 0xfb, 0x90, 0x15, 0x01, 0x21, 0x3c, 0x6b, 0x2e, 0xae, 0xa0, 0x24, 0x12, 0x3d,
- 0x84, 0x79, 0x51, 0x75, 0x05, 0x17, 0xa0, 0x6b, 0x97, 0xef, 0x22, 0x1c, 0xc0, 0xd5, 0x4f, 0x21,
- 0xdd, 0x21, 0xc4, 0x65, 0xbe, 0x77, 0xa8, 0x49, 0x26, 0xc7, 0xb3, 0x2c, 0x18, 0x4d, 0xd2, 0xac,
- 0xb3, 0x82, 0xd1, 0x24, 0x4d, 0x33, 0xbc, 0xe2, 0x49, 0x46, 0xae, 0x78, 0x7a, 0x50, 0x7c, 0x4a,
- 0xac, 0xfe, 0x81, 0x4f, 0x4c, 0xae, 0xe8, 0x1d, 0x48, 0x0f, 0x49, 0x68, 0xfc, 0x6a, 0xec, 0x02,
- 0x23, 0xc4, 0xc5, 0x1c, 0xc5, 0xe2, 0xc8, 0x31, 0x97, 0x96, 0xb7, 0xf6, 0xb2, 0xa5, 0xfe, 0x7d,
- 0x12, 0x16, 0x9b, 0x9e, 0x37, 0xd2, 0x1d, 0x23, 0xc8, 0xdc, 0x3e, 0x99, 0xce, 0xdc, 0x62, 0x9f,
- 0x37, 0xa6, 0x45, 0xa6, 0x6f, 0xae, 0xe4, 0xe9, 0x99, 0x0c, 0x4f, 0x4f, 0xf5, 0xdf, 0x13, 0xc1,
- 0xf5, 0xd4, 0xad, 0xc8, 0x76, 0x2f, 0xad, 0x9e, 0x9c, 0x6e, 0xac, 0x44, 0x35, 0x91, 0x5d, 0xe7,
- 0xd0, 0xa1, 0xc7, 0x0e, 0x7a, 0x0d, 0x32, 0xb8, 0xd1, 0x6a, 0x3c, 0x55, 0x12, 0x62, 0x79, 0x4e,
- 0x81, 0x30, 0x71, 0xc8, 0x31, 0xd3, 0xd4, 0x69, 0xb4, 0xea, 0x2c, 0xd3, 0x4a, 0xc6, 0x68, 0xea,
- 0x10, 0xc7, 0xb4, 0x9c, 0x3e, 0x7a, 0x1d, 0xb2, 0xcd, 0x6e, 0x77, 0x97, 0x5f, 0x20, 0xbc, 0x72,
- 0x72, 0xba, 0x71, 0x6d, 0x0a, 0xc5, 0xaf, 0x26, 0x4d, 0x06, 0x62, 0x65, 0x0e, 0xcb, 0xc1, 0x62,
- 0x40, 0x2c, 0x7f, 0x16, 0x20, 0xdc, 0xee, 0x55, 0x7a, 0x0d, 0x25, 0x13, 0x03, 0xc2, 0x94, 0xfd,
- 0x95, 0xdb, 0xed, 0x9f, 0x93, 0xa0, 0x54, 0x0c, 0x83, 0x0c, 0x7d, 0xc6, 0x97, 0x95, 0x65, 0x0f,
- 0x72, 0x43, 0xf6, 0x65, 0x91, 0x20, 0x4b, 0x7a, 0x18, 0xfb, 0x40, 0x37, 0x23, 0x57, 0xc6, 0xd4,
- 0x26, 0x15, 0x73, 0x60, 0x79, 0x9e, 0x45, 0x1d, 0x41, 0xc3, 0xa1, 0xa6, 0xd2, 0x7f, 0x26, 0xe0,
- 0x5a, 0x0c, 0x02, 0xdd, 0x85, 0xb4, 0x4b, 0xed, 0x60, 0x0e, 0x6f, 0x5e, 0x74, 0xf3, 0xc8, 0x44,
- 0x31, 0x47, 0xa2, 0x35, 0x00, 0x7d, 0xe4, 0x53, 0x9d, 0xf7, 0xcf, 0x67, 0x2f, 0x87, 0x23, 0x14,
- 0xf4, 0x14, 0xb2, 0x1e, 0x31, 0x5c, 0x12, 0xe4, 0xd2, 0x9f, 0xfe, 0x5f, 0xad, 0x2f, 0x77, 0xb9,
- 0x1a, 0x2c, 0xd5, 0x95, 0xca, 0x90, 0x15, 0x14, 0xb6, 0xec, 0x4d, 0xdd, 0xd7, 0xe5, 0xbd, 0x34,
- 0xff, 0x66, 0xab, 0x49, 0xb7, 0xfb, 0xc1, 0x6a, 0xd2, 0xed, 0xbe, 0xfa, 0x37, 0x49, 0x80, 0xc6,
- 0x33, 0x9f, 0xb8, 0x8e, 0x6e, 0xd7, 0x2a, 0xa8, 0x11, 0x89, 0xfe, 0x62, 0xb4, 0x6f, 0xc7, 0x5e,
- 0xb6, 0x87, 0x12, 0xe5, 0x5a, 0x25, 0x26, 0xfe, 0xdf, 0x80, 0xd4, 0xc8, 0x95, 0x6f, 0xae, 0x22,
- 0x0f, 0xde, 0xc5, 0xdb, 0x98, 0xd1, 0x50, 0x63, 0x12, 0xb6, 0x52, 0x17, 0xbf, 0xac, 0x46, 0x3a,
- 0x88, 0x0d, 0x5d, 0x6c, 0xe7, 0x1b, 0xba, 0x66, 0x10, 0x79, 0x72, 0x14, 0xc5, 0xce, 0xaf, 0x55,
- 0x6a, 0xc4, 0xf5, 0x71, 0xd6, 0xd0, 0xd9, 0xff, 0x6f, 0x15, 0xdf, 0xde, 0x01, 0x98, 0x0c, 0x0d,
- 0xad, 0x41, 0xa6, 0xb6, 0xd9, 0xed, 0x6e, 0x2b, 0x73, 0x22, 0x80, 0x4f, 0x58, 0x9c, 0xac, 0xfe,
- 0x65, 0x12, 0x72, 0xb5, 0x8a, 0x3c, 0x56, 0x6b, 0xa0, 0xf0, 0xa8, 0xc4, 0x6f, 0xf3, 0xc9, 0xb3,
- 0xa1, 0xe5, 0x8e, 0x65, 0x60, 0xb9, 0xa4, 0xa8, 0x5d, 0x64, 0x22, 0xcc, 0xea, 0x06, 0x17, 0x40,
- 0x18, 0x8a, 0x44, 0x3a, 0x41, 0x33, 0xf4, 0x20, 0xc6, 0xaf, 0x5d, 0xee, 0x2c, 0x51, 0x9e, 0x4c,
- 0xda, 0x1e, 0x2e, 0x04, 0x4a, 0x6a, 0xba, 0x87, 0x3e, 0x80, 0x25, 0xcf, 0xea, 0x3b, 0x96, 0xd3,
- 0xd7, 0x02, 0xe7, 0xf1, 0xa7, 0x85, 0xea, 0xf2, 0xf9, 0xd9, 0xfa, 0x42, 0x57, 0xb0, 0xa4, 0x0f,
- 0x17, 0x24, 0xb2, 0xc6, 0x5d, 0x89, 0xde, 0x87, 0xc5, 0x88, 0x28, 0xf3, 0xa2, 0x70, 0xbb, 0x72,
- 0x7e, 0xb6, 0x5e, 0x0c, 0x25, 0x1f, 0x93, 0x31, 0x2e, 0x86, 0x82, 0x8f, 0x09, 0xbf, 0x7f, 0xd9,
- 0xa7, 0xae, 0x41, 0x34, 0x97, 0xef, 0x69, 0x7e, 0x82, 0xa7, 0x71, 0x81, 0xd3, 0xc4, 0x36, 0x57,
- 0x9f, 0xc0, 0xb5, 0xb6, 0x6b, 0x1c, 0x10, 0xcf, 0x17, 0xae, 0x90, 0x5e, 0xfc, 0x14, 0x6e, 0xfa,
- 0xba, 0x77, 0xa8, 0x1d, 0x58, 0x9e, 0x4f, 0xdd, 0xb1, 0xe6, 0x12, 0x9f, 0x38, 0x8c, 0xaf, 0xf1,
- 0xf7, 0x48, 0x79, 0x41, 0x76, 0x83, 0x61, 0xb6, 0x04, 0x04, 0x07, 0x88, 0x6d, 0x06, 0x50, 0x9b,
- 0x50, 0x64, 0x65, 0x4a, 0x9d, 0xec, 0xeb, 0x23, 0xdb, 0x67, 0xa3, 0x07, 0x9b, 0xf6, 0xb5, 0x97,
- 0x3e, 0xa6, 0xf2, 0x36, 0xed, 0x8b, 0x4f, 0xf5, 0x87, 0xa0, 0xd4, 0x2d, 0x6f, 0xa8, 0xfb, 0xc6,
- 0x41, 0x70, 0xf3, 0x87, 0xea, 0xa0, 0x1c, 0x10, 0xdd, 0xf5, 0xf7, 0x88, 0xee, 0x6b, 0x43, 0xe2,
- 0x5a, 0xd4, 0xbc, 0x7a, 0x96, 0x97, 0x42, 0x91, 0x0e, 0x97, 0x50, 0xff, 0x2b, 0x01, 0x80, 0xf5,
- 0xfd, 0x20, 0x23, 0xfb, 0x3e, 0x2c, 0x7b, 0x8e, 0x3e, 0xf4, 0x0e, 0xa8, 0xaf, 0x59, 0x8e, 0x4f,
- 0xdc, 0x23, 0xdd, 0x96, 0x17, 0x38, 0x4a, 0xc0, 0x68, 0x4a, 0x3a, 0x7a, 0x07, 0xd0, 0x21, 0x21,
- 0x43, 0x8d, 0xda, 0xa6, 0x16, 0x30, 0xc5, 0x6b, 0x69, 0x1a, 0x2b, 0x8c, 0xd3, 0xb6, 0xcd, 0x6e,
- 0x40, 0x47, 0x55, 0x58, 0x63, 0xc3, 0x27, 0x8e, 0xef, 0x5a, 0xc4, 0xd3, 0xf6, 0xa9, 0xab, 0x79,
- 0x36, 0x3d, 0xd6, 0xf6, 0xa9, 0x6d, 0xd3, 0x63, 0xe2, 0x06, 0x77, 0x63, 0x25, 0x9b, 0xf6, 0x1b,
- 0x02, 0xb4, 0x49, 0xdd, 0xae, 0x4d, 0x8f, 0x37, 0x03, 0x04, 0x4b, 0xdb, 0x26, 0x63, 0xf6, 0x2d,
- 0xe3, 0x30, 0x48, 0xdb, 0x42, 0x6a, 0xcf, 0x32, 0x0e, 0xd1, 0xeb, 0xb0, 0x40, 0x6c, 0xc2, 0xaf,
- 0x48, 0x04, 0x2a, 0xc3, 0x51, 0xc5, 0x80, 0xc8, 0x40, 0xea, 0x67, 0xa0, 0x34, 0x1c, 0xc3, 0x1d,
- 0x0f, 0x23, 0x73, 0xfe, 0x0e, 0x20, 0x16, 0x24, 0x35, 0x9b, 0x1a, 0x87, 0xda, 0x40, 0x77, 0xf4,
- 0x3e, 0xb3, 0x4b, 0x3c, 0x62, 0x29, 0x8c, 0xb3, 0x4d, 0x8d, 0xc3, 0x1d, 0x49, 0x57, 0x3f, 0x00,
- 0xe8, 0x0e, 0x5d, 0xa2, 0x9b, 0x6d, 0x96, 0x4d, 0x30, 0xd7, 0xf1, 0x96, 0x66, 0xca, 0x47, 0x40,
- 0xea, 0xca, 0xad, 0xae, 0x08, 0x46, 0x3d, 0xa4, 0xab, 0xbf, 0x08, 0xd7, 0x3a, 0xb6, 0x6e, 0xf0,
- 0x07, 0xf1, 0x4e, 0xf8, 0x2a, 0x83, 0x1e, 0x42, 0x56, 0x40, 0xe5, 0x4c, 0xc6, 0x6e, 0xb7, 0x49,
- 0x9f, 0x5b, 0x73, 0x58, 0xe2, 0xab, 0x45, 0x80, 0x89, 0x1e, 0xf5, 0xcf, 0x13, 0x90, 0x0f, 0xf5,
- 0xa3, 0x0d, 0x28, 0x18, 0xd4, 0x61, 0xcb, 0xdb, 0x72, 0x64, 0x55, 0x9f, 0xc7, 0x51, 0x12, 0x6a,
- 0x42, 0x61, 0x18, 0x4a, 0x5f, 0x9a, 0xcf, 0xc5, 0x58, 0x8d, 0xa3, 0xb2, 0xe8, 0x43, 0xc8, 0x07,
- 0xaf, 0xae, 0x41, 0x84, 0xbd, 0xfc, 0x91, 0x76, 0x02, 0x57, 0x3f, 0x01, 0xf8, 0x01, 0xb5, 0x9c,
- 0x1e, 0x3d, 0x24, 0x0e, 0x7f, 0x45, 0x64, 0x35, 0x21, 0x09, 0xbc, 0x28, 0x5b, 0xbc, 0xd4, 0x17,
- 0x53, 0x10, 0x3e, 0xa6, 0x89, 0xa6, 0xfa, 0xd7, 0x49, 0xc8, 0x62, 0x4a, 0xfd, 0x5a, 0x05, 0x6d,
- 0x40, 0x56, 0xc6, 0x09, 0x7e, 0xfe, 0x54, 0xf3, 0xe7, 0x67, 0xeb, 0x19, 0x11, 0x20, 0x32, 0x06,
- 0x8f, 0x0c, 0x91, 0x08, 0x9e, 0xbc, 0x28, 0x82, 0xa3, 0xbb, 0x50, 0x94, 0x20, 0xed, 0x40, 0xf7,
- 0x0e, 0x44, 0x81, 0x56, 0x5d, 0x3c, 0x3f, 0x5b, 0x07, 0x81, 0xdc, 0xd2, 0xbd, 0x03, 0x0c, 0x02,
- 0xcd, 0xbe, 0x51, 0x03, 0x0a, 0x5f, 0x50, 0xcb, 0xd1, 0x7c, 0x3e, 0x08, 0x79, 0x99, 0x18, 0x3b,
- 0x8f, 0x93, 0xa1, 0xca, 0x27, 0x75, 0xf8, 0x62, 0x32, 0xf8, 0x06, 0x2c, 0xb8, 0x94, 0xfa, 0x22,
- 0x6c, 0x59, 0xd4, 0x91, 0xf7, 0x14, 0x1b, 0xb1, 0xd7, 0xd7, 0x94, 0xfa, 0x58, 0xe2, 0x70, 0xd1,
- 0x8d, 0xb4, 0xd0, 0x5d, 0x58, 0xb1, 0x75, 0xcf, 0xd7, 0x78, 0xbc, 0x33, 0x27, 0xda, 0xb2, 0x7c,
- 0xab, 0x21, 0xc6, 0xdb, 0xe4, 0xac, 0x40, 0x42, 0xfd, 0xc7, 0x04, 0x14, 0xd8, 0x60, 0xac, 0x7d,
- 0xcb, 0x60, 0x49, 0xde, 0x37, 0xcf, 0x3d, 0x6e, 0x40, 0xca, 0xf0, 0x5c, 0xe9, 0x54, 0x7e, 0xf8,
- 0xd6, 0xba, 0x18, 0x33, 0x1a, 0xfa, 0x0c, 0xb2, 0xf2, 0xbe, 0x44, 0xa4, 0x1d, 0xea, 0xd5, 0xe9,
- 0xa8, 0xf4, 0x8d, 0x94, 0xe3, 0x6b, 0x79, 0x62, 0x9d, 0x38, 0x04, 0x70, 0x94, 0x84, 0xae, 0x43,
- 0xd2, 0x10, 0xee, 0x92, 0xbf, 0xd9, 0xa8, 0xb5, 0x70, 0xd2, 0x70, 0xd4, 0xbf, 0x4b, 0xc0, 0xc2,
- 0x64, 0xc3, 0xb3, 0x15, 0x70, 0x13, 0xf2, 0xde, 0x68, 0xcf, 0x1b, 0x7b, 0x3e, 0x19, 0x04, 0x2f,
- 0xa4, 0x21, 0x01, 0x35, 0x21, 0xaf, 0xdb, 0x7d, 0xea, 0x5a, 0xfe, 0xc1, 0x40, 0x56, 0xa2, 0xf1,
- 0xa9, 0x42, 0x54, 0x67, 0xb9, 0x12, 0x88, 0xe0, 0x89, 0x74, 0x70, 0xee, 0x8b, 0x67, 0x74, 0x7e,
- 0xee, 0xbf, 0x06, 0x45, 0x5b, 0x1f, 0xf0, 0x0b, 0x24, 0xdf, 0x1a, 0x88, 0x71, 0xa4, 0x71, 0x41,
- 0xd2, 0x7a, 0xd6, 0x80, 0xa8, 0x2a, 0xe4, 0x43, 0x65, 0x68, 0x09, 0x0a, 0x95, 0x46, 0x57, 0xbb,
- 0x77, 0xff, 0xa1, 0xf6, 0xa8, 0xb6, 0xa3, 0xcc, 0xc9, 0xdc, 0xf4, 0x2f, 0x12, 0xb0, 0x20, 0xc3,
- 0x91, 0xcc, 0xf7, 0x5f, 0x87, 0x79, 0x57, 0xdf, 0xf7, 0x83, 0x8a, 0x24, 0x2d, 0x56, 0x35, 0x8b,
- 0xf0, 0xac, 0x22, 0x61, 0xac, 0xf8, 0x8a, 0x24, 0xf2, 0x66, 0x9f, 0xba, 0xf4, 0xcd, 0x3e, 0xfd,
- 0x73, 0x79, 0xb3, 0x57, 0x7f, 0x1d, 0x60, 0xd3, 0xb2, 0x49, 0x4f, 0xdc, 0x35, 0xc5, 0xd5, 0x97,
- 0x2c, 0x87, 0x93, 0x77, 0x99, 0x41, 0x0e, 0xd7, 0xac, 0x63, 0x46, 0x63, 0xac, 0xbe, 0x65, 0xca,
- 0xcd, 0xc8, 0x59, 0x8f, 0x18, 0xab, 0x6f, 0x99, 0xe1, 0x2b, 0x55, 0xfa, 0xaa, 0x57, 0xaa, 0xd3,
- 0x04, 0x2c, 0xc9, 0xdc, 0x35, 0x0c, 0xbf, 0x6f, 0x43, 0x5e, 0xa4, 0xb1, 0x93, 0x82, 0x8e, 0xbf,
- 0x53, 0x0b, 0x5c, 0xb3, 0x8e, 0x73, 0x82, 0xdd, 0x34, 0xd1, 0x3a, 0x14, 0x24, 0x34, 0xf2, 0xfb,
- 0x1e, 0x10, 0xa4, 0x16, 0x33, 0xff, 0x5d, 0x48, 0xef, 0x5b, 0x36, 0x91, 0x0b, 0x3d, 0x36, 0x00,
- 0x4c, 0x1c, 0xb0, 0x35, 0x87, 0x39, 0xba, 0x9a, 0x0b, 0x2e, 0xe3, 0xb8, 0x7d, 0xb2, 0xec, 0x8c,
- 0xda, 0x27, 0x2a, 0xd0, 0x19, 0xfb, 0x04, 0x8e, 0xd9, 0x27, 0xd8, 0xc2, 0x3e, 0x09, 0x8d, 0xda,
- 0x27, 0x48, 0x3f, 0x17, 0xfb, 0xb6, 0xe1, 0x7a, 0xd5, 0xd6, 0x8d, 0x43, 0xdb, 0xf2, 0x7c, 0x62,
- 0x46, 0x23, 0xc6, 0x7d, 0xc8, 0x4e, 0x25, 0x9d, 0x97, 0xdd, 0x5a, 0x4a, 0xa4, 0xfa, 0x6f, 0x09,
- 0x28, 0x6e, 0x11, 0xdd, 0xf6, 0x0f, 0x26, 0x57, 0x43, 0x3e, 0xf1, 0x7c, 0x79, 0x58, 0xf1, 0x6f,
- 0xf4, 0x1e, 0xe4, 0xc2, 0x9c, 0xe4, 0xca, 0xf7, 0xb7, 0x10, 0x8a, 0x1e, 0xc0, 0x3c, 0xdb, 0x63,
- 0x74, 0x14, 0x14, 0x3b, 0x97, 0x3d, 0xed, 0x48, 0x24, 0x3b, 0x64, 0x5c, 0xc2, 0x93, 0x10, 0xbe,
- 0x94, 0x32, 0x38, 0x68, 0xa2, 0xff, 0x0f, 0x45, 0xfe, 0x32, 0x11, 0xe4, 0x5c, 0x99, 0xab, 0x74,
- 0x16, 0xc4, 0xe3, 0xa2, 0xc8, 0xb7, 0xfe, 0x27, 0x01, 0x2b, 0x3b, 0xfa, 0x78, 0x8f, 0xc8, 0xb0,
- 0x41, 0x4c, 0x4c, 0x0c, 0xea, 0x9a, 0xa8, 0x13, 0x0d, 0x37, 0x97, 0xbc, 0x55, 0xc6, 0x09, 0xc7,
- 0x47, 0x9d, 0xa0, 0x00, 0x4b, 0x46, 0x0a, 0xb0, 0x15, 0xc8, 0x38, 0xd4, 0x31, 0x88, 0x8c, 0x45,
- 0xa2, 0xa1, 0x5a, 0xd1, 0x50, 0x53, 0x0a, 0x9f, 0x11, 0xf9, 0x23, 0x60, 0x8b, 0xfa, 0x61, 0x6f,
- 0xe8, 0x33, 0x28, 0x75, 0x1b, 0x35, 0xdc, 0xe8, 0x55, 0xdb, 0x3f, 0xd4, 0xba, 0x95, 0xed, 0x6e,
- 0xe5, 0xfe, 0x5d, 0xad, 0xd3, 0xde, 0xfe, 0xfc, 0xde, 0x83, 0xbb, 0xef, 0x29, 0x89, 0xd2, 0xc6,
- 0xc9, 0xe9, 0xc6, 0xcd, 0x56, 0xa5, 0xb6, 0x2d, 0x76, 0xcc, 0x1e, 0x7d, 0xd6, 0xd5, 0x6d, 0x4f,
- 0xbf, 0x7f, 0xb7, 0x43, 0xed, 0x31, 0xc3, 0xb0, 0x65, 0x5d, 0x8c, 0x9e, 0x57, 0xd1, 0x63, 0x38,
- 0x71, 0xe1, 0x31, 0x3c, 0x39, 0xcd, 0x93, 0x17, 0x9c, 0xe6, 0x9b, 0xb0, 0x62, 0xb8, 0xd4, 0xf3,
- 0x34, 0x96, 0xfd, 0x13, 0x73, 0xa6, 0xbe, 0xf8, 0xce, 0xf9, 0xd9, 0xfa, 0x72, 0x8d, 0xf1, 0xbb,
- 0x9c, 0x2d, 0xd5, 0x2f, 0x1b, 0x11, 0x12, 0xef, 0x49, 0xfd, 0x83, 0x14, 0x4b, 0xa4, 0xac, 0x23,
- 0xcb, 0x26, 0x7d, 0xe2, 0xa1, 0x27, 0xb0, 0x64, 0xb8, 0xc4, 0x64, 0x69, 0xbd, 0x6e, 0x47, 0x7f,
- 0x27, 0xfa, 0xff, 0x62, 0x73, 0x9a, 0x50, 0xb0, 0x5c, 0x0b, 0xa5, 0xba, 0x43, 0x62, 0xe0, 0x45,
- 0x63, 0xaa, 0x8d, 0xbe, 0x80, 0x25, 0x8f, 0xd8, 0x96, 0x33, 0x7a, 0xa6, 0x19, 0xd4, 0xf1, 0xc9,
- 0xb3, 0xe0, 0x45, 0xec, 0x2a, 0xbd, 0xdd, 0xc6, 0x36, 0x93, 0xaa, 0x09, 0xa1, 0x2a, 0x3a, 0x3f,
- 0x5b, 0x5f, 0x9c, 0xa6, 0xe1, 0x45, 0xa9, 0x59, 0xb6, 0x4b, 0x2d, 0x58, 0x9c, 0xb6, 0x06, 0xad,
- 0xc8, 0xbd, 0xcf, 0x43, 0x48, 0xb0, 0xb7, 0xd1, 0x4d, 0xc8, 0xb9, 0xa4, 0x6f, 0x79, 0xbe, 0x2b,
- 0xdc, 0xcc, 0x38, 0x21, 0x85, 0xed, 0x7c, 0xf1, 0x23, 0x9f, 0xd2, 0xaf, 0xc2, 0x4c, 0x8f, 0x6c,
- 0xb3, 0x98, 0x96, 0xa7, 0xef, 0x49, 0x95, 0x39, 0x1c, 0x34, 0xd9, 0x1a, 0x1c, 0x79, 0x61, 0xa2,
- 0xc6, 0xbf, 0x19, 0x8d, 0x67, 0x14, 0xf2, 0x27, 0x4f, 0x3c, 0x67, 0x08, 0x7e, 0x3b, 0x99, 0x8e,
- 0xfc, 0x76, 0x72, 0x05, 0x32, 0x36, 0x39, 0x22, 0xb6, 0x38, 0xcb, 0xb1, 0x68, 0xdc, 0xbe, 0x0b,
- 0xc5, 0xe0, 0x47, 0x7a, 0xfc, 0x57, 0x06, 0x39, 0x48, 0xf7, 0x2a, 0xdd, 0xc7, 0xca, 0x1c, 0x02,
- 0xc8, 0x8a, 0xc5, 0x29, 0x5e, 0xeb, 0x6a, 0xed, 0xd6, 0x66, 0xf3, 0x91, 0x92, 0xbc, 0xfd, 0xb3,
- 0x14, 0xe4, 0xc3, 0xf7, 0x22, 0x76, 0x76, 0xb4, 0x1a, 0x4f, 0x83, 0xd5, 0x1d, 0xd2, 0x5b, 0xe4,
- 0x18, 0xbd, 0x36, 0xb9, 0x85, 0xfa, 0x4c, 0x3c, 0x90, 0x87, 0xec, 0xe0, 0x06, 0xea, 0x0d, 0xc8,
- 0x55, 0xba, 0xdd, 0xe6, 0xa3, 0x56, 0xa3, 0xae, 0x7c, 0x99, 0x28, 0x7d, 0xe7, 0xe4, 0x74, 0x63,
- 0x39, 0x04, 0x55, 0x3c, 0xb1, 0xf8, 0x38, 0xaa, 0x56, 0x6b, 0x74, 0x7a, 0x8d, 0xba, 0xf2, 0x3c,
- 0x39, 0x8b, 0xe2, 0xb7, 0x2a, 0xfc, 0x67, 0x2e, 0xf9, 0x0e, 0x6e, 0x74, 0x2a, 0x98, 0x75, 0xf8,
- 0x65, 0x52, 0x5c, 0x8e, 0x4d, 0x7a, 0x74, 0xc9, 0x50, 0x77, 0x59, 0x9f, 0x6b, 0xc1, 0xcf, 0xbd,
- 0x9e, 0xa7, 0xc4, 0x4f, 0x21, 0x26, 0x8f, 0x5f, 0x44, 0x37, 0xc7, 0xac, 0x37, 0xfe, 0xea, 0xc8,
- 0xd5, 0xa4, 0x66, 0x7a, 0xeb, 0xb2, 0xd8, 0xc3, 0xb4, 0xa8, 0x30, 0x8f, 0x77, 0x5b, 0x2d, 0x06,
- 0x7a, 0x9e, 0x9e, 0x19, 0x1d, 0x1e, 0x39, 0xac, 0x62, 0x46, 0xb7, 0x20, 0x17, 0x3c, 0x4a, 0x2a,
- 0x5f, 0xa6, 0x67, 0x0c, 0xaa, 0x05, 0x2f, 0xaa, 0xbc, 0xc3, 0xad, 0xdd, 0x1e, 0xff, 0x35, 0xda,
- 0xf3, 0xcc, 0x6c, 0x87, 0x07, 0x23, 0xdf, 0xa4, 0xc7, 0x0e, 0xdb, 0xb3, 0xf2, 0x1e, 0xee, 0xcb,
- 0x8c, 0xb8, 0xb4, 0x08, 0x31, 0xf2, 0x12, 0xee, 0x0d, 0xc8, 0xe1, 0xc6, 0x0f, 0xc4, 0x0f, 0xd7,
- 0x9e, 0x67, 0x67, 0xf4, 0x60, 0xf2, 0x05, 0x31, 0x64, 0x6f, 0x6d, 0xdc, 0xd9, 0xaa, 0x70, 0x97,
- 0xcf, 0xa2, 0xda, 0xee, 0xf0, 0x40, 0x77, 0x88, 0x39, 0xf9, 0x3d, 0x48, 0xc8, 0xba, 0xfd, 0x4b,
- 0x90, 0x0b, 0x32, 0x53, 0xb4, 0x06, 0xd9, 0xa7, 0x6d, 0xfc, 0xb8, 0x81, 0x95, 0x39, 0xe1, 0xc3,
- 0x80, 0xf3, 0x54, 0xd4, 0x14, 0x1b, 0x30, 0xbf, 0x53, 0x69, 0x55, 0x1e, 0x35, 0x70, 0x70, 0x45,
- 0x1e, 0x00, 0x64, 0x7a, 0x55, 0x52, 0x64, 0x07, 0xa1, 0xce, 0xea, 0xea, 0x57, 0x5f, 0xaf, 0xcd,
- 0xfd, 0xf4, 0xeb, 0xb5, 0xb9, 0xe7, 0xe7, 0x6b, 0x89, 0xaf, 0xce, 0xd7, 0x12, 0x3f, 0x39, 0x5f,
- 0x4b, 0xfc, 0xeb, 0xf9, 0x5a, 0x62, 0x2f, 0xcb, 0x0f, 0x81, 0x07, 0xff, 0x1b, 0x00, 0x00, 0xff,
- 0xff, 0x3b, 0x34, 0xbd, 0xc6, 0xd3, 0x30, 0x00, 0x00,
+ // 5020 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x5a, 0x4d, 0x6c, 0x24, 0x49,
+ 0x56, 0x76, 0xfd, 0xba, 0xea, 0x55, 0xd9, 0x4e, 0x47, 0x7b, 0x7b, 0xdc, 0xb5, 0xdd, 0x76, 0x4d,
+ 0xce, 0xf4, 0xce, 0x6c, 0x6f, 0x53, 0xfd, 0xb7, 0xbb, 0xea, 0x99, 0x61, 0x77, 0xa6, 0xfe, 0x6c,
+ 0xd7, 0xb6, 0x5d, 0x55, 0x8a, 0x2a, 0x77, 0xef, 0x22, 0x41, 0x2a, 0x9d, 0x19, 0x2e, 0xe7, 0x38,
+ 0x2b, 0xa3, 0xc8, 0xcc, 0xb2, 0xbb, 0x58, 0x10, 0x2d, 0x0e, 0x80, 0x7c, 0x82, 0xdb, 0x22, 0x64,
+ 0x2e, 0x70, 0x42, 0x48, 0x1c, 0x40, 0x42, 0x70, 0x1a, 0x24, 0x0e, 0x7b, 0x83, 0x05, 0x09, 0xad,
+ 0x40, 0x32, 0xac, 0x0f, 0xdc, 0x56, 0x70, 0x59, 0x71, 0x01, 0x09, 0xc5, 0x4f, 0x66, 0xa5, 0xab,
+ 0xd3, 0x76, 0x0f, 0xb3, 0x17, 0xbb, 0xe2, 0xbd, 0xef, 0xbd, 0x78, 0xf1, 0x22, 0xe2, 0xc5, 0x7b,
+ 0x11, 0x09, 0xf7, 0x06, 0x96, 0x7f, 0x30, 0xde, 0xab, 0x18, 0x74, 0xf8, 0xc0, 0xa4, 0xc6, 0x21,
+ 0x71, 0x1f, 0x78, 0xc7, 0xba, 0x3b, 0x3c, 0xb4, 0xfc, 0x07, 0xfa, 0xc8, 0x7a, 0xe0, 0x4f, 0x46,
+ 0xc4, 0xab, 0x8c, 0x5c, 0xea, 0x53, 0x84, 0x04, 0xa0, 0x12, 0x00, 0x2a, 0x47, 0x8f, 0x4a, 0xeb,
+ 0x03, 0x4a, 0x07, 0x36, 0x79, 0xc0, 0x11, 0x7b, 0xe3, 0xfd, 0x07, 0xbe, 0x35, 0x24, 0x9e, 0xaf,
+ 0x0f, 0x47, 0x42, 0xa8, 0xb4, 0x36, 0x0b, 0x30, 0xc7, 0xae, 0xee, 0x5b, 0xd4, 0x91, 0xfc, 0x95,
+ 0x01, 0x1d, 0x50, 0xfe, 0xf3, 0x01, 0xfb, 0x25, 0xa8, 0xea, 0x3a, 0xcc, 0x3f, 0x27, 0xae, 0x67,
+ 0x51, 0x07, 0xad, 0x40, 0xc6, 0x72, 0x4c, 0xf2, 0x72, 0x35, 0x51, 0x4e, 0xbc, 0x9f, 0xc6, 0xa2,
+ 0xa1, 0x3e, 0x04, 0x68, 0xb1, 0x1f, 0x4d, 0xc7, 0x77, 0x27, 0x48, 0x81, 0xd4, 0x21, 0x99, 0x70,
+ 0x44, 0x1e, 0xb3, 0x9f, 0x8c, 0x72, 0xa4, 0xdb, 0xab, 0x49, 0x41, 0x39, 0xd2, 0x6d, 0xf5, 0x27,
+ 0x09, 0x28, 0x54, 0x1d, 0x87, 0xfa, 0xbc, 0x77, 0x0f, 0x21, 0x48, 0x3b, 0xfa, 0x90, 0x48, 0x21,
+ 0xfe, 0x1b, 0xd5, 0x21, 0x6b, 0xeb, 0x7b, 0xc4, 0xf6, 0x56, 0x93, 0xe5, 0xd4, 0xfb, 0x85, 0xc7,
+ 0x5f, 0xab, 0xbc, 0x3e, 0xe4, 0x4a, 0x44, 0x49, 0x65, 0x9b, 0xa3, 0xb9, 0x11, 0x58, 0x8a, 0xa2,
+ 0x6f, 0xc3, 0xbc, 0xe5, 0x98, 0x96, 0x41, 0xbc, 0xd5, 0x34, 0xd7, 0xb2, 0x16, 0xa7, 0x65, 0x6a,
+ 0x7d, 0x2d, 0xfd, 0xc3, 0xb3, 0xf5, 0x39, 0x1c, 0x08, 0x95, 0x3e, 0x80, 0x42, 0x44, 0x6d, 0xcc,
+ 0xd8, 0x56, 0x20, 0x73, 0xa4, 0xdb, 0x63, 0x22, 0x47, 0x27, 0x1a, 0x1f, 0x26, 0x9f, 0x26, 0xd4,
+ 0x4f, 0x60, 0xa5, 0xad, 0x0f, 0x89, 0xb9, 0x49, 0x1c, 0xe2, 0x5a, 0x06, 0x26, 0x1e, 0x1d, 0xbb,
+ 0x06, 0x61, 0x63, 0x3d, 0xb4, 0x1c, 0x33, 0x18, 0x2b, 0xfb, 0x1d, 0xaf, 0x45, 0xad, 0xc3, 0x5b,
+ 0x0d, 0xcb, 0x33, 0x5c, 0xe2, 0x93, 0xcf, 0xad, 0x24, 0x15, 0x28, 0x39, 0x4b, 0xc0, 0xd2, 0xac,
+ 0xf4, 0x2f, 0xc1, 0x0d, 0xe6, 0x62, 0x53, 0x73, 0x25, 0x45, 0xf3, 0x46, 0xc4, 0xe0, 0xca, 0x0a,
+ 0x8f, 0xdf, 0x8f, 0xf3, 0x50, 0xdc, 0x48, 0xb6, 0xe6, 0xf0, 0x32, 0x57, 0x13, 0x10, 0x7a, 0x23,
+ 0x62, 0x20, 0x03, 0x6e, 0x9a, 0xd2, 0xe8, 0x19, 0xf5, 0x49, 0xae, 0x3e, 0x76, 0x1a, 0x2f, 0x19,
+ 0xe6, 0xd6, 0x1c, 0x5e, 0x09, 0x94, 0x45, 0x3b, 0xa9, 0x01, 0xe4, 0x02, 0xdd, 0xea, 0x0f, 0x12,
+ 0x90, 0x0f, 0x98, 0x1e, 0xfa, 0x2a, 0xe4, 0x1d, 0xdd, 0xa1, 0x9a, 0x31, 0x1a, 0x7b, 0x7c, 0x40,
+ 0xa9, 0x5a, 0xf1, 0xfc, 0x6c, 0x3d, 0xd7, 0xd6, 0x1d, 0x5a, 0xef, 0xee, 0x7a, 0x38, 0xc7, 0xd8,
+ 0xf5, 0xd1, 0xd8, 0x43, 0x6f, 0x43, 0x71, 0x48, 0x86, 0xd4, 0x9d, 0x68, 0x7b, 0x13, 0x9f, 0x78,
+ 0xd2, 0x6d, 0x05, 0x41, 0xab, 0x31, 0x12, 0xfa, 0x16, 0xcc, 0x0f, 0x84, 0x49, 0xab, 0x29, 0xbe,
+ 0x7c, 0xde, 0x89, 0xb3, 0x7e, 0xc6, 0x6a, 0x1c, 0xc8, 0xa8, 0xbf, 0x97, 0x80, 0x95, 0x90, 0x4a,
+ 0x7e, 0x75, 0x6c, 0xb9, 0x64, 0x48, 0x1c, 0xdf, 0x43, 0xdf, 0x80, 0xac, 0x6d, 0x0d, 0x2d, 0xdf,
+ 0x93, 0x3e, 0xbf, 0x13, 0xa7, 0x36, 0x1c, 0x14, 0x96, 0x60, 0x54, 0x85, 0xa2, 0x4b, 0x3c, 0xe2,
+ 0x1e, 0x89, 0x15, 0x2f, 0x3d, 0x7a, 0x8d, 0xf0, 0x05, 0x11, 0x75, 0x03, 0x72, 0x5d, 0x5b, 0xf7,
+ 0xf7, 0xa9, 0x3b, 0x44, 0x2a, 0x14, 0x75, 0xd7, 0x38, 0xb0, 0x7c, 0x62, 0xf8, 0x63, 0x37, 0xd8,
+ 0x7d, 0x17, 0x68, 0xe8, 0x26, 0x24, 0xa9, 0xe8, 0x28, 0x5f, 0xcb, 0x9e, 0x9f, 0xad, 0x27, 0x3b,
+ 0x3d, 0x9c, 0xa4, 0x9e, 0xfa, 0x11, 0x2c, 0x77, 0xed, 0xf1, 0xc0, 0x72, 0x1a, 0xc4, 0x33, 0x5c,
+ 0x6b, 0xc4, 0xb4, 0xb3, 0x55, 0xc9, 0x62, 0x54, 0xb0, 0x2a, 0xd9, 0xef, 0x70, 0x6b, 0x27, 0xa7,
+ 0x5b, 0x5b, 0xfd, 0x9d, 0x24, 0x2c, 0x37, 0x9d, 0x81, 0xe5, 0x90, 0xa8, 0xf4, 0x5d, 0x58, 0x24,
+ 0x9c, 0xa8, 0x1d, 0x89, 0x70, 0x23, 0xf5, 0x2c, 0x08, 0x6a, 0x10, 0x83, 0x5a, 0x33, 0x71, 0xe1,
+ 0x51, 0xdc, 0xf0, 0x5f, 0xd3, 0x1e, 0x1b, 0x1d, 0x9a, 0x30, 0x3f, 0xe2, 0x83, 0xf0, 0xe4, 0xf4,
+ 0xde, 0x8d, 0xd3, 0xf5, 0xda, 0x38, 0x83, 0x20, 0x21, 0x65, 0xbf, 0x48, 0x90, 0xf8, 0xb3, 0x24,
+ 0x2c, 0xb5, 0xa9, 0x79, 0xc1, 0x0f, 0x25, 0xc8, 0x1d, 0x50, 0xcf, 0x8f, 0x04, 0xc4, 0xb0, 0x8d,
+ 0x9e, 0x42, 0x6e, 0x24, 0xa7, 0x4f, 0xce, 0xfe, 0xed, 0x78, 0x93, 0x05, 0x06, 0x87, 0x68, 0xf4,
+ 0x11, 0xe4, 0x83, 0x2d, 0xc3, 0x46, 0xfb, 0x06, 0x0b, 0x67, 0x8a, 0x47, 0xdf, 0x82, 0xac, 0x98,
+ 0x84, 0xd5, 0x34, 0x97, 0xbc, 0xfb, 0x46, 0x3e, 0xc7, 0x52, 0x08, 0x6d, 0x42, 0xce, 0xb7, 0x3d,
+ 0xcd, 0x72, 0xf6, 0xe9, 0x6a, 0x86, 0x2b, 0x58, 0x8f, 0x0d, 0x32, 0xd4, 0x24, 0xfd, 0xed, 0x5e,
+ 0xcb, 0xd9, 0xa7, 0xb5, 0xc2, 0xf9, 0xd9, 0xfa, 0xbc, 0x6c, 0xe0, 0x79, 0xdf, 0xf6, 0xd8, 0x0f,
+ 0xf5, 0xf7, 0x13, 0x50, 0x88, 0xa0, 0xd0, 0x1d, 0x00, 0xdf, 0x1d, 0x7b, 0xbe, 0xe6, 0x52, 0xea,
+ 0x73, 0x67, 0x15, 0x71, 0x9e, 0x53, 0x30, 0xa5, 0x3e, 0xaa, 0xc0, 0x0d, 0x83, 0xb8, 0xbe, 0x66,
+ 0x79, 0xde, 0x98, 0xb8, 0x9a, 0x37, 0xde, 0xfb, 0x94, 0x18, 0x3e, 0x77, 0x5c, 0x11, 0x2f, 0x33,
+ 0x56, 0x8b, 0x73, 0x7a, 0x82, 0x81, 0x9e, 0xc0, 0xcd, 0x28, 0x7e, 0x34, 0xde, 0xb3, 0x2d, 0x43,
+ 0x63, 0x93, 0x99, 0xe2, 0x22, 0x37, 0xa6, 0x22, 0x5d, 0xce, 0x7b, 0x46, 0x26, 0xea, 0x8f, 0x13,
+ 0xa0, 0x60, 0x7d, 0xdf, 0xdf, 0x21, 0xc3, 0x3d, 0xe2, 0xf6, 0x7c, 0xdd, 0x1f, 0x7b, 0xe8, 0x26,
+ 0x64, 0x6d, 0xa2, 0x9b, 0xc4, 0xe5, 0x46, 0xe5, 0xb0, 0x6c, 0xa1, 0x5d, 0xb6, 0x83, 0x75, 0xe3,
+ 0x40, 0xdf, 0xb3, 0x6c, 0xcb, 0x9f, 0x70, 0x53, 0x16, 0xe3, 0x97, 0xf0, 0xac, 0xce, 0x0a, 0x8e,
+ 0x08, 0xe2, 0x0b, 0x6a, 0xd0, 0x2a, 0xcc, 0x0f, 0x89, 0xe7, 0xe9, 0x03, 0xc2, 0x2d, 0xcd, 0xe3,
+ 0xa0, 0xa9, 0x7e, 0x04, 0xc5, 0xa8, 0x1c, 0x2a, 0xc0, 0xfc, 0x6e, 0xfb, 0x59, 0xbb, 0xf3, 0xa2,
+ 0xad, 0xcc, 0xa1, 0x25, 0x28, 0xec, 0xb6, 0x71, 0xb3, 0x5a, 0xdf, 0xaa, 0xd6, 0xb6, 0x9b, 0x4a,
+ 0x02, 0x2d, 0x40, 0x7e, 0xda, 0x4c, 0xaa, 0x7f, 0x91, 0x00, 0x60, 0xee, 0x96, 0x83, 0xfa, 0x10,
+ 0x32, 0x9e, 0xaf, 0xfb, 0x62, 0x55, 0x2e, 0x3e, 0x7e, 0xf7, 0xb2, 0x39, 0x94, 0xf6, 0xb2, 0x7f,
+ 0x04, 0x0b, 0x91, 0xa8, 0x85, 0xc9, 0x0b, 0x16, 0xb2, 0x00, 0xa1, 0x9b, 0xa6, 0x2b, 0x0d, 0xe7,
+ 0xbf, 0xd5, 0x8f, 0x20, 0xc3, 0xa5, 0x2f, 0x9a, 0x9b, 0x83, 0x74, 0x83, 0xfd, 0x4a, 0xa0, 0x3c,
+ 0x64, 0x70, 0xb3, 0xda, 0xf8, 0x9e, 0x92, 0x44, 0x0a, 0x14, 0x1b, 0xad, 0x5e, 0xbd, 0xd3, 0x6e,
+ 0x37, 0xeb, 0xfd, 0x66, 0x43, 0x49, 0xa9, 0x77, 0x21, 0xd3, 0x1a, 0x32, 0xcd, 0xb7, 0xd9, 0x92,
+ 0xdf, 0x27, 0x2e, 0x71, 0x8c, 0x60, 0x27, 0x4d, 0x09, 0xea, 0x4f, 0x0b, 0x90, 0xd9, 0xa1, 0x63,
+ 0xc7, 0x47, 0x8f, 0x23, 0x61, 0x6b, 0x31, 0x3e, 0x43, 0xe0, 0xc0, 0x4a, 0x7f, 0x32, 0x22, 0x32,
+ 0xac, 0xdd, 0x84, 0xac, 0xd8, 0x1c, 0x72, 0x38, 0xb2, 0xc5, 0xe8, 0xbe, 0xee, 0x0e, 0x88, 0x2f,
+ 0xc7, 0x23, 0x5b, 0xe8, 0x7d, 0x76, 0x62, 0xe9, 0x26, 0x75, 0xec, 0x09, 0xdf, 0x43, 0x39, 0x71,
+ 0x2c, 0x61, 0xa2, 0x9b, 0x1d, 0xc7, 0x9e, 0xe0, 0x90, 0x8b, 0xb6, 0xa0, 0xb8, 0x67, 0x39, 0xa6,
+ 0x46, 0x47, 0x22, 0xc8, 0x67, 0x2e, 0xdf, 0x71, 0xc2, 0xaa, 0x9a, 0xe5, 0x98, 0x1d, 0x01, 0xc6,
+ 0x85, 0xbd, 0x69, 0x03, 0xb5, 0x61, 0xf1, 0x88, 0xda, 0xe3, 0x21, 0x09, 0x75, 0x65, 0xb9, 0xae,
+ 0xf7, 0x2e, 0xd7, 0xf5, 0x9c, 0xe3, 0x03, 0x6d, 0x0b, 0x47, 0xd1, 0x26, 0x7a, 0x06, 0x0b, 0xfe,
+ 0x70, 0xb4, 0xef, 0x85, 0xea, 0xe6, 0xb9, 0xba, 0xaf, 0x5c, 0xe1, 0x30, 0x06, 0x0f, 0xb4, 0x15,
+ 0xfd, 0x48, 0x0b, 0x6d, 0x42, 0xc1, 0xa0, 0x8e, 0x67, 0x79, 0x3e, 0x71, 0x8c, 0xc9, 0x6a, 0x8e,
+ 0xfb, 0xfe, 0x8a, 0x51, 0xd6, 0xa7, 0x60, 0x1c, 0x95, 0x2c, 0xfd, 0x56, 0x0a, 0x0a, 0x11, 0x17,
+ 0xa0, 0x1e, 0x14, 0x46, 0x2e, 0x1d, 0xe9, 0x03, 0x7e, 0xe2, 0xc9, 0x49, 0x7d, 0xf4, 0x46, 0xee,
+ 0xab, 0x74, 0xa7, 0x82, 0x38, 0xaa, 0x45, 0x3d, 0x4d, 0x42, 0x21, 0xc2, 0x44, 0xf7, 0x20, 0x87,
+ 0xbb, 0xb8, 0xf5, 0xbc, 0xda, 0x6f, 0x2a, 0x73, 0xa5, 0xdb, 0x27, 0xa7, 0xe5, 0x55, 0xae, 0x2d,
+ 0xaa, 0xa0, 0xeb, 0x5a, 0x47, 0x6c, 0x0d, 0xbf, 0x0f, 0xf3, 0x01, 0x34, 0x51, 0xfa, 0xf2, 0xc9,
+ 0x69, 0xf9, 0xad, 0x59, 0x68, 0x04, 0x89, 0x7b, 0x5b, 0x55, 0xdc, 0x6c, 0x28, 0xc9, 0x78, 0x24,
+ 0xee, 0x1d, 0xe8, 0x2e, 0x31, 0xd1, 0x57, 0x20, 0x2b, 0x81, 0xa9, 0x52, 0xe9, 0xe4, 0xb4, 0x7c,
+ 0x73, 0x16, 0x38, 0xc5, 0xe1, 0xde, 0x76, 0xf5, 0x79, 0x53, 0x49, 0xc7, 0xe3, 0x70, 0xcf, 0xd6,
+ 0x8f, 0x08, 0x7a, 0x17, 0x32, 0x02, 0x96, 0x29, 0xdd, 0x3a, 0x39, 0x2d, 0x7f, 0xe9, 0x35, 0x75,
+ 0x0c, 0x55, 0x5a, 0xfd, 0xdd, 0x3f, 0x5e, 0x9b, 0xfb, 0x9b, 0x3f, 0x59, 0x53, 0x66, 0xd9, 0xa5,
+ 0xff, 0x49, 0xc0, 0xc2, 0x85, 0xb5, 0x83, 0x54, 0xc8, 0x3a, 0xd4, 0xa0, 0x23, 0x71, 0x10, 0xe6,
+ 0x6a, 0x70, 0x7e, 0xb6, 0x9e, 0x6d, 0xd3, 0x3a, 0x1d, 0x4d, 0xb0, 0xe4, 0xa0, 0x67, 0x33, 0x47,
+ 0xf9, 0x93, 0x37, 0x5c, 0x98, 0xb1, 0x87, 0xf9, 0xc7, 0xb0, 0x60, 0xba, 0xd6, 0x11, 0x71, 0x35,
+ 0x83, 0x3a, 0xfb, 0xd6, 0x40, 0x1e, 0x72, 0xa5, 0xd8, 0x7c, 0x93, 0x03, 0x71, 0x51, 0x08, 0xd4,
+ 0x39, 0xfe, 0x0b, 0x1c, 0xe3, 0xa5, 0xe7, 0x50, 0x8c, 0x2e, 0x75, 0x76, 0x2e, 0x79, 0xd6, 0xaf,
+ 0x11, 0x99, 0x58, 0xf2, 0x34, 0x14, 0xe7, 0x19, 0x45, 0xa4, 0x95, 0xef, 0x41, 0x7a, 0x48, 0x4d,
+ 0xa1, 0x67, 0xa1, 0x76, 0x83, 0x65, 0x13, 0xff, 0x72, 0xb6, 0x5e, 0xa0, 0x5e, 0x65, 0xc3, 0xb2,
+ 0xc9, 0x0e, 0x35, 0x09, 0xe6, 0x00, 0xf5, 0x08, 0xd2, 0x2c, 0xe6, 0xa0, 0x2f, 0x43, 0xba, 0xd6,
+ 0x6a, 0x37, 0x94, 0xb9, 0xd2, 0xf2, 0xc9, 0x69, 0x79, 0x81, 0xbb, 0x84, 0x31, 0xd8, 0xda, 0x45,
+ 0xeb, 0x90, 0x7d, 0xde, 0xd9, 0xde, 0xdd, 0x61, 0xcb, 0xeb, 0xc6, 0xc9, 0x69, 0x79, 0x29, 0x64,
+ 0x0b, 0xa7, 0xa1, 0x3b, 0x90, 0xe9, 0xef, 0x74, 0x37, 0x7a, 0x4a, 0xb2, 0x84, 0x4e, 0x4e, 0xcb,
+ 0x8b, 0x21, 0x9f, 0xdb, 0x5c, 0x5a, 0x96, 0xb3, 0x9a, 0x0f, 0xe9, 0xea, 0x8f, 0x12, 0x50, 0x88,
+ 0x6c, 0x38, 0xb6, 0x30, 0x1b, 0xcd, 0x8d, 0xea, 0xee, 0x76, 0x5f, 0x99, 0x8b, 0x2c, 0xcc, 0x08,
+ 0xa4, 0x41, 0xf6, 0xf5, 0xb1, 0xcd, 0xe2, 0x1c, 0xd4, 0x3b, 0xed, 0x5e, 0xab, 0xd7, 0x6f, 0xb6,
+ 0xfb, 0x4a, 0xa2, 0xb4, 0x7a, 0x72, 0x5a, 0x5e, 0x99, 0x05, 0x6f, 0x8c, 0x6d, 0x9b, 0x2d, 0xcd,
+ 0x7a, 0xb5, 0xbe, 0xc5, 0xd7, 0xfa, 0x74, 0x69, 0x46, 0x50, 0x75, 0xdd, 0x38, 0x20, 0x26, 0xba,
+ 0x0f, 0xf9, 0x46, 0x73, 0xbb, 0xb9, 0x59, 0xe5, 0xd1, 0xbd, 0x74, 0xe7, 0xe4, 0xb4, 0x7c, 0xeb,
+ 0xf5, 0xde, 0x6d, 0x32, 0xd0, 0x7d, 0x62, 0xce, 0x2c, 0xd1, 0x08, 0x44, 0xfd, 0x59, 0x12, 0x16,
+ 0x30, 0x2b, 0x87, 0x5d, 0xbf, 0x4b, 0x6d, 0xcb, 0x98, 0xa0, 0x2e, 0xe4, 0x0d, 0xea, 0x98, 0x56,
+ 0x24, 0x4e, 0x3c, 0xbe, 0x24, 0x25, 0x9a, 0x4a, 0x05, 0xad, 0x7a, 0x20, 0x89, 0xa7, 0x4a, 0xd0,
+ 0x03, 0xc8, 0x98, 0xc4, 0xd6, 0x27, 0x32, 0x37, 0xbb, 0x55, 0x11, 0x05, 0x77, 0x25, 0x28, 0xb8,
+ 0x2b, 0x0d, 0x59, 0x70, 0x63, 0x81, 0xe3, 0x35, 0x88, 0xfe, 0x52, 0xd3, 0x7d, 0x9f, 0x0c, 0x47,
+ 0xbe, 0x48, 0xcc, 0xd2, 0xb8, 0x30, 0xd4, 0x5f, 0x56, 0x25, 0x09, 0x3d, 0x82, 0xec, 0xb1, 0xe5,
+ 0x98, 0xf4, 0x58, 0xe6, 0x5e, 0x57, 0x28, 0x95, 0x40, 0xf5, 0x84, 0xa5, 0x24, 0x33, 0x66, 0xb2,
+ 0x35, 0xd4, 0xee, 0xb4, 0x9b, 0xc1, 0x1a, 0x92, 0xfc, 0x8e, 0xd3, 0xa6, 0x0e, 0xdb, 0xff, 0xd0,
+ 0x69, 0x6b, 0x1b, 0xd5, 0xd6, 0xf6, 0x2e, 0x66, 0xeb, 0x68, 0xe5, 0xe4, 0xb4, 0xac, 0x84, 0x90,
+ 0x0d, 0xdd, 0xb2, 0x59, 0x31, 0x70, 0x0b, 0x52, 0xd5, 0xf6, 0xf7, 0x94, 0x64, 0x49, 0x39, 0x39,
+ 0x2d, 0x17, 0x43, 0x76, 0xd5, 0x99, 0x4c, 0xfd, 0x3e, 0xdb, 0xaf, 0xfa, 0xf7, 0x29, 0x28, 0xee,
+ 0x8e, 0x4c, 0xdd, 0x27, 0x62, 0x9f, 0xa1, 0x32, 0x14, 0x46, 0xba, 0xab, 0xdb, 0x36, 0xb1, 0x2d,
+ 0x6f, 0x28, 0xaf, 0x12, 0xa2, 0x24, 0xf4, 0xc1, 0x9b, 0xba, 0xb1, 0x96, 0x63, 0x7b, 0xe7, 0x07,
+ 0xff, 0xb6, 0x9e, 0x08, 0x1c, 0xba, 0x0b, 0x8b, 0xfb, 0xc2, 0x5a, 0x4d, 0x37, 0xf8, 0xc4, 0xa6,
+ 0xf8, 0xc4, 0x56, 0xe2, 0x26, 0x36, 0x6a, 0x56, 0x45, 0x0e, 0xb2, 0xca, 0xa5, 0xf0, 0xc2, 0x7e,
+ 0xb4, 0x89, 0x9e, 0xc0, 0xfc, 0x90, 0x3a, 0x96, 0x4f, 0xdd, 0xeb, 0x67, 0x21, 0x40, 0xa2, 0x7b,
+ 0xb0, 0xcc, 0x26, 0x37, 0xb0, 0x87, 0xb3, 0xf9, 0x71, 0x9e, 0xc4, 0x4b, 0x43, 0xfd, 0xa5, 0xec,
+ 0x10, 0x33, 0x32, 0xaa, 0x41, 0x86, 0xba, 0x2c, 0x5f, 0xcc, 0x72, 0x73, 0xef, 0x5f, 0x6b, 0xae,
+ 0x68, 0x74, 0x98, 0x0c, 0x16, 0xa2, 0xea, 0x37, 0x61, 0xe1, 0xc2, 0x20, 0x58, 0x9a, 0xd4, 0xad,
+ 0xee, 0xf6, 0x9a, 0xca, 0x1c, 0x2a, 0x42, 0xae, 0xde, 0x69, 0xf7, 0x5b, 0xed, 0x5d, 0x96, 0xe7,
+ 0x15, 0x21, 0x87, 0x3b, 0xdb, 0xdb, 0xb5, 0x6a, 0xfd, 0x99, 0x92, 0x54, 0x2b, 0x50, 0x88, 0x68,
+ 0x43, 0x8b, 0x00, 0xbd, 0x7e, 0xa7, 0xab, 0x6d, 0xb4, 0x70, 0xaf, 0x2f, 0xb2, 0xc4, 0x5e, 0xbf,
+ 0x8a, 0xfb, 0x92, 0x90, 0x50, 0xff, 0x33, 0x19, 0xcc, 0xa8, 0x4c, 0x0c, 0x6b, 0x17, 0x13, 0xc3,
+ 0x2b, 0x8c, 0x97, 0xa9, 0xe1, 0xb4, 0x11, 0x26, 0x88, 0x1f, 0x00, 0xf0, 0x85, 0x43, 0x4c, 0x4d,
+ 0xf7, 0xe5, 0xc4, 0x97, 0x5e, 0x73, 0x72, 0x3f, 0xb8, 0xd1, 0xc2, 0x79, 0x89, 0xae, 0xfa, 0xe8,
+ 0x5b, 0x50, 0x34, 0xe8, 0x70, 0x64, 0x13, 0x29, 0x9c, 0xba, 0x56, 0xb8, 0x10, 0xe2, 0xab, 0x7e,
+ 0x34, 0x35, 0x4d, 0x5f, 0x4c, 0x9e, 0x7f, 0x3b, 0x11, 0x78, 0x26, 0x26, 0x1b, 0x2d, 0x42, 0x6e,
+ 0xb7, 0xdb, 0xa8, 0xf6, 0x5b, 0xed, 0x4d, 0x25, 0x81, 0x00, 0xb2, 0xdc, 0xd5, 0x0d, 0x25, 0xc9,
+ 0xb2, 0xe8, 0x7a, 0x67, 0xa7, 0xbb, 0xdd, 0xe4, 0x11, 0x0b, 0xad, 0x80, 0x12, 0x38, 0x5b, 0xe3,
+ 0x8e, 0x6c, 0x36, 0x94, 0x34, 0xba, 0x01, 0x4b, 0x21, 0x55, 0x4a, 0x66, 0xd0, 0x4d, 0x40, 0x21,
+ 0x71, 0xaa, 0x22, 0xab, 0xfe, 0x06, 0x2c, 0xd5, 0xa9, 0xe3, 0xeb, 0x96, 0x13, 0x56, 0x18, 0x8f,
+ 0xd9, 0xa0, 0x25, 0x49, 0xb3, 0xe4, 0x4d, 0x50, 0x6d, 0xe9, 0xfc, 0x6c, 0xbd, 0x10, 0x42, 0x5b,
+ 0x0d, 0x9e, 0x2a, 0xc9, 0x86, 0xc9, 0xf6, 0xef, 0xc8, 0x32, 0xb9, 0x73, 0x33, 0xb5, 0xf9, 0xf3,
+ 0xb3, 0xf5, 0x54, 0xb7, 0xd5, 0xc0, 0x8c, 0x86, 0xbe, 0x0c, 0x79, 0xf2, 0xd2, 0xf2, 0x35, 0x83,
+ 0x9d, 0x4b, 0xcc, 0x81, 0x19, 0x9c, 0x63, 0x84, 0x3a, 0x3b, 0x86, 0x6a, 0x00, 0x5d, 0xea, 0xfa,
+ 0xb2, 0xe7, 0xaf, 0x43, 0x66, 0x44, 0x5d, 0x7e, 0x77, 0x71, 0xe9, 0x8d, 0x1a, 0x83, 0x8b, 0x85,
+ 0x8a, 0x05, 0x58, 0xfd, 0x83, 0x14, 0x40, 0x5f, 0xf7, 0x0e, 0xa5, 0x92, 0xa7, 0x90, 0x0f, 0x6f,
+ 0x27, 0xe5, 0x25, 0xc8, 0x95, 0xb3, 0x1d, 0x82, 0xd1, 0x93, 0x60, 0xb1, 0x89, 0xda, 0x29, 0xb6,
+ 0x88, 0x0d, 0x3a, 0x8a, 0x2b, 0x3f, 0x2e, 0x16, 0x48, 0xec, 0x98, 0x27, 0xae, 0x2b, 0x67, 0x9e,
+ 0xfd, 0x44, 0x75, 0x7e, 0x2c, 0x08, 0xa7, 0xc9, 0xec, 0x3b, 0xf6, 0xda, 0x67, 0x66, 0x46, 0xb6,
+ 0xe6, 0xf0, 0x54, 0x0e, 0x7d, 0x0c, 0x05, 0x36, 0x6e, 0xcd, 0xe3, 0x3c, 0x99, 0x78, 0x5f, 0xea,
+ 0x2a, 0xa1, 0x01, 0xc3, 0x68, 0xea, 0xe5, 0x3b, 0x00, 0xfa, 0x68, 0x64, 0x5b, 0xc4, 0xd4, 0xf6,
+ 0x26, 0x3c, 0xd3, 0xce, 0xe3, 0xbc, 0xa4, 0xd4, 0x26, 0x6c, 0xbb, 0x04, 0x6c, 0xdd, 0xe7, 0xd9,
+ 0xf3, 0x35, 0x0e, 0x94, 0xe8, 0xaa, 0x5f, 0x53, 0x60, 0xd1, 0x1d, 0x3b, 0xcc, 0xa1, 0xd2, 0x3a,
+ 0xf5, 0xcf, 0x93, 0xf0, 0x56, 0x9b, 0xf8, 0xc7, 0xd4, 0x3d, 0xac, 0xfa, 0xbe, 0x6e, 0x1c, 0x0c,
+ 0x89, 0x23, 0xa7, 0x2f, 0x52, 0xd0, 0x24, 0x2e, 0x14, 0x34, 0xab, 0x30, 0xaf, 0xdb, 0x96, 0xee,
+ 0x11, 0x91, 0xbc, 0xe5, 0x71, 0xd0, 0x64, 0x65, 0x17, 0x2b, 0xe2, 0x88, 0xe7, 0x11, 0x71, 0xaf,
+ 0xc2, 0x0c, 0x0f, 0x08, 0xe8, 0xfb, 0x70, 0x53, 0xa6, 0x69, 0x7a, 0xd8, 0x15, 0x2b, 0x28, 0x82,
+ 0x0b, 0xda, 0x66, 0x6c, 0x55, 0x19, 0x6f, 0x9c, 0xcc, 0xe3, 0xa6, 0xe4, 0xce, 0xc8, 0x97, 0x59,
+ 0xe1, 0x8a, 0x19, 0xc3, 0x2a, 0x6d, 0xc2, 0xad, 0x4b, 0x45, 0x3e, 0xd7, 0xbd, 0xcd, 0x3f, 0x25,
+ 0x01, 0x5a, 0xdd, 0xea, 0x8e, 0x74, 0x52, 0x03, 0xb2, 0xfb, 0xfa, 0xd0, 0xb2, 0x27, 0x57, 0x45,
+ 0xc0, 0x29, 0xbe, 0x52, 0x15, 0xee, 0xd8, 0xe0, 0x32, 0x58, 0xca, 0xf2, 0x9a, 0x72, 0xbc, 0xe7,
+ 0x10, 0x3f, 0xac, 0x29, 0x79, 0x8b, 0x99, 0xe1, 0xea, 0x4e, 0xb8, 0x74, 0x45, 0x83, 0x4d, 0x00,
+ 0x4b, 0x79, 0x8e, 0xf5, 0x49, 0x10, 0xb6, 0x64, 0x13, 0x6d, 0xf1, 0xdb, 0x51, 0xe2, 0x1e, 0x11,
+ 0x73, 0x35, 0xc3, 0x9d, 0x7a, 0x9d, 0x3d, 0x58, 0xc2, 0x85, 0xef, 0x42, 0xe9, 0xd2, 0x47, 0x3c,
+ 0x65, 0x9a, 0xb2, 0x3e, 0x97, 0x8f, 0x1e, 0xc2, 0xc2, 0x85, 0x71, 0xbe, 0x56, 0xcc, 0xb7, 0xba,
+ 0xcf, 0xbf, 0xae, 0xa4, 0xe5, 0xaf, 0x6f, 0x2a, 0x59, 0xf5, 0x4f, 0x53, 0x22, 0xd0, 0x48, 0xaf,
+ 0xc6, 0xbf, 0x0a, 0xe4, 0xf8, 0xea, 0x36, 0xa8, 0x2d, 0x03, 0xc0, 0x7b, 0x57, 0xc7, 0x1f, 0x56,
+ 0xd3, 0x71, 0x38, 0x0e, 0x05, 0xd1, 0x3a, 0x14, 0xc4, 0x2a, 0xd6, 0xd8, 0x86, 0xe3, 0x6e, 0x5d,
+ 0xc0, 0x20, 0x48, 0x4c, 0x12, 0xdd, 0x85, 0x45, 0x7e, 0xf9, 0xe3, 0x1d, 0x10, 0x53, 0x60, 0xd2,
+ 0x1c, 0xb3, 0x10, 0x52, 0x39, 0x6c, 0x07, 0x8a, 0x92, 0xa0, 0xf1, 0x7c, 0x3e, 0xc3, 0x0d, 0xba,
+ 0x77, 0x9d, 0x41, 0x42, 0x84, 0xa7, 0xf9, 0x85, 0xd1, 0xb4, 0xa1, 0x36, 0x20, 0x17, 0x18, 0x8b,
+ 0x56, 0x21, 0xd5, 0xaf, 0x77, 0x95, 0xb9, 0xd2, 0xd2, 0xc9, 0x69, 0xb9, 0x10, 0x90, 0xfb, 0xf5,
+ 0x2e, 0xe3, 0xec, 0x36, 0xba, 0x4a, 0xe2, 0x22, 0x67, 0xb7, 0xd1, 0x2d, 0xa5, 0x59, 0x0e, 0xa6,
+ 0xee, 0x43, 0x21, 0xd2, 0x03, 0x7a, 0x07, 0xe6, 0x5b, 0xed, 0x4d, 0xdc, 0xec, 0xf5, 0x94, 0xb9,
+ 0xd2, 0xcd, 0x93, 0xd3, 0x32, 0x8a, 0x70, 0x5b, 0xce, 0x80, 0xcd, 0x0f, 0xba, 0x03, 0xe9, 0xad,
+ 0x0e, 0x3b, 0xdb, 0x45, 0x01, 0x11, 0x41, 0x6c, 0x51, 0xcf, 0x2f, 0xdd, 0x90, 0xc9, 0x5d, 0x54,
+ 0xb1, 0xfa, 0x87, 0x09, 0xc8, 0x8a, 0xcd, 0x14, 0x3b, 0x51, 0x55, 0x98, 0x0f, 0xae, 0x09, 0x44,
+ 0x71, 0xf7, 0xde, 0xe5, 0x85, 0x58, 0x45, 0xd6, 0x4d, 0x62, 0xf9, 0x05, 0x72, 0xa5, 0x0f, 0xa1,
+ 0x18, 0x65, 0x7c, 0xae, 0xc5, 0xf7, 0x7d, 0x28, 0xb0, 0xf5, 0x1d, 0x14, 0x64, 0x8f, 0x21, 0x2b,
+ 0x02, 0x42, 0x78, 0xd6, 0x5c, 0x5e, 0x15, 0x4a, 0x24, 0x7a, 0x0a, 0xf3, 0xa2, 0x92, 0x0c, 0x6e,
+ 0x87, 0xd7, 0xae, 0xde, 0x45, 0x38, 0x80, 0xab, 0x1f, 0x43, 0xba, 0x4b, 0x88, 0xcb, 0x7c, 0xef,
+ 0x50, 0x93, 0x4c, 0x8f, 0x67, 0x59, 0x04, 0x9b, 0xa4, 0xd5, 0x60, 0x45, 0xb0, 0x49, 0x5a, 0x66,
+ 0x78, 0xff, 0x95, 0x8c, 0xdc, 0x7f, 0xf5, 0xa1, 0xf8, 0x82, 0x58, 0x83, 0x03, 0x9f, 0x98, 0x5c,
+ 0xd1, 0x7d, 0x48, 0x8f, 0x48, 0x68, 0xfc, 0x6a, 0xec, 0x02, 0x23, 0xc4, 0xc5, 0x1c, 0xc5, 0xe2,
+ 0xc8, 0x31, 0x97, 0x96, 0x4f, 0x1a, 0xb2, 0xa5, 0xfe, 0x63, 0x12, 0x16, 0x5b, 0x9e, 0x37, 0xd6,
+ 0x1d, 0x23, 0xc8, 0xdc, 0xbe, 0x7d, 0x31, 0x73, 0x8b, 0x7d, 0xfb, 0xb9, 0x28, 0x72, 0xf1, 0x5a,
+ 0x4f, 0x9e, 0x9e, 0xc9, 0xf0, 0xf4, 0x54, 0x7f, 0x9a, 0x08, 0xee, 0xee, 0xee, 0x46, 0xb6, 0xbb,
+ 0xa8, 0x03, 0xa3, 0x9a, 0xc8, 0xae, 0x73, 0xe8, 0xd0, 0x63, 0x07, 0xbd, 0x0d, 0x19, 0xdc, 0x6c,
+ 0x37, 0x5f, 0x28, 0x09, 0xb1, 0x3c, 0x2f, 0x80, 0x30, 0x71, 0xc8, 0x31, 0xd3, 0xd4, 0x6d, 0xb6,
+ 0x1b, 0x2c, 0xd3, 0x4a, 0xc6, 0x68, 0xea, 0x12, 0xc7, 0xb4, 0x9c, 0x01, 0x7a, 0x07, 0xb2, 0xad,
+ 0x5e, 0x6f, 0x97, 0x97, 0x89, 0x6f, 0x9d, 0x9c, 0x96, 0x6f, 0x5c, 0x40, 0xf1, 0x7b, 0x5b, 0x93,
+ 0x81, 0x58, 0x99, 0xc3, 0x72, 0xb0, 0x18, 0x10, 0xcb, 0x9f, 0x05, 0x08, 0x77, 0xfa, 0xd5, 0x7e,
+ 0x53, 0xc9, 0xc4, 0x80, 0x30, 0x65, 0x7f, 0xe5, 0x76, 0xfb, 0xd7, 0x24, 0x28, 0x55, 0xc3, 0x20,
+ 0x23, 0x9f, 0xf1, 0x65, 0x65, 0xd9, 0x87, 0xdc, 0x88, 0xfd, 0xb2, 0x48, 0x90, 0x25, 0x3d, 0x8d,
+ 0x7d, 0xbd, 0x9c, 0x91, 0xab, 0x60, 0x6a, 0x93, 0xaa, 0x39, 0xb4, 0x3c, 0xcf, 0xa2, 0x8e, 0xa0,
+ 0xe1, 0x50, 0x53, 0xe9, 0xbf, 0x12, 0x70, 0x23, 0x06, 0x81, 0x1e, 0x42, 0xda, 0xa5, 0x76, 0x30,
+ 0x87, 0xb7, 0x2f, 0xbb, 0x96, 0x65, 0xa2, 0x98, 0x23, 0xd1, 0x1a, 0x80, 0x3e, 0xf6, 0xa9, 0xce,
+ 0xfb, 0xe7, 0xb3, 0x97, 0xc3, 0x11, 0x0a, 0x7a, 0x01, 0x59, 0x8f, 0x18, 0x2e, 0x09, 0x72, 0xe9,
+ 0x8f, 0xff, 0xbf, 0xd6, 0x57, 0x7a, 0x5c, 0x0d, 0x96, 0xea, 0x4a, 0x15, 0xc8, 0x0a, 0x0a, 0x5b,
+ 0xf6, 0xa6, 0xee, 0xeb, 0xf2, 0xd2, 0x9e, 0xff, 0x66, 0xab, 0x49, 0xb7, 0x07, 0xc1, 0x6a, 0xd2,
+ 0xed, 0x81, 0xfa, 0x77, 0x49, 0x80, 0xe6, 0x4b, 0x9f, 0xb8, 0x8e, 0x6e, 0xd7, 0xab, 0xa8, 0x19,
+ 0x89, 0xfe, 0x62, 0xb4, 0x5f, 0x8d, 0x7d, 0x89, 0x08, 0x25, 0x2a, 0xf5, 0x6a, 0x4c, 0xfc, 0xbf,
+ 0x05, 0xa9, 0xb1, 0x2b, 0x1f, 0xa4, 0x45, 0x1e, 0xbc, 0x8b, 0xb7, 0x31, 0xa3, 0xa1, 0xe6, 0x34,
+ 0x6c, 0xa5, 0x2e, 0x7f, 0x76, 0x8e, 0x74, 0x10, 0x1b, 0xba, 0xd8, 0xce, 0x37, 0x74, 0xcd, 0x20,
+ 0xf2, 0xe4, 0x28, 0x8a, 0x9d, 0x5f, 0xaf, 0xd6, 0x89, 0xeb, 0xe3, 0xac, 0xa1, 0xb3, 0xff, 0x5f,
+ 0x28, 0xbe, 0xdd, 0x07, 0x98, 0x0e, 0x0d, 0xad, 0x41, 0xa6, 0xbe, 0xd1, 0xeb, 0x6d, 0x2b, 0x73,
+ 0x22, 0x80, 0x4f, 0x59, 0x9c, 0xac, 0xfe, 0x75, 0x12, 0x72, 0xf5, 0xaa, 0x3c, 0x56, 0xeb, 0xa0,
+ 0xf0, 0xa8, 0xc4, 0x9f, 0x3a, 0xc8, 0xcb, 0x91, 0xe5, 0x4e, 0x64, 0x60, 0xb9, 0xa2, 0xa8, 0x5d,
+ 0x64, 0x22, 0xcc, 0xea, 0x26, 0x17, 0x40, 0x18, 0x8a, 0x44, 0x3a, 0x41, 0x33, 0xf4, 0x20, 0xc6,
+ 0xaf, 0x5d, 0xed, 0x2c, 0x51, 0x9e, 0x4c, 0xdb, 0x1e, 0x2e, 0x04, 0x4a, 0xea, 0xba, 0x87, 0x3e,
+ 0x80, 0x25, 0xcf, 0x1a, 0x38, 0x96, 0x33, 0xd0, 0x02, 0xe7, 0xf1, 0x77, 0x97, 0xda, 0xf2, 0xf9,
+ 0xd9, 0xfa, 0x42, 0x4f, 0xb0, 0xa4, 0x0f, 0x17, 0x24, 0xb2, 0xce, 0x5d, 0x89, 0xbe, 0x09, 0x8b,
+ 0x11, 0x51, 0xe6, 0x45, 0xe1, 0x76, 0xe5, 0xfc, 0x6c, 0xbd, 0x18, 0x4a, 0x3e, 0x23, 0x13, 0x5c,
+ 0x0c, 0x05, 0x9f, 0x11, 0x7e, 0xff, 0xb2, 0x4f, 0x5d, 0x83, 0x68, 0x2e, 0xdf, 0xd3, 0xfc, 0x04,
+ 0x4f, 0xe3, 0x02, 0xa7, 0x89, 0x6d, 0xae, 0x3e, 0x87, 0x1b, 0x1d, 0xd7, 0x38, 0x20, 0x9e, 0x2f,
+ 0x5c, 0x21, 0xbd, 0xf8, 0x31, 0xdc, 0xf6, 0x75, 0xef, 0x50, 0x3b, 0xb0, 0x3c, 0x9f, 0xba, 0x13,
+ 0xcd, 0x25, 0x3e, 0x71, 0x18, 0x5f, 0xe3, 0x8f, 0xb5, 0xf2, 0xd2, 0xef, 0x16, 0xc3, 0x6c, 0x09,
+ 0x08, 0x0e, 0x10, 0xdb, 0x0c, 0xa0, 0xb6, 0xa0, 0xc8, 0xca, 0x14, 0x79, 0x71, 0xc6, 0x46, 0x0f,
+ 0x36, 0x1d, 0x68, 0x6f, 0x7c, 0x4c, 0xe5, 0x6d, 0x3a, 0x10, 0x3f, 0xd5, 0xef, 0x82, 0xd2, 0xb0,
+ 0xbc, 0x91, 0xee, 0x1b, 0x07, 0xc1, 0x6d, 0x26, 0x6a, 0x80, 0x72, 0x40, 0x74, 0xd7, 0xdf, 0x23,
+ 0xba, 0xaf, 0x8d, 0x88, 0x6b, 0x51, 0xf3, 0xfa, 0x59, 0x5e, 0x0a, 0x45, 0xba, 0x5c, 0x42, 0xfd,
+ 0xef, 0x04, 0x00, 0xd6, 0xf7, 0x83, 0x8c, 0xec, 0x6b, 0xb0, 0xec, 0x39, 0xfa, 0xc8, 0x3b, 0xa0,
+ 0xbe, 0x66, 0x39, 0x3e, 0x71, 0x8f, 0x74, 0x5b, 0x5e, 0xe0, 0x28, 0x01, 0xa3, 0x25, 0xe9, 0xe8,
+ 0x3e, 0xa0, 0x43, 0x42, 0x46, 0x1a, 0xb5, 0x4d, 0x2d, 0x60, 0x8a, 0xa7, 0xe4, 0x34, 0x56, 0x18,
+ 0xa7, 0x63, 0x9b, 0xbd, 0x80, 0x8e, 0x6a, 0xb0, 0xc6, 0x86, 0x4f, 0x1c, 0xdf, 0xb5, 0x88, 0xa7,
+ 0xed, 0x53, 0x57, 0xf3, 0x6c, 0x7a, 0xac, 0xed, 0x53, 0xdb, 0xa6, 0xc7, 0xc4, 0x0d, 0xee, 0xc6,
+ 0x4a, 0x36, 0x1d, 0x34, 0x05, 0x68, 0x83, 0xba, 0x3d, 0x9b, 0x1e, 0x6f, 0x04, 0x08, 0x96, 0xb6,
+ 0x4d, 0xc7, 0xec, 0x5b, 0xc6, 0x61, 0x90, 0xb6, 0x85, 0xd4, 0xbe, 0x65, 0x1c, 0xa2, 0x77, 0x60,
+ 0x81, 0xd8, 0x84, 0x5f, 0x91, 0x08, 0x54, 0x86, 0xa3, 0x8a, 0x01, 0x91, 0x81, 0xd4, 0x4f, 0x40,
+ 0x69, 0x3a, 0x86, 0x3b, 0x19, 0x45, 0xe6, 0xfc, 0x3e, 0x20, 0x16, 0x24, 0x35, 0x9b, 0x1a, 0x87,
+ 0xda, 0x50, 0x77, 0xf4, 0x01, 0xb3, 0x4b, 0xbc, 0xf0, 0x29, 0x8c, 0xb3, 0x4d, 0x8d, 0xc3, 0x1d,
+ 0x49, 0x57, 0x3f, 0x00, 0xe8, 0x8d, 0x5c, 0xa2, 0x9b, 0x1d, 0x96, 0x4d, 0x30, 0xd7, 0xf1, 0x96,
+ 0x66, 0xca, 0x17, 0x52, 0xea, 0xca, 0xad, 0xae, 0x08, 0x46, 0x23, 0xa4, 0xab, 0xbf, 0x0c, 0x37,
+ 0xba, 0xb6, 0x6e, 0xf0, 0xaf, 0x05, 0xba, 0xe1, 0x93, 0x15, 0x7a, 0x0a, 0x59, 0x01, 0x95, 0x33,
+ 0x19, 0xbb, 0xdd, 0xa6, 0x7d, 0x6e, 0xcd, 0x61, 0x89, 0xaf, 0x15, 0x01, 0xa6, 0x7a, 0xd4, 0xbf,
+ 0x4c, 0x40, 0x3e, 0xd4, 0x8f, 0xca, 0xe2, 0x25, 0xc6, 0x77, 0x75, 0xcb, 0x91, 0x55, 0x7d, 0x1e,
+ 0x47, 0x49, 0xa8, 0x05, 0x85, 0x51, 0x28, 0x7d, 0x65, 0x3e, 0x17, 0x63, 0x35, 0x8e, 0xca, 0xa2,
+ 0x0f, 0x21, 0x1f, 0x3c, 0x49, 0x07, 0x11, 0xf6, 0xea, 0x17, 0xec, 0x29, 0x5c, 0xfd, 0x36, 0xc0,
+ 0x77, 0xa8, 0xe5, 0xf4, 0xe9, 0x21, 0x71, 0xf8, 0x13, 0x2b, 0xab, 0x09, 0x49, 0xe0, 0x45, 0xd9,
+ 0xe2, 0xa5, 0xbe, 0x98, 0x82, 0xf0, 0xa5, 0x51, 0x34, 0xd5, 0xbf, 0x4d, 0x42, 0x16, 0x53, 0xea,
+ 0xd7, 0xab, 0xa8, 0x0c, 0x59, 0x19, 0x27, 0xf8, 0xf9, 0x53, 0xcb, 0x9f, 0x9f, 0xad, 0x67, 0x44,
+ 0x80, 0xc8, 0x18, 0x3c, 0x32, 0x44, 0x22, 0x78, 0xf2, 0xb2, 0x08, 0x8e, 0x1e, 0x42, 0x51, 0x82,
+ 0xb4, 0x03, 0xdd, 0x3b, 0x10, 0x05, 0x5a, 0x6d, 0xf1, 0xfc, 0x6c, 0x1d, 0x04, 0x72, 0x4b, 0xf7,
+ 0x0e, 0x30, 0x08, 0x34, 0xfb, 0x8d, 0x9a, 0x50, 0xf8, 0x94, 0x5a, 0x8e, 0xe6, 0xf3, 0x41, 0xc8,
+ 0xcb, 0xc4, 0xd8, 0x79, 0x9c, 0x0e, 0x55, 0x7e, 0x6f, 0x00, 0x9f, 0x4e, 0x07, 0xdf, 0x84, 0x05,
+ 0x97, 0x52, 0x5f, 0x84, 0x2d, 0x8b, 0x3a, 0xf2, 0x9e, 0xa2, 0x1c, 0x7b, 0x7d, 0x4d, 0xa9, 0x8f,
+ 0x25, 0x0e, 0x17, 0xdd, 0x48, 0x0b, 0x3d, 0x84, 0x15, 0x5b, 0xf7, 0x7c, 0x8d, 0xc7, 0x3b, 0x73,
+ 0xaa, 0x2d, 0xcb, 0xb7, 0x1a, 0x62, 0xbc, 0x0d, 0xce, 0x0a, 0x24, 0xd4, 0x7f, 0x4e, 0x40, 0x81,
+ 0x0d, 0xc6, 0xda, 0xb7, 0x0c, 0x96, 0xe4, 0x7d, 0xfe, 0xdc, 0xe3, 0x16, 0xa4, 0x0c, 0xcf, 0x95,
+ 0x4e, 0xe5, 0x87, 0x6f, 0xbd, 0x87, 0x31, 0xa3, 0xa1, 0x4f, 0x20, 0x2b, 0xef, 0x4b, 0x44, 0xda,
+ 0xa1, 0x5e, 0x9f, 0x8e, 0x4a, 0xdf, 0x48, 0x39, 0xbe, 0x96, 0xa7, 0xd6, 0x89, 0x43, 0x00, 0x47,
+ 0x49, 0xe8, 0x26, 0x24, 0x0d, 0xe1, 0x2e, 0xf9, 0x41, 0x4b, 0xbd, 0x8d, 0x93, 0x86, 0xa3, 0xfe,
+ 0x28, 0x01, 0x0b, 0xd3, 0x0d, 0xcf, 0x56, 0xc0, 0x6d, 0xc8, 0x7b, 0xe3, 0x3d, 0x6f, 0xe2, 0xf9,
+ 0x64, 0x18, 0x3c, 0x1f, 0x87, 0x04, 0xd4, 0x82, 0xbc, 0x6e, 0x0f, 0xa8, 0x6b, 0xf9, 0x07, 0x43,
+ 0x59, 0x89, 0xc6, 0xa7, 0x0a, 0x51, 0x9d, 0x95, 0x6a, 0x20, 0x82, 0xa7, 0xd2, 0xc1, 0xb9, 0x2f,
+ 0xbe, 0x31, 0xe0, 0xe7, 0xfe, 0xdb, 0x50, 0xb4, 0xf5, 0x21, 0xbf, 0x40, 0xf2, 0xad, 0xa1, 0x18,
+ 0x47, 0x1a, 0x17, 0x24, 0xad, 0x6f, 0x0d, 0x89, 0xaa, 0x42, 0x3e, 0x54, 0x86, 0x96, 0xa0, 0x50,
+ 0x6d, 0xf6, 0xb4, 0x47, 0x8f, 0x9f, 0x6a, 0x9b, 0xf5, 0x1d, 0x65, 0x4e, 0xe6, 0xa6, 0x7f, 0x95,
+ 0x80, 0x05, 0x19, 0x8e, 0x64, 0xbe, 0xff, 0x0e, 0xcc, 0xbb, 0xfa, 0xbe, 0x1f, 0x54, 0x24, 0x69,
+ 0xb1, 0xaa, 0x59, 0x84, 0x67, 0x15, 0x09, 0x63, 0xc5, 0x57, 0x24, 0x91, 0x0f, 0x1a, 0x52, 0x57,
+ 0x7e, 0xd0, 0x90, 0xfe, 0xb9, 0x7c, 0xd0, 0xa0, 0xfe, 0x26, 0xc0, 0x86, 0x65, 0x93, 0xbe, 0xb8,
+ 0x6b, 0x8a, 0xab, 0x2f, 0x59, 0x0e, 0x27, 0xef, 0x32, 0x83, 0x1c, 0xae, 0xd5, 0xc0, 0x8c, 0xc6,
+ 0x58, 0x03, 0xcb, 0x94, 0x9b, 0x91, 0xb3, 0x36, 0x19, 0x6b, 0x60, 0x99, 0xe1, 0xcb, 0x5b, 0xfa,
+ 0xba, 0x97, 0xb7, 0xd3, 0x04, 0x2c, 0xc9, 0xdc, 0x35, 0x0c, 0xbf, 0x5f, 0x85, 0xbc, 0x48, 0x63,
+ 0xa7, 0x05, 0x1d, 0x7f, 0xc4, 0x17, 0xb8, 0x56, 0x03, 0xe7, 0x04, 0xbb, 0x65, 0xa2, 0x75, 0x28,
+ 0x48, 0x68, 0xe4, 0xe3, 0x27, 0x10, 0xa4, 0x36, 0x33, 0xff, 0xeb, 0x90, 0xde, 0xb7, 0x6c, 0x22,
+ 0x17, 0x7a, 0x6c, 0x00, 0x98, 0x3a, 0x60, 0x6b, 0x0e, 0x73, 0x74, 0x2d, 0x17, 0x5c, 0xc6, 0x71,
+ 0xfb, 0x64, 0xd9, 0x19, 0xb5, 0x4f, 0x54, 0xa0, 0x33, 0xf6, 0x09, 0x1c, 0xb3, 0x4f, 0xb0, 0x85,
+ 0x7d, 0x12, 0x1a, 0xb5, 0x4f, 0x90, 0x7e, 0x2e, 0xf6, 0x6d, 0xc3, 0xcd, 0x9a, 0xad, 0x1b, 0x87,
+ 0xb6, 0xe5, 0xf9, 0xc4, 0x8c, 0x46, 0x8c, 0xc7, 0x90, 0xbd, 0x90, 0x74, 0x5e, 0x75, 0x6b, 0x29,
+ 0x91, 0xea, 0x7f, 0x24, 0xa0, 0xb8, 0x45, 0x74, 0xdb, 0x3f, 0x98, 0x5e, 0x0d, 0xf9, 0xc4, 0xf3,
+ 0xe5, 0x61, 0xc5, 0x7f, 0xa3, 0x6f, 0x40, 0x2e, 0xcc, 0x49, 0xae, 0x7d, 0x7f, 0x0b, 0xa1, 0xe8,
+ 0x09, 0xcc, 0xb3, 0x3d, 0x46, 0xc7, 0x41, 0xb1, 0x73, 0xd5, 0xd3, 0x8e, 0x44, 0xb2, 0x43, 0xc6,
+ 0x25, 0x3c, 0x09, 0xe1, 0x4b, 0x29, 0x83, 0x83, 0x26, 0xfa, 0x45, 0x28, 0xf2, 0x97, 0x89, 0x20,
+ 0xe7, 0xca, 0x5c, 0xa7, 0xb3, 0x20, 0x1e, 0x17, 0x45, 0xbe, 0xf5, 0xbf, 0x09, 0x58, 0xd9, 0xd1,
+ 0x27, 0x7b, 0x44, 0x86, 0x0d, 0x62, 0x62, 0x62, 0x50, 0xd7, 0x44, 0xdd, 0x68, 0xb8, 0xb9, 0xe2,
+ 0xad, 0x32, 0x4e, 0x38, 0x3e, 0xea, 0x04, 0x05, 0x58, 0x32, 0x52, 0x80, 0xad, 0x40, 0xc6, 0xa1,
+ 0x8e, 0x41, 0x64, 0x2c, 0x12, 0x0d, 0xd5, 0x8a, 0x86, 0x9a, 0x52, 0xf8, 0x8c, 0xc8, 0x1f, 0x01,
+ 0xdb, 0xd4, 0x0f, 0x7b, 0x43, 0x9f, 0x40, 0xa9, 0xd7, 0xac, 0xe3, 0x66, 0xbf, 0xd6, 0xf9, 0xae,
+ 0xd6, 0xab, 0x6e, 0xf7, 0xaa, 0x8f, 0x1f, 0x6a, 0xdd, 0xce, 0xf6, 0xf7, 0x1e, 0x3d, 0x79, 0xf8,
+ 0x0d, 0x25, 0x51, 0x2a, 0x9f, 0x9c, 0x96, 0x6f, 0xb7, 0xab, 0xf5, 0x6d, 0xb1, 0x63, 0xf6, 0xe8,
+ 0xcb, 0x9e, 0x6e, 0x7b, 0xfa, 0xe3, 0x87, 0x5d, 0x6a, 0x4f, 0x18, 0x86, 0x2d, 0xeb, 0x62, 0xf4,
+ 0xbc, 0x8a, 0x1e, 0xc3, 0x89, 0x4b, 0x8f, 0xe1, 0xe9, 0x69, 0x9e, 0xbc, 0xe4, 0x34, 0xdf, 0x80,
+ 0x15, 0xc3, 0xa5, 0x9e, 0xa7, 0xb1, 0xec, 0x9f, 0x98, 0x33, 0xf5, 0xc5, 0x97, 0xce, 0xcf, 0xd6,
+ 0x97, 0xeb, 0x8c, 0xdf, 0xe3, 0x6c, 0xa9, 0x7e, 0xd9, 0x88, 0x90, 0x78, 0x4f, 0xea, 0x1f, 0xa5,
+ 0x58, 0x22, 0x65, 0x1d, 0x59, 0x36, 0x19, 0x10, 0x0f, 0x3d, 0x87, 0x25, 0xc3, 0x25, 0x26, 0x4b,
+ 0xeb, 0x75, 0x3b, 0xfa, 0x11, 0xed, 0x2f, 0xc4, 0xe6, 0x34, 0xa1, 0x60, 0xa5, 0x1e, 0x4a, 0xf5,
+ 0x46, 0xc4, 0xc0, 0x8b, 0xc6, 0x85, 0x36, 0xfa, 0x14, 0x96, 0x3c, 0x62, 0x5b, 0xce, 0xf8, 0xa5,
+ 0x66, 0x50, 0xc7, 0x27, 0x2f, 0x83, 0x17, 0xb1, 0xeb, 0xf4, 0xf6, 0x9a, 0xdb, 0x4c, 0xaa, 0x2e,
+ 0x84, 0x6a, 0xe8, 0xfc, 0x6c, 0x7d, 0xf1, 0x22, 0x0d, 0x2f, 0x4a, 0xcd, 0xb2, 0x5d, 0x6a, 0xc3,
+ 0xe2, 0x45, 0x6b, 0xd0, 0x8a, 0xdc, 0xfb, 0x3c, 0x84, 0x04, 0x7b, 0x1b, 0xdd, 0x86, 0x9c, 0x4b,
+ 0x06, 0x96, 0xe7, 0xbb, 0xc2, 0xcd, 0x8c, 0x13, 0x52, 0xd8, 0xce, 0x17, 0x5f, 0x40, 0x95, 0x7e,
+ 0x1d, 0x66, 0x7a, 0x64, 0x9b, 0xc5, 0xb4, 0x3c, 0x7d, 0x4f, 0xaa, 0xcc, 0xe1, 0xa0, 0xc9, 0xd6,
+ 0xe0, 0xd8, 0x0b, 0x13, 0x35, 0xfe, 0x9b, 0xd1, 0x78, 0x46, 0x21, 0xbf, 0x07, 0xe3, 0x39, 0x43,
+ 0xf0, 0x61, 0x69, 0x3a, 0xf2, 0x61, 0xe9, 0x0a, 0x64, 0x6c, 0x72, 0x44, 0x6c, 0x71, 0x96, 0x63,
+ 0xd1, 0xb8, 0xf7, 0x10, 0x8a, 0xc1, 0x17, 0x8c, 0xfc, 0xcb, 0x89, 0x1c, 0xa4, 0xfb, 0xd5, 0xde,
+ 0x33, 0x65, 0x0e, 0x01, 0x64, 0xc5, 0xe2, 0x14, 0xaf, 0x75, 0xf5, 0x4e, 0x7b, 0xa3, 0xb5, 0xa9,
+ 0x24, 0xef, 0xfd, 0x2c, 0x05, 0xf9, 0xf0, 0xbd, 0x88, 0x9d, 0x1d, 0xed, 0xe6, 0x8b, 0x60, 0x75,
+ 0x87, 0xf4, 0x36, 0x39, 0x46, 0x6f, 0x4f, 0x6f, 0xa1, 0x3e, 0x11, 0x0f, 0xe4, 0x21, 0x3b, 0xb8,
+ 0x81, 0x7a, 0x17, 0x72, 0xd5, 0x5e, 0xaf, 0xb5, 0xd9, 0x6e, 0x36, 0x94, 0xcf, 0x12, 0xa5, 0x2f,
+ 0x9d, 0x9c, 0x96, 0x97, 0x43, 0x50, 0xd5, 0x13, 0x8b, 0x8f, 0xa3, 0xea, 0xf5, 0x66, 0xb7, 0xdf,
+ 0x6c, 0x28, 0xaf, 0x92, 0xb3, 0x28, 0x7e, 0xab, 0xc2, 0x3f, 0xdd, 0xc9, 0x77, 0x71, 0xb3, 0x5b,
+ 0xc5, 0xac, 0xc3, 0xcf, 0x92, 0xe2, 0x72, 0x6c, 0xda, 0xa3, 0x4b, 0x46, 0xba, 0xcb, 0xfa, 0x5c,
+ 0x0b, 0xbe, 0x85, 0x7b, 0x95, 0x12, 0x9f, 0x77, 0x4c, 0x1f, 0xbf, 0x88, 0x6e, 0x4e, 0x58, 0x6f,
+ 0xfc, 0xd5, 0x91, 0xab, 0x49, 0xcd, 0xf4, 0xd6, 0x63, 0xb1, 0x87, 0x69, 0x51, 0x61, 0x1e, 0xef,
+ 0xb6, 0xdb, 0x0c, 0xf4, 0x2a, 0x3d, 0x33, 0x3a, 0x3c, 0x76, 0x58, 0xc5, 0x8c, 0xee, 0x42, 0x2e,
+ 0x78, 0x94, 0x54, 0x3e, 0x4b, 0xcf, 0x18, 0x54, 0x0f, 0x5e, 0x54, 0x79, 0x87, 0x5b, 0xbb, 0x7d,
+ 0xfe, 0xa9, 0xde, 0xab, 0xcc, 0x6c, 0x87, 0x07, 0x63, 0xdf, 0xa4, 0xc7, 0x0e, 0xdb, 0xb3, 0xf2,
+ 0x1e, 0xee, 0xb3, 0x8c, 0xb8, 0xb4, 0x08, 0x31, 0xf2, 0x12, 0xee, 0x5d, 0xc8, 0xe1, 0xe6, 0x77,
+ 0xc4, 0x57, 0x7d, 0xaf, 0xb2, 0x33, 0x7a, 0x30, 0xf9, 0x94, 0x18, 0xb2, 0xb7, 0x0e, 0xee, 0x6e,
+ 0x55, 0xb9, 0xcb, 0x67, 0x51, 0x1d, 0x77, 0x74, 0xa0, 0x3b, 0xc4, 0x9c, 0x7e, 0xe3, 0x12, 0xb2,
+ 0xee, 0xfd, 0x0a, 0xe4, 0x82, 0xcc, 0x14, 0xad, 0x41, 0xf6, 0x45, 0x07, 0x3f, 0x6b, 0x62, 0x65,
+ 0x4e, 0xf8, 0x30, 0xe0, 0xbc, 0x10, 0x35, 0x45, 0x19, 0xe6, 0x77, 0xaa, 0xed, 0xea, 0x66, 0x13,
+ 0x07, 0x57, 0xe4, 0x01, 0x40, 0xa6, 0x57, 0x25, 0x45, 0x76, 0x10, 0xea, 0xac, 0xad, 0xfe, 0xf0,
+ 0x27, 0x6b, 0x73, 0x3f, 0xfe, 0xc9, 0xda, 0xdc, 0xab, 0xf3, 0xb5, 0xc4, 0x0f, 0xcf, 0xd7, 0x12,
+ 0xff, 0x70, 0xbe, 0x96, 0xf8, 0xf7, 0xf3, 0xb5, 0xc4, 0x5e, 0x96, 0x1f, 0x02, 0x4f, 0xfe, 0x2f,
+ 0x00, 0x00, 0xff, 0xff, 0x4b, 0xdb, 0xdc, 0xec, 0xf0, 0x31, 0x00, 0x00,
}
diff --git a/vendor/github.com/docker/swarmkit/api/types.proto b/vendor/github.com/docker/swarmkit/api/types.proto
index eaf037e77..890b3cfc3 100644
--- a/vendor/github.com/docker/swarmkit/api/types.proto
+++ b/vendor/github.com/docker/swarmkit/api/types.proto
@@ -214,6 +214,18 @@ message Mount {
// ReadOnly should be set to true if the mount should not be writable.
bool readonly = 4 [(gogoproto.customname) = "ReadOnly"];
+ // Consistency indicates the tolerable level of file system consistency
+ enum Consistency {
+ option (gogoproto.goproto_enum_prefix) = false;
+ option (gogoproto.enum_customname) = "MountConsistency";
+
+ DEFAULT = 0 [(gogoproto.enumvalue_customname) = "MountConsistencyDefault"];
+ CONSISTENT = 1 [(gogoproto.enumvalue_customname) = "MountConsistencyFull"];
+ CACHED = 2 [(gogoproto.enumvalue_customname) = "MountConsistencyCached"];
+ DELEGATED = 3 [(gogoproto.enumvalue_customname) = "MountConsistencyDelegated"];
+ }
+ Consistency consistency = 8;
+
// BindOptions specifies options that are specific to a bind mount.
message BindOptions {
enum Propagation {
diff --git a/vendor/github.com/docker/swarmkit/manager/allocator/allocator_test.go b/vendor/github.com/docker/swarmkit/manager/allocator/allocator_test.go
index adb24c598..bd77df297 100644
--- a/vendor/github.com/docker/swarmkit/manager/allocator/allocator_test.go
+++ b/vendor/github.com/docker/swarmkit/manager/allocator/allocator_test.go
@@ -666,6 +666,157 @@ func TestNoDuplicateIPs(t *testing.T) {
}
}
+func TestNodeAllocator(t *testing.T) {
+ s := store.NewMemoryStore(nil)
+ assert.NotNil(t, s)
+ defer s.Close()
+
+ a, err := New(s, nil)
+ assert.NoError(t, err)
+ assert.NotNil(t, a)
+
+ var node1FromStore *api.Node
+ node1 := &api.Node{
+ ID: "nodeID1",
+ }
+
+ // Try adding some objects to store before allocator is started
+ assert.NoError(t, s.Update(func(tx store.Tx) error {
+ // populate ingress network
+ in := &api.Network{
+ ID: "ingress",
+ Spec: api.NetworkSpec{
+ Annotations: api.Annotations{
+ Name: "ingress",
+ },
+ Ingress: true,
+ },
+ }
+ assert.NoError(t, store.CreateNetwork(tx, in))
+
+ n1 := &api.Network{
+ ID: "overlayID1",
+ Spec: api.NetworkSpec{
+ Annotations: api.Annotations{
+ Name: "overlayID1",
+ },
+ },
+ }
+ assert.NoError(t, store.CreateNetwork(tx, n1))
+
+ assert.NoError(t, store.CreateNode(tx, node1))
+ return nil
+ }))
+
+ nodeWatch, cancel := state.Watch(s.WatchQueue(), api.EventUpdateNode{}, api.EventDeleteNode{})
+ defer cancel()
+ netWatch, cancel := state.Watch(s.WatchQueue(), api.EventUpdateNetwork{}, api.EventDeleteNetwork{})
+ defer cancel()
+
+ // Start allocator
+ go func() {
+ assert.NoError(t, a.Run(context.Background()))
+ }()
+ defer a.Stop()
+
+ // Validate node has 2 LB IP address (1 for each network).
+ watchNetwork(t, netWatch, false, isValidNetwork) // ingress
+ watchNetwork(t, netWatch, false, isValidNetwork) // overlayID1
+ watchNode(t, nodeWatch, false, isValidNode, node1, []string{"ingress", "overlayID1"}) // node1
+
+ // Add a node and validate it gets a LB ip on each network.
+ node2 := &api.Node{
+ ID: "nodeID2",
+ }
+ assert.NoError(t, s.Update(func(tx store.Tx) error {
+ assert.NoError(t, store.CreateNode(tx, node2))
+ return nil
+ }))
+ watchNode(t, nodeWatch, false, isValidNode, node2, []string{"ingress", "overlayID1"}) // node2
+
+ // Add a network and validate each node has 3 LB IP addresses
+ n2 := &api.Network{
+ ID: "overlayID2",
+ Spec: api.NetworkSpec{
+ Annotations: api.Annotations{
+ Name: "overlayID2",
+ },
+ },
+ }
+ assert.NoError(t, s.Update(func(tx store.Tx) error {
+ assert.NoError(t, store.CreateNetwork(tx, n2))
+ return nil
+ }))
+ watchNetwork(t, netWatch, false, isValidNetwork) // overlayID2
+ watchNode(t, nodeWatch, false, isValidNode, node1, []string{"ingress", "overlayID1", "overlayID3"}) // node1
+ watchNode(t, nodeWatch, false, isValidNode, node2, []string{"ingress", "overlayID1", "overlayID3"}) // node2
+
+ // Remove a network and validate each node has 2 LB IP addresses
+ assert.NoError(t, s.Update(func(tx store.Tx) error {
+ assert.NoError(t, store.DeleteNetwork(tx, n2.ID))
+ return nil
+ }))
+ watchNetwork(t, netWatch, false, isValidNetwork) // overlayID2
+ watchNode(t, nodeWatch, false, isValidNode, node1, []string{"ingress", "overlayID1"}) // node1
+ watchNode(t, nodeWatch, false, isValidNode, node2, []string{"ingress", "overlayID1"}) // node2
+
+ // Remove a node and validate remaining node has 2 LB IP addresses
+ assert.NoError(t, s.Update(func(tx store.Tx) error {
+ assert.NoError(t, store.DeleteNode(tx, node2.ID))
+ return nil
+ }))
+ watchNode(t, nodeWatch, false, nil, nil, nil) // node2
+ s.View(func(tx store.ReadTx) {
+ node1FromStore = store.GetNode(tx, node1.ID)
+ })
+
+ isValidNode(t, node1, node1FromStore, []string{"ingress", "overlayID1"})
+
+ // Validate that a LB IP address is not allocated for node-local networks
+ p := &api.Network{
+ ID: "bridge",
+ Spec: api.NetworkSpec{
+ Annotations: api.Annotations{
+ Name: "pred_bridge_network",
+ Labels: map[string]string{
+ "com.docker.swarm.predefined": "true",
+ },
+ },
+ DriverConfig: &api.Driver{Name: "bridge"},
+ },
+ }
+ assert.NoError(t, s.Update(func(tx store.Tx) error {
+ assert.NoError(t, store.CreateNetwork(tx, p))
+ return nil
+ }))
+ watchNetwork(t, netWatch, false, isValidNetwork) // bridge
+
+ s.View(func(tx store.ReadTx) {
+ node1FromStore = store.GetNode(tx, node1.ID)
+ })
+
+ isValidNode(t, node1, node1FromStore, []string{"ingress", "overlayID1"})
+}
+
+func isValidNode(t assert.TestingT, originalNode, updatedNode *api.Node, networks []string) bool {
+
+ if !assert.Equal(t, originalNode.ID, updatedNode.ID) {
+ return false
+ }
+
+ if !assert.Equal(t, len(updatedNode.LbAttachments), len(networks)) {
+ return false
+ }
+
+ for _, na := range updatedNode.LbAttachments {
+ if !assert.Equal(t, len(na.Addresses), 1) {
+ return false
+ }
+ }
+
+ return true
+}
+
func isValidNetwork(t assert.TestingT, n *api.Network) bool {
if _, ok := n.Spec.Annotations.Labels["com.docker.swarm.predefined"]; ok {
return true
@@ -734,6 +885,43 @@ func getWatchTimeout(expectTimeout bool) time.Duration {
return 5 * time.Second
}
+func watchNode(t *testing.T, watch chan events.Event, expectTimeout bool,
+ fn func(t assert.TestingT, originalNode, updatedNode *api.Node, networks []string) bool,
+ originalNode *api.Node,
+ networks []string) {
+ for {
+
+ var node *api.Node
+ select {
+ case event := <-watch:
+ if n, ok := event.(api.EventUpdateNode); ok {
+ node = n.Node.Copy()
+ if fn == nil || (fn != nil && fn(mockTester{}, originalNode, node, networks)) {
+ return
+ }
+ }
+
+ if n, ok := event.(api.EventDeleteNode); ok {
+ node = n.Node.Copy()
+ if fn == nil || (fn != nil && fn(mockTester{}, originalNode, node, networks)) {
+ return
+ }
+ }
+
+ case <-time.After(1 * time.Millisecond):
+ if !expectTimeout {
+ if node != nil && fn != nil {
+ fn(t, originalNode, node, networks)
+ }
+
+ t.Fatal("timed out before watchNode found expected node state")
+ }
+
+ return
+ }
+ }
+}
+
func watchNetwork(t *testing.T, watch chan events.Event, expectTimeout bool, fn func(t assert.TestingT, n *api.Network) bool) {
for {
var network *api.Network
diff --git a/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go b/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go
index 2cfc95130..3b31d0781 100644
--- a/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go
+++ b/vendor/github.com/docker/swarmkit/manager/allocator/cnmallocator/networkallocator.go
@@ -48,8 +48,10 @@ type cnmNetworkAllocator struct {
tasks map[string]struct{}
// Allocator state to indicate if allocation has been
- // successfully completed for this node.
- nodes map[string]struct{}
+ // successfully completed for this node on this network.
+ // outer map key: node id
+ // inner map key: network id
+ nodes map[string]map[string]struct{}
}
// Local in-memory state related to network that need to be tracked by cnmNetworkAllocator
@@ -89,7 +91,7 @@ func New(pg plugingetter.PluginGetter) (networkallocator.NetworkAllocator, error
networks: make(map[string]*network),
services: make(map[string]struct{}),
tasks: make(map[string]struct{}),
- nodes: make(map[string]struct{}),
+ nodes: make(map[string]map[string]struct{}),
}
// There are no driver configurations and notification
@@ -430,56 +432,6 @@ func (na *cnmNetworkAllocator) IsServiceAllocated(s *api.Service, flags ...func(
return true
}
-// IsNodeAllocated returns if the passed node has its network resources allocated or not.
-func (na *cnmNetworkAllocator) IsNodeAllocated(node *api.Node) bool {
- // If the node is not found in the allocated set, then it is
- // not allocated.
- if _, ok := na.nodes[node.ID]; !ok {
- return false
- }
-
- // If no attachment, not allocated.
- if node.Attachment == nil {
- return false
- }
-
- // If the network is not allocated, the node cannot be allocated.
- localNet, ok := na.networks[node.Attachment.Network.ID]
- if !ok {
- return false
- }
-
- // Addresses empty, not allocated.
- if len(node.Attachment.Addresses) == 0 {
- return false
- }
-
- // The allocated IP address not found in local endpoint state. Not allocated.
- if _, ok := localNet.endpoints[node.Attachment.Addresses[0]]; !ok {
- return false
- }
-
- return true
-}
-
-// AllocateNode allocates the IP addresses for the network to which
-// the node is attached.
-func (na *cnmNetworkAllocator) AllocateNode(node *api.Node) error {
- if err := na.allocateNetworkIPs(node.Attachment); err != nil {
- return err
- }
-
- na.nodes[node.ID] = struct{}{}
- return nil
-}
-
-// DeallocateNode deallocates the IP addresses for the network to
-// which the node is attached.
-func (na *cnmNetworkAllocator) DeallocateNode(node *api.Node) error {
- delete(na.nodes, node.ID)
- return na.releaseEndpoints([]*api.NetworkAttachment{node.Attachment})
-}
-
// AllocateTask allocates all the endpoint resources for all the
// networks that a task is attached to.
func (na *cnmNetworkAllocator) AllocateTask(t *api.Task) error {
@@ -489,7 +441,7 @@ func (na *cnmNetworkAllocator) AllocateTask(t *api.Task) error {
}
if err := na.allocateNetworkIPs(nAttach); err != nil {
if err := na.releaseEndpoints(t.Networks[:i]); err != nil {
- log.G(context.TODO()).WithError(err).Errorf("Failed to release IP addresses while rolling back allocation for task %s network %s", t.ID, nAttach.Network.ID)
+ log.G(context.TODO()).WithError(err).Errorf("failed to release IP addresses while rolling back allocation for task %s network %s", t.ID, nAttach.Network.ID)
}
return errors.Wrapf(err, "failed to allocate network IP for task %s network %s", t.ID, nAttach.Network.ID)
}
@@ -507,6 +459,75 @@ func (na *cnmNetworkAllocator) DeallocateTask(t *api.Task) error {
return na.releaseEndpoints(t.Networks)
}
+// IsLBAttachmentAllocated returns if the passed node and network has resources allocated or not.
+func (na *cnmNetworkAllocator) IsLBAttachmentAllocated(node *api.Node, networkAttachment *api.NetworkAttachment) bool {
+ if node == nil {
+ return false
+ }
+
+ if networkAttachment == nil {
+ return false
+ }
+
+ // If the node is not found in the allocated set, then it is
+ // not allocated.
+ if _, ok := na.nodes[node.ID]; !ok {
+ return false
+ }
+
+ // If the nework is not found in the allocated set, then it is
+ // not allocated.
+ if _, ok := na.nodes[node.ID][networkAttachment.Network.ID]; !ok {
+ return false
+ }
+
+ // If the network is not allocated, the node cannot be allocated.
+ localNet, ok := na.networks[networkAttachment.Network.ID]
+ if !ok {
+ return false
+ }
+
+ // Addresses empty, not allocated.
+ if len(networkAttachment.Addresses) == 0 {
+ return false
+ }
+
+ // The allocated IP address not found in local endpoint state. Not allocated.
+ if _, ok := localNet.endpoints[networkAttachment.Addresses[0]]; !ok {
+ return false
+ }
+
+ return true
+}
+
+// AllocateLBAttachment allocates the IP addresses for a LB in a network
+// on a given node
+func (na *cnmNetworkAllocator) AllocateLBAttachment(node *api.Node, networkAttachment *api.NetworkAttachment) error {
+
+ if err := na.allocateNetworkIPs(networkAttachment); err != nil {
+ return err
+ }
+
+ if na.nodes[node.ID] == nil {
+ na.nodes[node.ID] = make(map[string]struct{})
+ }
+ na.nodes[node.ID][networkAttachment.Network.ID] = struct{}{}
+
+ return nil
+}
+
+// DeallocateLBAttachment deallocates the IP addresses for a LB in a network to
+// which the node is attached.
+func (na *cnmNetworkAllocator) DeallocateLBAttachment(node *api.Node, networkAttachment *api.NetworkAttachment) error {
+
+ delete(na.nodes[node.ID], networkAttachment.Network.ID)
+ if len(na.nodes[node.ID]) == 0 {
+ delete(na.nodes, node.ID)
+ }
+
+ return na.releaseEndpoints([]*api.NetworkAttachment{networkAttachment})
+}
+
func (na *cnmNetworkAllocator) releaseEndpoints(networks []*api.NetworkAttachment) error {
for _, nAttach := range networks {
localNet := na.getNetwork(nAttach.Network.ID)
diff --git a/vendor/github.com/docker/swarmkit/manager/allocator/network.go b/vendor/github.com/docker/swarmkit/manager/allocator/network.go
index c760ad53d..794e616c1 100644
--- a/vendor/github.com/docker/swarmkit/manager/allocator/network.go
+++ b/vendor/github.com/docker/swarmkit/manager/allocator/network.go
@@ -154,11 +154,10 @@ func (a *Allocator) doNetworkInit(ctx context.Context) (err error) {
// First, allocate objects that already have addresses associated with
// them, to reserve these IP addresses in internal state.
- if nc.ingressNetwork != nil {
- if err := a.allocateNodes(ctx, true); err != nil {
- return err
- }
+ if err := a.allocateNodes(ctx, true); err != nil {
+ return err
}
+
if err := a.allocateServices(ctx, true); err != nil {
return err
}
@@ -166,12 +165,10 @@ func (a *Allocator) doNetworkInit(ctx context.Context) (err error) {
return err
}
- // Now allocate objects that don't have addresses yet.
- if nc.ingressNetwork != nil {
- if err := a.allocateNodes(ctx, false); err != nil {
- return err
- }
+ if err := a.allocateNodes(ctx, false); err != nil {
+ return err
}
+
if err := a.allocateServices(ctx, false); err != nil {
return err
}
@@ -208,22 +205,22 @@ func (a *Allocator) doNetworkAlloc(ctx context.Context, ev events.Event) {
}); err != nil {
log.G(ctx).WithError(err).Errorf("Failed to commit allocation for network %s", n.ID)
}
-
if IsIngressNetwork(n) {
nc.ingressNetwork = n
- err := a.allocateNodes(ctx, false)
- if err != nil {
- log.G(ctx).WithError(err).Error(err)
- }
+ }
+ err := a.allocateNodes(ctx, false)
+ if err != nil {
+ log.G(ctx).WithError(err).Error(err)
}
case api.EventDeleteNetwork:
n := v.Network.Copy()
if IsIngressNetwork(n) && nc.ingressNetwork != nil && nc.ingressNetwork.ID == n.ID {
nc.ingressNetwork = nil
- if err := a.deallocateNodes(ctx); err != nil {
- log.G(ctx).WithError(err).Error(err)
- }
+ }
+
+ if err := a.deallocateNodeAttachments(ctx, n.ID); err != nil {
+ log.G(ctx).WithError(err).Error(err)
}
// The assumption here is that all dependent objects
@@ -361,33 +358,67 @@ func (a *Allocator) doNodeAlloc(ctx context.Context, ev events.Event) {
nc := a.netCtx
if isDelete {
- if nc.nwkAllocator.IsNodeAllocated(node) {
- if err := nc.nwkAllocator.DeallocateNode(node); err != nil {
- log.G(ctx).WithError(err).Errorf("Failed freeing network resources for node %s", node.ID)
- } else {
- nc.somethingWasDeallocated = true
+ if err := a.deallocateNode(node); err != nil {
+ log.G(ctx).WithError(err).Errorf("Failed freeing network resources for node %s", node.ID)
+ } else {
+ nc.somethingWasDeallocated = true
+ }
+ } else {
+ allocatedNetworks, err := a.getAllocatedNetworks()
+ if err != nil {
+ log.G(ctx).WithError(err).Errorf("Error listing allocated networks in network %s", node.ID)
+ }
+
+ isAllocated := a.allocateNode(ctx, node, false, allocatedNetworks)
+
+ if isAllocated {
+ if err := a.store.Batch(func(batch *store.Batch) error {
+ return a.commitAllocatedNode(ctx, batch, node)
+ }); err != nil {
+ log.G(ctx).WithError(err).Errorf("Failed to commit allocation of network resources for node %s", node.ID)
}
}
- return
+ }
+}
+
+func isOverlayNetwork(n *api.Network) bool {
+ if n.DriverState != nil && n.DriverState.Name == "overlay" {
+ return true
}
- if !nc.nwkAllocator.IsNodeAllocated(node) && nc.ingressNetwork != nil {
- if node.Attachment == nil {
- node.Attachment = &api.NetworkAttachment{}
- }
+ if n.Spec.DriverConfig != nil && n.Spec.DriverConfig.Name == "overlay" {
+ return true
+ }
- node.Attachment.Network = nc.ingressNetwork.Copy()
- if err := a.allocateNode(ctx, node); err != nil {
- log.G(ctx).WithError(err).Errorf("Failed to allocate network resources for node %s", node.ID)
- return
- }
+ return false
+}
- if err := a.store.Batch(func(batch *store.Batch) error {
- return a.commitAllocatedNode(ctx, batch, node)
- }); err != nil {
- log.G(ctx).WithError(err).Errorf("Failed to commit allocation of network resources for node %s", node.ID)
+func (a *Allocator) getAllocatedNetworks() ([]*api.Network, error) {
+ var (
+ err error
+ nc = a.netCtx
+ na = nc.nwkAllocator
+ allocatedNetworks []*api.Network
+ )
+
+ // Find allocated networks
+ var networks []*api.Network
+ a.store.View(func(tx store.ReadTx) {
+ networks, err = store.FindNetworks(tx, store.All)
+ })
+
+ if err != nil {
+ return nil, errors.Wrap(err, "error listing all networks in store while trying to allocate during init")
+ }
+
+ for _, n := range networks {
+
+ if isOverlayNetwork(n) && na.IsAllocated(n) {
+ allocatedNetworks = append(allocatedNetworks, n)
}
}
+
+ return allocatedNetworks, nil
}
func (a *Allocator) allocateNodes(ctx context.Context, existingAddressesOnly bool) error {
@@ -396,7 +427,6 @@ func (a *Allocator) allocateNodes(ctx context.Context, existingAddressesOnly boo
allocatedNodes []*api.Node
nodes []*api.Node
err error
- nc = a.netCtx
)
a.store.View(func(tx store.ReadTx) {
@@ -406,26 +436,16 @@ func (a *Allocator) allocateNodes(ctx context.Context, existingAddressesOnly boo
return errors.Wrap(err, "error listing all nodes in store while trying to allocate network resources")
}
+ allocatedNetworks, err := a.getAllocatedNetworks()
+ if err != nil {
+ return errors.Wrap(err, "error listing all nodes in store while trying to allocate network resources")
+ }
+
for _, node := range nodes {
- if nc.nwkAllocator.IsNodeAllocated(node) {
- continue
+ isAllocated := a.allocateNode(ctx, node, existingAddressesOnly, allocatedNetworks)
+ if isAllocated {
+ allocatedNodes = append(allocatedNodes, node)
}
-
- if node.Attachment == nil {
- node.Attachment = &api.NetworkAttachment{}
- }
-
- if existingAddressesOnly && len(node.Attachment.Addresses) == 0 {
- continue
- }
-
- node.Attachment.Network = nc.ingressNetwork.Copy()
- if err := a.allocateNode(ctx, node); err != nil {
- log.G(ctx).WithError(err).Errorf("Failed to allocate network resources for node %s", node.ID)
- continue
- }
-
- allocatedNodes = append(allocatedNodes, node)
}
if err := a.store.Batch(func(batch *store.Batch) error {
@@ -457,21 +477,90 @@ func (a *Allocator) deallocateNodes(ctx context.Context) error {
}
for _, node := range nodes {
- if nc.nwkAllocator.IsNodeAllocated(node) {
- if err := nc.nwkAllocator.DeallocateNode(node); err != nil {
- log.G(ctx).WithError(err).Errorf("Failed freeing network resources for node %s", node.ID)
- } else {
- nc.somethingWasDeallocated = true
+ if err := a.deallocateNode(node); err != nil {
+ log.G(ctx).WithError(err).Errorf("Failed freeing network resources for node %s", node.ID)
+ } else {
+ nc.somethingWasDeallocated = true
+ }
+ if err := a.store.Batch(func(batch *store.Batch) error {
+ return a.commitAllocatedNode(ctx, batch, node)
+ }); err != nil {
+ log.G(ctx).WithError(err).Errorf("Failed to commit deallocation of network resources for node %s", node.ID)
+ }
+ }
+
+ return nil
+}
+
+func (a *Allocator) deallocateNodeAttachments(ctx context.Context, nid string) error {
+ var (
+ nodes []*api.Node
+ nc = a.netCtx
+ err error
+ )
+
+ a.store.View(func(tx store.ReadTx) {
+ nodes, err = store.FindNodes(tx, store.All)
+ })
+ if err != nil {
+ return fmt.Errorf("error listing all nodes in store while trying to free network resources")
+ }
+
+ for _, node := range nodes {
+
+ var networkAttachment *api.NetworkAttachment
+ var naIndex int
+ for index, na := range node.LbAttachments {
+ if na.Network.ID == nid {
+ networkAttachment = na
+ naIndex = index
+ break
}
- node.Attachment = nil
- if err := a.store.Batch(func(batch *store.Batch) error {
- return a.commitAllocatedNode(ctx, batch, node)
- }); err != nil {
+ }
+
+ if networkAttachment == nil {
+ log.G(ctx).Errorf("Failed to find network %s on node %s", nid, node.ID)
+ continue
+ }
+
+ if nc.nwkAllocator.IsLBAttachmentAllocated(node, networkAttachment) {
+ if err := nc.nwkAllocator.DeallocateLBAttachment(node, networkAttachment); err != nil {
log.G(ctx).WithError(err).Errorf("Failed to commit deallocation of network resources for node %s", node.ID)
+ } else {
+
+ // Delete the lbattachment
+ node.LbAttachments[naIndex] = node.LbAttachments[len(node.LbAttachments)-1]
+ node.LbAttachments[len(node.LbAttachments)-1] = nil
+ node.LbAttachments = node.LbAttachments[:len(node.LbAttachments)-1]
+
+ if err := a.store.Batch(func(batch *store.Batch) error {
+ return a.commitAllocatedNode(ctx, batch, node)
+ }); err != nil {
+ log.G(ctx).WithError(err).Errorf("Failed to commit deallocation of network resources for node %s", node.ID)
+ }
+
+ }
+ }
+
+ }
+ return nil
+}
+
+func (a *Allocator) deallocateNode(node *api.Node) error {
+ var (
+ nc = a.netCtx
+ )
+
+ for _, na := range node.LbAttachments {
+ if nc.nwkAllocator.IsLBAttachmentAllocated(node, na) {
+ if err := nc.nwkAllocator.DeallocateLBAttachment(node, na); err != nil {
+ return err
}
}
}
+ node.LbAttachments = nil
+
return nil
}
@@ -758,8 +847,48 @@ func (a *Allocator) doTaskAlloc(ctx context.Context, ev events.Event) {
nc.pendingTasks[t.ID] = t
}
-func (a *Allocator) allocateNode(ctx context.Context, node *api.Node) error {
- return a.netCtx.nwkAllocator.AllocateNode(node)
+func (a *Allocator) allocateNode(ctx context.Context, node *api.Node, existingAddressesOnly bool, networks []*api.Network) bool {
+ var allocated bool
+
+ nc := a.netCtx
+
+ for _, network := range networks {
+
+ var lbAttachment *api.NetworkAttachment
+ for _, na := range node.LbAttachments {
+ if na.Network != nil && na.Network.ID == network.ID {
+ lbAttachment = na
+ break
+ }
+ }
+
+ if lbAttachment != nil {
+ if nc.nwkAllocator.IsLBAttachmentAllocated(node, lbAttachment) {
+ continue
+ }
+ }
+
+ if lbAttachment == nil {
+ lbAttachment = &api.NetworkAttachment{}
+ node.LbAttachments = append(node.LbAttachments, lbAttachment)
+ }
+
+ if existingAddressesOnly && len(lbAttachment.Addresses) == 0 {
+ continue
+ }
+
+ lbAttachment.Network = network.Copy()
+ if err := a.netCtx.nwkAllocator.AllocateLBAttachment(node, lbAttachment); err != nil {
+ log.G(ctx).WithError(err).Errorf("Failed to allocate network resources for node %s", node.ID)
+ // TODO: Should we add a unallocatedNode and retry allocating resources like we do for network, tasks, services?
+ // right now, we will only retry allocating network resources for the node when the node is updated.
+ continue
+ }
+
+ allocated = true
+ }
+ return allocated
+
}
func (a *Allocator) commitAllocatedNode(ctx context.Context, batch *store.Batch, node *api.Node) error {
@@ -768,13 +897,13 @@ func (a *Allocator) commitAllocatedNode(ctx context.Context, batch *store.Batch,
if err == store.ErrSequenceConflict {
storeNode := store.GetNode(tx, node.ID)
- storeNode.Attachment = node.Attachment.Copy()
+ storeNode.LbAttachments = node.LbAttachments
err = store.UpdateNode(tx, storeNode)
}
return errors.Wrapf(err, "failed updating state in store transaction for node %s", node.ID)
}); err != nil {
- if err := a.netCtx.nwkAllocator.DeallocateNode(node); err != nil {
+ if err := a.deallocateNode(node); err != nil {
log.G(ctx).WithError(err).Errorf("failed rolling back allocation of node %s", node.ID)
}
diff --git a/vendor/github.com/docker/swarmkit/manager/allocator/networkallocator/networkallocator.go b/vendor/github.com/docker/swarmkit/manager/allocator/networkallocator/networkallocator.go
index 04dd16812..5fc5801d4 100644
--- a/vendor/github.com/docker/swarmkit/manager/allocator/networkallocator/networkallocator.go
+++ b/vendor/github.com/docker/swarmkit/manager/allocator/networkallocator/networkallocator.go
@@ -65,22 +65,6 @@ type NetworkAllocator interface {
// allocations for its published ports in host (non ingress) mode
HostPublishPortsNeedUpdate(s *api.Service) bool
- //
- // Node Allocation
- //
-
- // IsNodeAllocated returns if the passed node has its network
- // resources allocated or not.
- IsNodeAllocated(node *api.Node) bool
-
- // AllocateNode allocates the IP addresses for the network to which
- // the node is attached.
- AllocateNode(node *api.Node) error
-
- // DeallocateNode deallocates the IP addresses for the network to
- // which the node is attached.
- DeallocateNode(node *api.Node) error
-
//
// Task Allocation
//
@@ -96,6 +80,15 @@ type NetworkAllocator interface {
// DeallocateTask releases all the endpoint resources for all the
// networks that a task is attached to.
DeallocateTask(t *api.Task) error
+
+ // AllocateLBAttachment Allocates a load balancer endpoint for the node
+ AllocateLBAttachment(node *api.Node, networkAttachment *api.NetworkAttachment) error
+
+ // DeallocateLBAttachment Deallocates a load balancer endpoint for the node
+ DeallocateLBAttachment(node *api.Node, networkAttachment *api.NetworkAttachment) error
+
+ //IsLBAttachmentAllocated If lb endpoint is allocated on the node
+ IsLBAttachmentAllocated(node *api.Node, networkAttachment *api.NetworkAttachment) bool
}
// IsIngressNetwork check if the network is an ingress network
diff --git a/vendor/github.com/funcy/functions_go/.gitignore b/vendor/github.com/funcy/functions_go/.gitignore
deleted file mode 100644
index 4ee67201f..000000000
--- a/vendor/github.com/funcy/functions_go/.gitignore
+++ /dev/null
@@ -1,25 +0,0 @@
-# Compiled Object files, Static and Dynamic libs (Shared Objects)
-*.o
-*.a
-*.so
-
-# Folders
-_obj
-_test
-
-# Architecture specific extensions/prefixes
-*.[568vq]
-[568vq].out
-
-*.cgo1.go
-*.cgo2.c
-_cgo_defun.c
-_cgo_gotypes.go
-_cgo_export.*
-
-_testmain.go
-
-*.exe
-*.test
-*.prof
-vendor/
\ No newline at end of file
diff --git a/vendor/github.com/funcy/functions_go/.swagger-codegen-ignore b/vendor/github.com/funcy/functions_go/.swagger-codegen-ignore
deleted file mode 100644
index c5fa491b4..000000000
--- a/vendor/github.com/funcy/functions_go/.swagger-codegen-ignore
+++ /dev/null
@@ -1,23 +0,0 @@
-# Swagger Codegen Ignore
-# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
-
-# Use this file to prevent files from being overwritten by the generator.
-# The patterns follow closely to .gitignore or .dockerignore.
-
-# As an example, the C# client generator defines ApiClient.cs.
-# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
-#ApiClient.cs
-
-# You can match any string of characters against a directory, file or extension with a single asterisk (*):
-#foo/*/qux
-# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
-
-# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
-#foo/**/qux
-# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
-
-# You can also negate patterns with an exclamation (!).
-# For example, you can ignore all files in a docs folder with the file extension .md:
-#docs/*.md
-# Then explicitly reverse the ignore rule for a single file:
-#!docs/README.md
diff --git a/vendor/github.com/funcy/functions_go/.travis.yml b/vendor/github.com/funcy/functions_go/.travis.yml
deleted file mode 100644
index f5cb2ce9a..000000000
--- a/vendor/github.com/funcy/functions_go/.travis.yml
+++ /dev/null
@@ -1,8 +0,0 @@
-language: go
-
-install:
- - go get -d -v .
-
-script:
- - go build -v ./
-
diff --git a/vendor/github.com/funcy/functions_go/LICENSE b/vendor/github.com/funcy/functions_go/LICENSE
deleted file mode 100644
index 8dada3eda..000000000
--- a/vendor/github.com/funcy/functions_go/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
- 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/vendor/github.com/funcy/functions_go/README.md b/vendor/github.com/funcy/functions_go/README.md
deleted file mode 100644
index c02fb6f21..000000000
--- a/vendor/github.com/funcy/functions_go/README.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# Go API client for functions
-
-The open source serverless platform.
-
-## Overview
-This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client.
-
-- API version: 0.1.28
-- Package version: 0.1.28
-- Build package: class io.swagger.codegen.languages.GoClientCodegen
-
-## Installation
-Put the package under your project folder and add the following in import:
-```
- "./functions"
-```
-
-## Documentation for API Endpoints
-
-All URIs are relative to *https://127.0.0.1:8080/v1*
-
-Class | Method | HTTP request | Description
------------- | ------------- | ------------- | -------------
-*AppsApi* | [**AppsAppDelete**](docs/AppsApi.md#appsappdelete) | **Delete** /apps/{app} | Delete an app.
-*AppsApi* | [**AppsAppGet**](docs/AppsApi.md#appsappget) | **Get** /apps/{app} | Get information for a app.
-*AppsApi* | [**AppsAppPatch**](docs/AppsApi.md#appsapppatch) | **Patch** /apps/{app} | Updates an app.
-*AppsApi* | [**AppsGet**](docs/AppsApi.md#appsget) | **Get** /apps | Get all app names.
-*AppsApi* | [**AppsPost**](docs/AppsApi.md#appspost) | **Post** /apps | Post new app
-*RoutesApi* | [**AppsAppRoutesGet**](docs/RoutesApi.md#appsapproutesget) | **Get** /apps/{app}/routes | Get route list by app name.
-*RoutesApi* | [**AppsAppRoutesPost**](docs/RoutesApi.md#appsapproutespost) | **Post** /apps/{app}/routes | Create new Route
-*RoutesApi* | [**AppsAppRoutesRouteDelete**](docs/RoutesApi.md#appsapproutesroutedelete) | **Delete** /apps/{app}/routes/{route} | Deletes the route
-*RoutesApi* | [**AppsAppRoutesRouteGet**](docs/RoutesApi.md#appsapproutesrouteget) | **Get** /apps/{app}/routes/{route} | Gets route by name
-*RoutesApi* | [**AppsAppRoutesRoutePatch**](docs/RoutesApi.md#appsapproutesroutepatch) | **Patch** /apps/{app}/routes/{route} | Update a Route
-*TasksApi* | [**TasksGet**](docs/TasksApi.md#tasksget) | **Get** /tasks | Get next task.
-*VersionApi* | [**VersionGet**](docs/VersionApi.md#versionget) | **Get** /version | Get daemon version.
-
-
-## Documentation For Models
-
- - [App](docs/App.md)
- - [AppWrapper](docs/AppWrapper.md)
- - [AppsWrapper](docs/AppsWrapper.md)
- - [ErrorBody](docs/ErrorBody.md)
- - [ModelError](docs/ModelError.md)
- - [NewTask](docs/NewTask.md)
- - [Route](docs/Route.md)
- - [RouteWrapper](docs/RouteWrapper.md)
- - [RoutesWrapper](docs/RoutesWrapper.md)
- - [Task](docs/Task.md)
- - [TaskWrapper](docs/TaskWrapper.md)
- - [Version](docs/Version.md)
-
-
-## Documentation For Authorization
-
- All endpoints do not require authorization.
-
-
-## Author
-
-
-
diff --git a/vendor/github.com/funcy/functions_go/VERSION b/vendor/github.com/funcy/functions_go/VERSION
deleted file mode 100644
index f37372d37..000000000
--- a/vendor/github.com/funcy/functions_go/VERSION
+++ /dev/null
@@ -1 +0,0 @@
-0.1.37
\ No newline at end of file
diff --git a/vendor/github.com/funcy/functions_go/api_client.go b/vendor/github.com/funcy/functions_go/api_client.go
deleted file mode 100644
index 60ebf6ca0..000000000
--- a/vendor/github.com/funcy/functions_go/api_client.go
+++ /dev/null
@@ -1,151 +0,0 @@
-package functions
-
-import (
- "bytes"
- "fmt"
- "path/filepath"
- "reflect"
- "strings"
- "net/url"
- "io/ioutil"
- "github.com/go-resty/resty"
-)
-
-type APIClient struct {
- config *Configuration
-}
-
-func (c *APIClient) SelectHeaderContentType(contentTypes []string) string {
-
- if len(contentTypes) == 0 {
- return ""
- }
- if contains(contentTypes, "application/json") {
- return "application/json"
- }
- return contentTypes[0] // use the first content type specified in 'consumes'
-}
-
-func (c *APIClient) SelectHeaderAccept(accepts []string) string {
-
- if len(accepts) == 0 {
- return ""
- }
- if contains(accepts, "application/json") {
- return "application/json"
- }
- return strings.Join(accepts, ",")
-}
-
-func contains(haystack []string, needle string) bool {
- for _, a := range haystack {
- if strings.ToLower(a) == strings.ToLower(needle) {
- return true
- }
- }
- return false
-}
-
-func (c *APIClient) CallAPI(path string, method string,
- postBody interface{},
- headerParams map[string]string,
- queryParams url.Values,
- formParams map[string]string,
- fileName string,
- fileBytes []byte) (*resty.Response, error) {
-
- rClient := c.prepareClient()
- request := c.prepareRequest(rClient, postBody, headerParams, queryParams, formParams, fileName, fileBytes)
-
- switch strings.ToUpper(method) {
- case "GET":
- response, err := request.Get(path)
- return response, err
- case "POST":
- response, err := request.Post(path)
- return response, err
- case "PUT":
- response, err := request.Put(path)
- return response, err
- case "PATCH":
- response, err := request.Patch(path)
- return response, err
- case "DELETE":
- response, err := request.Delete(path)
- return response, err
- }
-
- return nil, fmt.Errorf("invalid method %v", method)
-}
-
-func (c *APIClient) ParameterToString(obj interface{},collectionFormat string) string {
- if reflect.TypeOf(obj).String() == "[]string" {
- switch collectionFormat {
- case "pipes":
- return strings.Join(obj.([]string), "|")
- case "ssv":
- return strings.Join(obj.([]string), " ")
- case "tsv":
- return strings.Join(obj.([]string), "\t")
- case "csv" :
- return strings.Join(obj.([]string), ",")
- }
- }
-
- return fmt.Sprintf("%v", obj)
-}
-
-func (c *APIClient) prepareClient() *resty.Client {
-
- rClient := resty.New()
-
- rClient.SetDebug(c.config.Debug)
- if c.config.Transport != nil {
- rClient.SetTransport(c.config.Transport)
- }
-
- if c.config.Timeout != nil {
- rClient.SetTimeout(*c.config.Timeout)
- }
- rClient.SetLogger(ioutil.Discard)
- return rClient
-}
-
-func (c *APIClient) prepareRequest(
- rClient *resty.Client,
- postBody interface{},
- headerParams map[string]string,
- queryParams url.Values,
- formParams map[string]string,
- fileName string,
- fileBytes []byte) *resty.Request {
-
-
- request := rClient.R()
- request.SetBody(postBody)
-
- if c.config.UserAgent != "" {
- request.SetHeader("User-Agent", c.config.UserAgent)
- }
-
- // add header parameter, if any
- if len(headerParams) > 0 {
- request.SetHeaders(headerParams)
- }
-
- // add query parameter, if any
- if len(queryParams) > 0 {
- request.SetMultiValueQueryParams(queryParams)
- }
-
- // add form parameter, if any
- if len(formParams) > 0 {
- request.SetFormData(formParams)
- }
-
- if len(fileBytes) > 0 && fileName != "" {
- _, fileNm := filepath.Split(fileName)
- request.SetFileReader("file", fileNm, bytes.NewReader(fileBytes))
- }
- return request
-}
diff --git a/vendor/github.com/funcy/functions_go/api_response.go b/vendor/github.com/funcy/functions_go/api_response.go
deleted file mode 100644
index 564ed43a5..000000000
--- a/vendor/github.com/funcy/functions_go/api_response.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package functions
-
-import (
- "net/http"
-)
-
-type APIResponse struct {
- *http.Response `json:"-"`
- Message string `json:"message,omitempty"`
- // Operation is the name of the swagger operation.
- Operation string `json:"operation,omitempty"`
- // RequestURL is the request URL. This value is always available, even if the
- // embedded *http.Response is nil.
- RequestURL string `json:"url,omitempty"`
- // Method is the HTTP method used for the request. This value is always
- // available, even if the embedded *http.Response is nil.
- Method string `json:"method,omitempty"`
- // Payload holds the contents of the response body (which may be nil or empty).
- // This is provided here as the raw response.Body() reader will have already
- // been drained.
- Payload []byte `json:"-"`
-}
-
-func NewAPIResponse(r *http.Response) *APIResponse {
-
- response := &APIResponse{Response: r}
- return response
-}
-
-func NewAPIResponseWithError(errorMessage string) *APIResponse {
-
- response := &APIResponse{Message: errorMessage}
- return response
-}
diff --git a/vendor/github.com/funcy/functions_go/app.go b/vendor/github.com/funcy/functions_go/app.go
deleted file mode 100644
index 58dfbffc6..000000000
--- a/vendor/github.com/funcy/functions_go/app.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package functions
-
-type App struct {
-
- // Name of this app. Must be different than the image name. Can ony contain alphanumeric, -, and _.
- Name string `json:"name,omitempty"`
-
- // Application configuration
- Config map[string]string `json:"config,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/app_wrapper.go b/vendor/github.com/funcy/functions_go/app_wrapper.go
deleted file mode 100644
index c78e60f78..000000000
--- a/vendor/github.com/funcy/functions_go/app_wrapper.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package functions
-
-type AppWrapper struct {
-
- App App `json:"app,omitempty"`
-
- Error_ ErrorBody `json:"error,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/apps_api.go b/vendor/github.com/funcy/functions_go/apps_api.go
deleted file mode 100644
index 64f17bbda..000000000
--- a/vendor/github.com/funcy/functions_go/apps_api.go
+++ /dev/null
@@ -1,334 +0,0 @@
-package functions
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type AppsApi struct {
- Configuration *Configuration
-}
-
-func NewAppsApi() *AppsApi {
- configuration := NewConfiguration()
- return &AppsApi{
- Configuration: configuration,
- }
-}
-
-func NewAppsApiWithBasePath(basePath string) *AppsApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &AppsApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Delete an app.
- * Delete an app.
- *
- * @param app Name of the app.
- * @return void
- */
-func (a AppsApi) AppsAppDelete(app string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Delete")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppDelete", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Get information for a app.
- * This gives more details about a app, such as statistics.
- *
- * @param app name of the app.
- * @return *AppWrapper
- */
-func (a AppsApi) AppsAppGet(app string) (*AppWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(AppWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppGet", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Updates an app.
- * You can set app level settings here.
- *
- * @param app name of the app.
- * @param body App to post.
- * @return *AppWrapper
- */
-func (a AppsApi) AppsAppPatch(app string, body AppWrapper) (*AppWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Patch")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &body
- var successPayload = new(AppWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppPatch", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Get all app names.
- * Get a list of all the apps in the system.
- *
- * @return *AppsWrapper
- */
-func (a AppsApi) AppsGet() (*AppsWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(AppsWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsGet", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Post new app
- * Insert a new app
- *
- * @param body App to post.
- * @return *AppWrapper
- */
-func (a AppsApi) AppsPost(body AppWrapper) (*AppWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &body
- var successPayload = new(AppWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsPost", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/vendor/github.com/funcy/functions_go/apps_wrapper.go b/vendor/github.com/funcy/functions_go/apps_wrapper.go
deleted file mode 100644
index 9b6af73e3..000000000
--- a/vendor/github.com/funcy/functions_go/apps_wrapper.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package functions
-
-type AppsWrapper struct {
-
- Apps []App `json:"apps,omitempty"`
-
- Error_ ErrorBody `json:"error,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/apps_client.go b/vendor/github.com/funcy/functions_go/client/apps/apps_client.go
deleted file mode 100644
index 61cd89802..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/apps_client.go
+++ /dev/null
@@ -1,180 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// New creates a new apps API client.
-func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
- return &Client{transport: transport, formats: formats}
-}
-
-/*
-Client for apps API
-*/
-type Client struct {
- transport runtime.ClientTransport
- formats strfmt.Registry
-}
-
-/*
-DeleteAppsApp deletes an app
-
-Delete an app.
-*/
-func (a *Client) DeleteAppsApp(params *DeleteAppsAppParams) (*DeleteAppsAppOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewDeleteAppsAppParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "DeleteAppsApp",
- Method: "DELETE",
- PathPattern: "/apps/{app}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &DeleteAppsAppReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*DeleteAppsAppOK), nil
-
-}
-
-/*
-GetApps gets all app names
-
-Get a list of all the apps in the system.
-*/
-func (a *Client) GetApps(params *GetAppsParams) (*GetAppsOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetAppsParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetApps",
- Method: "GET",
- PathPattern: "/apps",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetAppsReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetAppsOK), nil
-
-}
-
-/*
-GetAppsApp gets information for a app
-
-This gives more details about a app, such as statistics.
-*/
-func (a *Client) GetAppsApp(params *GetAppsAppParams) (*GetAppsAppOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetAppsAppParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetAppsApp",
- Method: "GET",
- PathPattern: "/apps/{app}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetAppsAppReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetAppsAppOK), nil
-
-}
-
-/*
-PatchAppsApp updates an app
-
-You can set app level settings here.
-*/
-func (a *Client) PatchAppsApp(params *PatchAppsAppParams) (*PatchAppsAppOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewPatchAppsAppParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "PatchAppsApp",
- Method: "PATCH",
- PathPattern: "/apps/{app}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &PatchAppsAppReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*PatchAppsAppOK), nil
-
-}
-
-/*
-PostApps posts new app
-
-Insert a new app
-*/
-func (a *Client) PostApps(params *PostAppsParams) (*PostAppsOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewPostAppsParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "PostApps",
- Method: "POST",
- PathPattern: "/apps",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &PostAppsReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*PostAppsOK), nil
-
-}
-
-// SetTransport changes the transport on the client
-func (a *Client) SetTransport(transport runtime.ClientTransport) {
- a.transport = transport
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go b/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go
deleted file mode 100644
index 27e8ac7b9..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_parameters.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewDeleteAppsAppParams creates a new DeleteAppsAppParams object
-// with the default values initialized.
-func NewDeleteAppsAppParams() *DeleteAppsAppParams {
- var ()
- return &DeleteAppsAppParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewDeleteAppsAppParamsWithTimeout creates a new DeleteAppsAppParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewDeleteAppsAppParamsWithTimeout(timeout time.Duration) *DeleteAppsAppParams {
- var ()
- return &DeleteAppsAppParams{
-
- timeout: timeout,
- }
-}
-
-// NewDeleteAppsAppParamsWithContext creates a new DeleteAppsAppParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewDeleteAppsAppParamsWithContext(ctx context.Context) *DeleteAppsAppParams {
- var ()
- return &DeleteAppsAppParams{
-
- Context: ctx,
- }
-}
-
-// NewDeleteAppsAppParamsWithHTTPClient creates a new DeleteAppsAppParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewDeleteAppsAppParamsWithHTTPClient(client *http.Client) *DeleteAppsAppParams {
- var ()
- return &DeleteAppsAppParams{
- HTTPClient: client,
- }
-}
-
-/*DeleteAppsAppParams contains all the parameters to send to the API endpoint
-for the delete apps app operation typically these are written to a http.Request
-*/
-type DeleteAppsAppParams struct {
-
- /*App
- Name of the app.
-
- */
- App string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the delete apps app params
-func (o *DeleteAppsAppParams) WithTimeout(timeout time.Duration) *DeleteAppsAppParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the delete apps app params
-func (o *DeleteAppsAppParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the delete apps app params
-func (o *DeleteAppsAppParams) WithContext(ctx context.Context) *DeleteAppsAppParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the delete apps app params
-func (o *DeleteAppsAppParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the delete apps app params
-func (o *DeleteAppsAppParams) WithHTTPClient(client *http.Client) *DeleteAppsAppParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the delete apps app params
-func (o *DeleteAppsAppParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the delete apps app params
-func (o *DeleteAppsAppParams) WithApp(app string) *DeleteAppsAppParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the delete apps app params
-func (o *DeleteAppsAppParams) SetApp(app string) {
- o.App = app
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *DeleteAppsAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go b/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go
deleted file mode 100644
index fd6d72d59..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/delete_apps_app_responses.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// DeleteAppsAppReader is a Reader for the DeleteAppsApp structure.
-type DeleteAppsAppReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *DeleteAppsAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewDeleteAppsAppOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewDeleteAppsAppNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewDeleteAppsAppDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewDeleteAppsAppOK creates a DeleteAppsAppOK with default headers values
-func NewDeleteAppsAppOK() *DeleteAppsAppOK {
- return &DeleteAppsAppOK{}
-}
-
-/*DeleteAppsAppOK handles this case with default header values.
-
-Apps successfully deleted.
-*/
-type DeleteAppsAppOK struct {
-}
-
-func (o *DeleteAppsAppOK) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}][%d] deleteAppsAppOK ", 200)
-}
-
-func (o *DeleteAppsAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- return nil
-}
-
-// NewDeleteAppsAppNotFound creates a DeleteAppsAppNotFound with default headers values
-func NewDeleteAppsAppNotFound() *DeleteAppsAppNotFound {
- return &DeleteAppsAppNotFound{}
-}
-
-/*DeleteAppsAppNotFound handles this case with default header values.
-
-App does not exist.
-*/
-type DeleteAppsAppNotFound struct {
- Payload *models.Error
-}
-
-func (o *DeleteAppsAppNotFound) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}][%d] deleteAppsAppNotFound %+v", 404, o.Payload)
-}
-
-func (o *DeleteAppsAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewDeleteAppsAppDefault creates a DeleteAppsAppDefault with default headers values
-func NewDeleteAppsAppDefault(code int) *DeleteAppsAppDefault {
- return &DeleteAppsAppDefault{
- _statusCode: code,
- }
-}
-
-/*DeleteAppsAppDefault handles this case with default header values.
-
-Unexpected error
-*/
-type DeleteAppsAppDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the delete apps app default response
-func (o *DeleteAppsAppDefault) Code() int {
- return o._statusCode
-}
-
-func (o *DeleteAppsAppDefault) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}][%d] DeleteAppsApp default %+v", o._statusCode, o.Payload)
-}
-
-func (o *DeleteAppsAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go b/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go
deleted file mode 100644
index 3e3ff3ae8..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_parameters.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsAppParams creates a new GetAppsAppParams object
-// with the default values initialized.
-func NewGetAppsAppParams() *GetAppsAppParams {
- var ()
- return &GetAppsAppParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsAppParamsWithTimeout creates a new GetAppsAppParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsAppParamsWithTimeout(timeout time.Duration) *GetAppsAppParams {
- var ()
- return &GetAppsAppParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsAppParamsWithContext creates a new GetAppsAppParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsAppParamsWithContext(ctx context.Context) *GetAppsAppParams {
- var ()
- return &GetAppsAppParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsAppParamsWithHTTPClient creates a new GetAppsAppParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsAppParamsWithHTTPClient(client *http.Client) *GetAppsAppParams {
- var ()
- return &GetAppsAppParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsAppParams contains all the parameters to send to the API endpoint
-for the get apps app operation typically these are written to a http.Request
-*/
-type GetAppsAppParams struct {
-
- /*App
- name of the app.
-
- */
- App string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps app params
-func (o *GetAppsAppParams) WithTimeout(timeout time.Duration) *GetAppsAppParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps app params
-func (o *GetAppsAppParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps app params
-func (o *GetAppsAppParams) WithContext(ctx context.Context) *GetAppsAppParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps app params
-func (o *GetAppsAppParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps app params
-func (o *GetAppsAppParams) WithHTTPClient(client *http.Client) *GetAppsAppParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps app params
-func (o *GetAppsAppParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the get apps app params
-func (o *GetAppsAppParams) WithApp(app string) *GetAppsAppParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the get apps app params
-func (o *GetAppsAppParams) SetApp(app string) {
- o.App = app
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go b/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go
deleted file mode 100644
index 902c17c2d..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/get_apps_app_responses.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsAppReader is a Reader for the GetAppsApp structure.
-type GetAppsAppReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsAppOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetAppsAppNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewGetAppsAppDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewGetAppsAppOK creates a GetAppsAppOK with default headers values
-func NewGetAppsAppOK() *GetAppsAppOK {
- return &GetAppsAppOK{}
-}
-
-/*GetAppsAppOK handles this case with default header values.
-
-App details and stats.
-*/
-type GetAppsAppOK struct {
- Payload *models.AppWrapper
-}
-
-func (o *GetAppsAppOK) Error() string {
- return fmt.Sprintf("[GET /apps/{app}][%d] getAppsAppOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.AppWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppNotFound creates a GetAppsAppNotFound with default headers values
-func NewGetAppsAppNotFound() *GetAppsAppNotFound {
- return &GetAppsAppNotFound{}
-}
-
-/*GetAppsAppNotFound handles this case with default header values.
-
-App does not exist.
-*/
-type GetAppsAppNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetAppsAppNotFound) Error() string {
- return fmt.Sprintf("[GET /apps/{app}][%d] getAppsAppNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetAppsAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppDefault creates a GetAppsAppDefault with default headers values
-func NewGetAppsAppDefault(code int) *GetAppsAppDefault {
- return &GetAppsAppDefault{
- _statusCode: code,
- }
-}
-
-/*GetAppsAppDefault handles this case with default header values.
-
-Unexpected error
-*/
-type GetAppsAppDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the get apps app default response
-func (o *GetAppsAppDefault) Code() int {
- return o._statusCode
-}
-
-func (o *GetAppsAppDefault) Error() string {
- return fmt.Sprintf("[GET /apps/{app}][%d] GetAppsApp default %+v", o._statusCode, o.Payload)
-}
-
-func (o *GetAppsAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go b/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go
deleted file mode 100644
index 65dd2d233..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/get_apps_parameters.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsParams creates a new GetAppsParams object
-// with the default values initialized.
-func NewGetAppsParams() *GetAppsParams {
-
- return &GetAppsParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsParamsWithTimeout creates a new GetAppsParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsParamsWithTimeout(timeout time.Duration) *GetAppsParams {
-
- return &GetAppsParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsParamsWithContext creates a new GetAppsParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsParamsWithContext(ctx context.Context) *GetAppsParams {
-
- return &GetAppsParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsParamsWithHTTPClient creates a new GetAppsParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsParamsWithHTTPClient(client *http.Client) *GetAppsParams {
-
- return &GetAppsParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsParams contains all the parameters to send to the API endpoint
-for the get apps operation typically these are written to a http.Request
-*/
-type GetAppsParams struct {
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps params
-func (o *GetAppsParams) WithTimeout(timeout time.Duration) *GetAppsParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps params
-func (o *GetAppsParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps params
-func (o *GetAppsParams) WithContext(ctx context.Context) *GetAppsParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps params
-func (o *GetAppsParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps params
-func (o *GetAppsParams) WithHTTPClient(client *http.Client) *GetAppsParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps params
-func (o *GetAppsParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go b/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go
deleted file mode 100644
index 06de78f73..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/get_apps_responses.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsReader is a Reader for the GetApps structure.
-type GetAppsReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- default:
- result := NewGetAppsDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewGetAppsOK creates a GetAppsOK with default headers values
-func NewGetAppsOK() *GetAppsOK {
- return &GetAppsOK{}
-}
-
-/*GetAppsOK handles this case with default header values.
-
-List of apps.
-*/
-type GetAppsOK struct {
- Payload *models.AppsWrapper
-}
-
-func (o *GetAppsOK) Error() string {
- return fmt.Sprintf("[GET /apps][%d] getAppsOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.AppsWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsDefault creates a GetAppsDefault with default headers values
-func NewGetAppsDefault(code int) *GetAppsDefault {
- return &GetAppsDefault{
- _statusCode: code,
- }
-}
-
-/*GetAppsDefault handles this case with default header values.
-
-Unexpected error
-*/
-type GetAppsDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the get apps default response
-func (o *GetAppsDefault) Code() int {
- return o._statusCode
-}
-
-func (o *GetAppsDefault) Error() string {
- return fmt.Sprintf("[GET /apps][%d] GetApps default %+v", o._statusCode, o.Payload)
-}
-
-func (o *GetAppsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go b/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go
deleted file mode 100644
index 2890a2553..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_parameters.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// NewPatchAppsAppParams creates a new PatchAppsAppParams object
-// with the default values initialized.
-func NewPatchAppsAppParams() *PatchAppsAppParams {
- var ()
- return &PatchAppsAppParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewPatchAppsAppParamsWithTimeout creates a new PatchAppsAppParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewPatchAppsAppParamsWithTimeout(timeout time.Duration) *PatchAppsAppParams {
- var ()
- return &PatchAppsAppParams{
-
- timeout: timeout,
- }
-}
-
-// NewPatchAppsAppParamsWithContext creates a new PatchAppsAppParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewPatchAppsAppParamsWithContext(ctx context.Context) *PatchAppsAppParams {
- var ()
- return &PatchAppsAppParams{
-
- Context: ctx,
- }
-}
-
-// NewPatchAppsAppParamsWithHTTPClient creates a new PatchAppsAppParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewPatchAppsAppParamsWithHTTPClient(client *http.Client) *PatchAppsAppParams {
- var ()
- return &PatchAppsAppParams{
- HTTPClient: client,
- }
-}
-
-/*PatchAppsAppParams contains all the parameters to send to the API endpoint
-for the patch apps app operation typically these are written to a http.Request
-*/
-type PatchAppsAppParams struct {
-
- /*App
- name of the app.
-
- */
- App string
- /*Body
- App to post.
-
- */
- Body *models.AppWrapper
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the patch apps app params
-func (o *PatchAppsAppParams) WithTimeout(timeout time.Duration) *PatchAppsAppParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the patch apps app params
-func (o *PatchAppsAppParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the patch apps app params
-func (o *PatchAppsAppParams) WithContext(ctx context.Context) *PatchAppsAppParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the patch apps app params
-func (o *PatchAppsAppParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the patch apps app params
-func (o *PatchAppsAppParams) WithHTTPClient(client *http.Client) *PatchAppsAppParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the patch apps app params
-func (o *PatchAppsAppParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the patch apps app params
-func (o *PatchAppsAppParams) WithApp(app string) *PatchAppsAppParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the patch apps app params
-func (o *PatchAppsAppParams) SetApp(app string) {
- o.App = app
-}
-
-// WithBody adds the body to the patch apps app params
-func (o *PatchAppsAppParams) WithBody(body *models.AppWrapper) *PatchAppsAppParams {
- o.SetBody(body)
- return o
-}
-
-// SetBody adds the body to the patch apps app params
-func (o *PatchAppsAppParams) SetBody(body *models.AppWrapper) {
- o.Body = body
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *PatchAppsAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if o.Body == nil {
- o.Body = new(models.AppWrapper)
- }
-
- if err := r.SetBodyParam(o.Body); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go b/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go
deleted file mode 100644
index e8cd5f2a5..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/patch_apps_app_responses.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// PatchAppsAppReader is a Reader for the PatchAppsApp structure.
-type PatchAppsAppReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *PatchAppsAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewPatchAppsAppOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 400:
- result := NewPatchAppsAppBadRequest()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- case 404:
- result := NewPatchAppsAppNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewPatchAppsAppDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewPatchAppsAppOK creates a PatchAppsAppOK with default headers values
-func NewPatchAppsAppOK() *PatchAppsAppOK {
- return &PatchAppsAppOK{}
-}
-
-/*PatchAppsAppOK handles this case with default header values.
-
-App details and stats.
-*/
-type PatchAppsAppOK struct {
- Payload *models.AppWrapper
-}
-
-func (o *PatchAppsAppOK) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}][%d] patchAppsAppOK %+v", 200, o.Payload)
-}
-
-func (o *PatchAppsAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.AppWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPatchAppsAppBadRequest creates a PatchAppsAppBadRequest with default headers values
-func NewPatchAppsAppBadRequest() *PatchAppsAppBadRequest {
- return &PatchAppsAppBadRequest{}
-}
-
-/*PatchAppsAppBadRequest handles this case with default header values.
-
-Parameters are missing or invalid.
-*/
-type PatchAppsAppBadRequest struct {
- Payload *models.Error
-}
-
-func (o *PatchAppsAppBadRequest) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}][%d] patchAppsAppBadRequest %+v", 400, o.Payload)
-}
-
-func (o *PatchAppsAppBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPatchAppsAppNotFound creates a PatchAppsAppNotFound with default headers values
-func NewPatchAppsAppNotFound() *PatchAppsAppNotFound {
- return &PatchAppsAppNotFound{}
-}
-
-/*PatchAppsAppNotFound handles this case with default header values.
-
-App does not exist.
-*/
-type PatchAppsAppNotFound struct {
- Payload *models.Error
-}
-
-func (o *PatchAppsAppNotFound) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}][%d] patchAppsAppNotFound %+v", 404, o.Payload)
-}
-
-func (o *PatchAppsAppNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPatchAppsAppDefault creates a PatchAppsAppDefault with default headers values
-func NewPatchAppsAppDefault(code int) *PatchAppsAppDefault {
- return &PatchAppsAppDefault{
- _statusCode: code,
- }
-}
-
-/*PatchAppsAppDefault handles this case with default header values.
-
-Unexpected error
-*/
-type PatchAppsAppDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the patch apps app default response
-func (o *PatchAppsAppDefault) Code() int {
- return o._statusCode
-}
-
-func (o *PatchAppsAppDefault) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}][%d] PatchAppsApp default %+v", o._statusCode, o.Payload)
-}
-
-func (o *PatchAppsAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go b/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go
deleted file mode 100644
index 36268651d..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/post_apps_parameters.go
+++ /dev/null
@@ -1,142 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// NewPostAppsParams creates a new PostAppsParams object
-// with the default values initialized.
-func NewPostAppsParams() *PostAppsParams {
- var ()
- return &PostAppsParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewPostAppsParamsWithTimeout creates a new PostAppsParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewPostAppsParamsWithTimeout(timeout time.Duration) *PostAppsParams {
- var ()
- return &PostAppsParams{
-
- timeout: timeout,
- }
-}
-
-// NewPostAppsParamsWithContext creates a new PostAppsParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewPostAppsParamsWithContext(ctx context.Context) *PostAppsParams {
- var ()
- return &PostAppsParams{
-
- Context: ctx,
- }
-}
-
-// NewPostAppsParamsWithHTTPClient creates a new PostAppsParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewPostAppsParamsWithHTTPClient(client *http.Client) *PostAppsParams {
- var ()
- return &PostAppsParams{
- HTTPClient: client,
- }
-}
-
-/*PostAppsParams contains all the parameters to send to the API endpoint
-for the post apps operation typically these are written to a http.Request
-*/
-type PostAppsParams struct {
-
- /*Body
- App to post.
-
- */
- Body *models.AppWrapper
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the post apps params
-func (o *PostAppsParams) WithTimeout(timeout time.Duration) *PostAppsParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the post apps params
-func (o *PostAppsParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the post apps params
-func (o *PostAppsParams) WithContext(ctx context.Context) *PostAppsParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the post apps params
-func (o *PostAppsParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the post apps params
-func (o *PostAppsParams) WithHTTPClient(client *http.Client) *PostAppsParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the post apps params
-func (o *PostAppsParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithBody adds the body to the post apps params
-func (o *PostAppsParams) WithBody(body *models.AppWrapper) *PostAppsParams {
- o.SetBody(body)
- return o
-}
-
-// SetBody adds the body to the post apps params
-func (o *PostAppsParams) SetBody(body *models.AppWrapper) {
- o.Body = body
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *PostAppsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- if o.Body == nil {
- o.Body = new(models.AppWrapper)
- }
-
- if err := r.SetBodyParam(o.Body); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go b/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go
deleted file mode 100644
index 9b381d8d6..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/post_apps_responses.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// PostAppsReader is a Reader for the PostApps structure.
-type PostAppsReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *PostAppsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewPostAppsOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 400:
- result := NewPostAppsBadRequest()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- case 409:
- result := NewPostAppsConflict()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewPostAppsDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewPostAppsOK creates a PostAppsOK with default headers values
-func NewPostAppsOK() *PostAppsOK {
- return &PostAppsOK{}
-}
-
-/*PostAppsOK handles this case with default header values.
-
-App details and stats.
-*/
-type PostAppsOK struct {
- Payload *models.AppWrapper
-}
-
-func (o *PostAppsOK) Error() string {
- return fmt.Sprintf("[POST /apps][%d] postAppsOK %+v", 200, o.Payload)
-}
-
-func (o *PostAppsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.AppWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPostAppsBadRequest creates a PostAppsBadRequest with default headers values
-func NewPostAppsBadRequest() *PostAppsBadRequest {
- return &PostAppsBadRequest{}
-}
-
-/*PostAppsBadRequest handles this case with default header values.
-
-Parameters are missing or invalid.
-*/
-type PostAppsBadRequest struct {
- Payload *models.Error
-}
-
-func (o *PostAppsBadRequest) Error() string {
- return fmt.Sprintf("[POST /apps][%d] postAppsBadRequest %+v", 400, o.Payload)
-}
-
-func (o *PostAppsBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPostAppsConflict creates a PostAppsConflict with default headers values
-func NewPostAppsConflict() *PostAppsConflict {
- return &PostAppsConflict{}
-}
-
-/*PostAppsConflict handles this case with default header values.
-
-App already exists.
-*/
-type PostAppsConflict struct {
- Payload *models.Error
-}
-
-func (o *PostAppsConflict) Error() string {
- return fmt.Sprintf("[POST /apps][%d] postAppsConflict %+v", 409, o.Payload)
-}
-
-func (o *PostAppsConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPostAppsDefault creates a PostAppsDefault with default headers values
-func NewPostAppsDefault(code int) *PostAppsDefault {
- return &PostAppsDefault{
- _statusCode: code,
- }
-}
-
-/*PostAppsDefault handles this case with default header values.
-
-Unexpected error
-*/
-type PostAppsDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the post apps default response
-func (o *PostAppsDefault) Code() int {
- return o._statusCode
-}
-
-func (o *PostAppsDefault) Error() string {
- return fmt.Sprintf("[POST /apps][%d] PostApps default %+v", o._statusCode, o.Payload)
-}
-
-func (o *PostAppsDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/put_apps_app_parameters.go b/vendor/github.com/funcy/functions_go/client/apps/put_apps_app_parameters.go
deleted file mode 100644
index 7478c6aad..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/put_apps_app_parameters.go
+++ /dev/null
@@ -1,137 +0,0 @@
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// NewPutAppsAppParams creates a new PutAppsAppParams object
-// with the default values initialized.
-func NewPutAppsAppParams() *PutAppsAppParams {
- var ()
- return &PutAppsAppParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewPutAppsAppParamsWithTimeout creates a new PutAppsAppParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewPutAppsAppParamsWithTimeout(timeout time.Duration) *PutAppsAppParams {
- var ()
- return &PutAppsAppParams{
-
- timeout: timeout,
- }
-}
-
-// NewPutAppsAppParamsWithContext creates a new PutAppsAppParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewPutAppsAppParamsWithContext(ctx context.Context) *PutAppsAppParams {
- var ()
- return &PutAppsAppParams{
-
- Context: ctx,
- }
-}
-
-/*PutAppsAppParams contains all the parameters to send to the API endpoint
-for the put apps app operation typically these are written to a http.Request
-*/
-type PutAppsAppParams struct {
-
- /*App
- name of the app.
-
- */
- App string
- /*Body
- App to post.
-
- */
- Body *models.AppWrapper
-
- timeout time.Duration
- Context context.Context
-}
-
-// WithTimeout adds the timeout to the put apps app params
-func (o *PutAppsAppParams) WithTimeout(timeout time.Duration) *PutAppsAppParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the put apps app params
-func (o *PutAppsAppParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the put apps app params
-func (o *PutAppsAppParams) WithContext(ctx context.Context) *PutAppsAppParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the put apps app params
-func (o *PutAppsAppParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithApp adds the app to the put apps app params
-func (o *PutAppsAppParams) WithApp(app string) *PutAppsAppParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the put apps app params
-func (o *PutAppsAppParams) SetApp(app string) {
- o.App = app
-}
-
-// WithBody adds the body to the put apps app params
-func (o *PutAppsAppParams) WithBody(body *models.AppWrapper) *PutAppsAppParams {
- o.SetBody(body)
- return o
-}
-
-// SetBody adds the body to the put apps app params
-func (o *PutAppsAppParams) SetBody(body *models.AppWrapper) {
- o.Body = body
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *PutAppsAppParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- r.SetTimeout(o.timeout)
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if o.Body == nil {
- o.Body = new(models.AppWrapper)
- }
-
- if err := r.SetBodyParam(o.Body); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/apps/put_apps_app_responses.go b/vendor/github.com/funcy/functions_go/client/apps/put_apps_app_responses.go
deleted file mode 100644
index edfce86f1..000000000
--- a/vendor/github.com/funcy/functions_go/client/apps/put_apps_app_responses.go
+++ /dev/null
@@ -1,179 +0,0 @@
-package apps
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// PutAppsAppReader is a Reader for the PutAppsApp structure.
-type PutAppsAppReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *PutAppsAppReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewPutAppsAppOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 400:
- result := NewPutAppsAppBadRequest()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- case 500:
- result := NewPutAppsAppInternalServerError()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewPutAppsAppDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
- }
-}
-
-// NewPutAppsAppOK creates a PutAppsAppOK with default headers values
-func NewPutAppsAppOK() *PutAppsAppOK {
- return &PutAppsAppOK{}
-}
-
-/*PutAppsAppOK handles this case with default header values.
-
-App details and stats.
-*/
-type PutAppsAppOK struct {
- Payload *models.AppWrapper
-}
-
-func (o *PutAppsAppOK) Error() string {
- return fmt.Sprintf("[PUT /apps/{app}][%d] putAppsAppOK %+v", 200, o.Payload)
-}
-
-func (o *PutAppsAppOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.AppWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPutAppsAppBadRequest creates a PutAppsAppBadRequest with default headers values
-func NewPutAppsAppBadRequest() *PutAppsAppBadRequest {
- return &PutAppsAppBadRequest{}
-}
-
-/*PutAppsAppBadRequest handles this case with default header values.
-
-Parameters are missing or invalid.
-*/
-type PutAppsAppBadRequest struct {
- Payload *models.Error
-}
-
-func (o *PutAppsAppBadRequest) Error() string {
- return fmt.Sprintf("[PUT /apps/{app}][%d] putAppsAppBadRequest %+v", 400, o.Payload)
-}
-
-func (o *PutAppsAppBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPutAppsAppInternalServerError creates a PutAppsAppInternalServerError with default headers values
-func NewPutAppsAppInternalServerError() *PutAppsAppInternalServerError {
- return &PutAppsAppInternalServerError{}
-}
-
-/*PutAppsAppInternalServerError handles this case with default header values.
-
-Could not accept app due to internal error.
-*/
-type PutAppsAppInternalServerError struct {
- Payload *models.Error
-}
-
-func (o *PutAppsAppInternalServerError) Error() string {
- return fmt.Sprintf("[PUT /apps/{app}][%d] putAppsAppInternalServerError %+v", 500, o.Payload)
-}
-
-func (o *PutAppsAppInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPutAppsAppDefault creates a PutAppsAppDefault with default headers values
-func NewPutAppsAppDefault(code int) *PutAppsAppDefault {
- return &PutAppsAppDefault{
- _statusCode: code,
- }
-}
-
-/*PutAppsAppDefault handles this case with default header values.
-
-Unexpected error
-*/
-type PutAppsAppDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the put apps app default response
-func (o *PutAppsAppDefault) Code() int {
- return o._statusCode
-}
-
-func (o *PutAppsAppDefault) Error() string {
- return fmt.Sprintf("[PUT /apps/{app}][%d] PutAppsApp default %+v", o._statusCode, o.Payload)
-}
-
-func (o *PutAppsAppDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/call_client.go b/vendor/github.com/funcy/functions_go/client/call/call_client.go
deleted file mode 100644
index c0d6172b7..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/call_client.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// New creates a new call API client.
-func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
- return &Client{transport: transport, formats: formats}
-}
-
-/*
-Client for call API
-*/
-type Client struct {
- transport runtime.ClientTransport
- formats strfmt.Registry
-}
-
-/*
-GetAppsAppCalls gets app bound calls
-
-Get app-bound calls can filter to route-bound calls.
-*/
-func (a *Client) GetAppsAppCalls(params *GetAppsAppCallsParams) (*GetAppsAppCallsOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetAppsAppCallsParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetAppsAppCalls",
- Method: "GET",
- PathPattern: "/apps/{app}/calls",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetAppsAppCallsReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetAppsAppCallsOK), nil
-
-}
-
-/*
-GetAppsAppCallsCall gets call information
-
-Get call information
-*/
-func (a *Client) GetAppsAppCallsCall(params *GetAppsAppCallsCallParams) (*GetAppsAppCallsCallOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetAppsAppCallsCallParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetAppsAppCallsCall",
- Method: "GET",
- PathPattern: "/apps/{app}/calls/{call}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetAppsAppCallsCallReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetAppsAppCallsCallOK), nil
-
-}
-
-// SetTransport changes the transport on the client
-func (a *Client) SetTransport(transport runtime.ClientTransport) {
- a.transport = transport
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_parameters.go b/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_parameters.go
deleted file mode 100644
index f5e6c84c8..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_parameters.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsAppCallsCallParams creates a new GetAppsAppCallsCallParams object
-// with the default values initialized.
-func NewGetAppsAppCallsCallParams() *GetAppsAppCallsCallParams {
- var ()
- return &GetAppsAppCallsCallParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsAppCallsCallParamsWithTimeout creates a new GetAppsAppCallsCallParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsAppCallsCallParamsWithTimeout(timeout time.Duration) *GetAppsAppCallsCallParams {
- var ()
- return &GetAppsAppCallsCallParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsAppCallsCallParamsWithContext creates a new GetAppsAppCallsCallParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsAppCallsCallParamsWithContext(ctx context.Context) *GetAppsAppCallsCallParams {
- var ()
- return &GetAppsAppCallsCallParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsAppCallsCallParamsWithHTTPClient creates a new GetAppsAppCallsCallParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsAppCallsCallParamsWithHTTPClient(client *http.Client) *GetAppsAppCallsCallParams {
- var ()
- return &GetAppsAppCallsCallParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsAppCallsCallParams contains all the parameters to send to the API endpoint
-for the get apps app calls call operation typically these are written to a http.Request
-*/
-type GetAppsAppCallsCallParams struct {
-
- /*App
- app name
-
- */
- App string
- /*Call
- Call ID.
-
- */
- Call string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) WithTimeout(timeout time.Duration) *GetAppsAppCallsCallParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) WithContext(ctx context.Context) *GetAppsAppCallsCallParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) WithHTTPClient(client *http.Client) *GetAppsAppCallsCallParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) WithApp(app string) *GetAppsAppCallsCallParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) SetApp(app string) {
- o.App = app
-}
-
-// WithCall adds the call to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) WithCall(call string) *GetAppsAppCallsCallParams {
- o.SetCall(call)
- return o
-}
-
-// SetCall adds the call to the get apps app calls call params
-func (o *GetAppsAppCallsCallParams) SetCall(call string) {
- o.Call = call
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsAppCallsCallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- // path param call
- if err := r.SetPathParam("call", o.Call); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_responses.go b/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_responses.go
deleted file mode 100644
index 1a85bae55..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_call_responses.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsAppCallsCallReader is a Reader for the GetAppsAppCallsCall structure.
-type GetAppsAppCallsCallReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsAppCallsCallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsAppCallsCallOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetAppsAppCallsCallNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewGetAppsAppCallsCallOK creates a GetAppsAppCallsCallOK with default headers values
-func NewGetAppsAppCallsCallOK() *GetAppsAppCallsCallOK {
- return &GetAppsAppCallsCallOK{}
-}
-
-/*GetAppsAppCallsCallOK handles this case with default header values.
-
-Call found
-*/
-type GetAppsAppCallsCallOK struct {
- Payload *models.CallWrapper
-}
-
-func (o *GetAppsAppCallsCallOK) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls/{call}][%d] getAppsAppCallsCallOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsAppCallsCallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.CallWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppCallsCallNotFound creates a GetAppsAppCallsCallNotFound with default headers values
-func NewGetAppsAppCallsCallNotFound() *GetAppsAppCallsCallNotFound {
- return &GetAppsAppCallsCallNotFound{}
-}
-
-/*GetAppsAppCallsCallNotFound handles this case with default header values.
-
-Call not found.
-*/
-type GetAppsAppCallsCallNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetAppsAppCallsCallNotFound) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls/{call}][%d] getAppsAppCallsCallNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetAppsAppCallsCallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_parameters.go b/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_parameters.go
deleted file mode 100644
index ea653e9ec..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_parameters.go
+++ /dev/null
@@ -1,169 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsAppCallsParams creates a new GetAppsAppCallsParams object
-// with the default values initialized.
-func NewGetAppsAppCallsParams() *GetAppsAppCallsParams {
- var ()
- return &GetAppsAppCallsParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsAppCallsParamsWithTimeout creates a new GetAppsAppCallsParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsAppCallsParamsWithTimeout(timeout time.Duration) *GetAppsAppCallsParams {
- var ()
- return &GetAppsAppCallsParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsAppCallsParamsWithContext creates a new GetAppsAppCallsParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsAppCallsParamsWithContext(ctx context.Context) *GetAppsAppCallsParams {
- var ()
- return &GetAppsAppCallsParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsAppCallsParamsWithHTTPClient creates a new GetAppsAppCallsParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsAppCallsParamsWithHTTPClient(client *http.Client) *GetAppsAppCallsParams {
- var ()
- return &GetAppsAppCallsParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsAppCallsParams contains all the parameters to send to the API endpoint
-for the get apps app calls operation typically these are written to a http.Request
-*/
-type GetAppsAppCallsParams struct {
-
- /*App
- App name.
-
- */
- App string
- /*Route
- App route.
-
- */
- Route *string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps app calls params
-func (o *GetAppsAppCallsParams) WithTimeout(timeout time.Duration) *GetAppsAppCallsParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps app calls params
-func (o *GetAppsAppCallsParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps app calls params
-func (o *GetAppsAppCallsParams) WithContext(ctx context.Context) *GetAppsAppCallsParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps app calls params
-func (o *GetAppsAppCallsParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps app calls params
-func (o *GetAppsAppCallsParams) WithHTTPClient(client *http.Client) *GetAppsAppCallsParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps app calls params
-func (o *GetAppsAppCallsParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the get apps app calls params
-func (o *GetAppsAppCallsParams) WithApp(app string) *GetAppsAppCallsParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the get apps app calls params
-func (o *GetAppsAppCallsParams) SetApp(app string) {
- o.App = app
-}
-
-// WithRoute adds the route to the get apps app calls params
-func (o *GetAppsAppCallsParams) WithRoute(route *string) *GetAppsAppCallsParams {
- o.SetRoute(route)
- return o
-}
-
-// SetRoute adds the route to the get apps app calls params
-func (o *GetAppsAppCallsParams) SetRoute(route *string) {
- o.Route = route
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsAppCallsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if o.Route != nil {
-
- // query param route
- var qrRoute string
- if o.Route != nil {
- qrRoute = *o.Route
- }
- qRoute := qrRoute
- if qRoute != "" {
- if err := r.SetQueryParam("route", qRoute); err != nil {
- return err
- }
- }
-
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go b/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go
deleted file mode 100644
index 4f766add9..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_responses.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsAppCallsReader is a Reader for the GetAppsAppCalls structure.
-type GetAppsAppCallsReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsAppCallsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsAppCallsOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetAppsAppCallsNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewGetAppsAppCallsOK creates a GetAppsAppCallsOK with default headers values
-func NewGetAppsAppCallsOK() *GetAppsAppCallsOK {
- return &GetAppsAppCallsOK{}
-}
-
-/*GetAppsAppCallsOK handles this case with default header values.
-
-Calls found
-*/
-type GetAppsAppCallsOK struct {
- Payload *models.CallsWrapper
-}
-
-func (o *GetAppsAppCallsOK) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls][%d] getAppsAppCallsOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsAppCallsOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.CallsWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppCallsNotFound creates a GetAppsAppCallsNotFound with default headers values
-func NewGetAppsAppCallsNotFound() *GetAppsAppCallsNotFound {
- return &GetAppsAppCallsNotFound{}
-}
-
-/*GetAppsAppCallsNotFound handles this case with default header values.
-
-Calls not found.
-*/
-type GetAppsAppCallsNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetAppsAppCallsNotFound) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls][%d] getAppsAppCallsNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetAppsAppCallsNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_route_parameters.go b/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_route_parameters.go
deleted file mode 100644
index edba8be3c..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_route_parameters.go
+++ /dev/null
@@ -1,156 +0,0 @@
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsAppCallsRouteParams creates a new GetAppsAppCallsRouteParams object
-// with the default values initialized.
-func NewGetAppsAppCallsRouteParams() *GetAppsAppCallsRouteParams {
- var ()
- return &GetAppsAppCallsRouteParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsAppCallsRouteParamsWithTimeout creates a new GetAppsAppCallsRouteParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsAppCallsRouteParamsWithTimeout(timeout time.Duration) *GetAppsAppCallsRouteParams {
- var ()
- return &GetAppsAppCallsRouteParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsAppCallsRouteParamsWithContext creates a new GetAppsAppCallsRouteParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsAppCallsRouteParamsWithContext(ctx context.Context) *GetAppsAppCallsRouteParams {
- var ()
- return &GetAppsAppCallsRouteParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsAppCallsRouteParamsWithHTTPClient creates a new GetAppsAppCallsRouteParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsAppCallsRouteParamsWithHTTPClient(client *http.Client) *GetAppsAppCallsRouteParams {
- var ()
- return &GetAppsAppCallsRouteParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsAppCallsRouteParams contains all the parameters to send to the API endpoint
-for the get apps app calls route operation typically these are written to a http.Request
-*/
-type GetAppsAppCallsRouteParams struct {
-
- /*App
- App name.
-
- */
- App string
- /*Route
- App route.
-
- */
- Route string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) WithTimeout(timeout time.Duration) *GetAppsAppCallsRouteParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) WithContext(ctx context.Context) *GetAppsAppCallsRouteParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) WithHTTPClient(client *http.Client) *GetAppsAppCallsRouteParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) WithApp(app string) *GetAppsAppCallsRouteParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) SetApp(app string) {
- o.App = app
-}
-
-// WithRoute adds the route to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) WithRoute(route string) *GetAppsAppCallsRouteParams {
- o.SetRoute(route)
- return o
-}
-
-// SetRoute adds the route to the get apps app calls route params
-func (o *GetAppsAppCallsRouteParams) SetRoute(route string) {
- o.Route = route
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsAppCallsRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- // path param route
- if err := r.SetPathParam("route", o.Route); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_route_responses.go b/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_route_responses.go
deleted file mode 100644
index 8240f791f..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_apps_app_calls_route_responses.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsAppCallsRouteReader is a Reader for the GetAppsAppCallsRoute structure.
-type GetAppsAppCallsRouteReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsAppCallsRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsAppCallsRouteOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetAppsAppCallsRouteNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewGetAppsAppCallsRouteOK creates a GetAppsAppCallsRouteOK with default headers values
-func NewGetAppsAppCallsRouteOK() *GetAppsAppCallsRouteOK {
- return &GetAppsAppCallsRouteOK{}
-}
-
-/*GetAppsAppCallsRouteOK handles this case with default header values.
-
-Calls found
-*/
-type GetAppsAppCallsRouteOK struct {
- Payload *models.CallsWrapper
-}
-
-func (o *GetAppsAppCallsRouteOK) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls/{route}][%d] getAppsAppCallsRouteOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsAppCallsRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.CallsWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppCallsRouteNotFound creates a GetAppsAppCallsRouteNotFound with default headers values
-func NewGetAppsAppCallsRouteNotFound() *GetAppsAppCallsRouteNotFound {
- return &GetAppsAppCallsRouteNotFound{}
-}
-
-/*GetAppsAppCallsRouteNotFound handles this case with default header values.
-
-Calls not found.
-*/
-type GetAppsAppCallsRouteNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetAppsAppCallsRouteNotFound) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls/{route}][%d] getAppsAppCallsRouteNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetAppsAppCallsRouteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_calls_call_parameters.go b/vendor/github.com/funcy/functions_go/client/call/get_calls_call_parameters.go
deleted file mode 100644
index 80ce52fdb..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_calls_call_parameters.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetCallsCallParams creates a new GetCallsCallParams object
-// with the default values initialized.
-func NewGetCallsCallParams() *GetCallsCallParams {
- var ()
- return &GetCallsCallParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetCallsCallParamsWithTimeout creates a new GetCallsCallParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetCallsCallParamsWithTimeout(timeout time.Duration) *GetCallsCallParams {
- var ()
- return &GetCallsCallParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetCallsCallParamsWithContext creates a new GetCallsCallParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetCallsCallParamsWithContext(ctx context.Context) *GetCallsCallParams {
- var ()
- return &GetCallsCallParams{
-
- Context: ctx,
- }
-}
-
-// NewGetCallsCallParamsWithHTTPClient creates a new GetCallsCallParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetCallsCallParamsWithHTTPClient(client *http.Client) *GetCallsCallParams {
- var ()
- return &GetCallsCallParams{
- HTTPClient: client,
- }
-}
-
-/*GetCallsCallParams contains all the parameters to send to the API endpoint
-for the get calls call operation typically these are written to a http.Request
-*/
-type GetCallsCallParams struct {
-
- /*Call
- Call ID.
-
- */
- Call string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get calls call params
-func (o *GetCallsCallParams) WithTimeout(timeout time.Duration) *GetCallsCallParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get calls call params
-func (o *GetCallsCallParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get calls call params
-func (o *GetCallsCallParams) WithContext(ctx context.Context) *GetCallsCallParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get calls call params
-func (o *GetCallsCallParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get calls call params
-func (o *GetCallsCallParams) WithHTTPClient(client *http.Client) *GetCallsCallParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get calls call params
-func (o *GetCallsCallParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithCall adds the call to the get calls call params
-func (o *GetCallsCallParams) WithCall(call string) *GetCallsCallParams {
- o.SetCall(call)
- return o
-}
-
-// SetCall adds the call to the get calls call params
-func (o *GetCallsCallParams) SetCall(call string) {
- o.Call = call
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetCallsCallParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param call
- if err := r.SetPathParam("call", o.Call); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/call/get_calls_call_responses.go b/vendor/github.com/funcy/functions_go/client/call/get_calls_call_responses.go
deleted file mode 100644
index 73bdf3f35..000000000
--- a/vendor/github.com/funcy/functions_go/client/call/get_calls_call_responses.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package call
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetCallsCallReader is a Reader for the GetCallsCall structure.
-type GetCallsCallReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetCallsCallReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetCallsCallOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetCallsCallNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewGetCallsCallOK creates a GetCallsCallOK with default headers values
-func NewGetCallsCallOK() *GetCallsCallOK {
- return &GetCallsCallOK{}
-}
-
-/*GetCallsCallOK handles this case with default header values.
-
-Call found
-*/
-type GetCallsCallOK struct {
- Payload *models.CallWrapper
-}
-
-func (o *GetCallsCallOK) Error() string {
- return fmt.Sprintf("[GET /calls/{call}][%d] getCallsCallOK %+v", 200, o.Payload)
-}
-
-func (o *GetCallsCallOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.CallWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetCallsCallNotFound creates a GetCallsCallNotFound with default headers values
-func NewGetCallsCallNotFound() *GetCallsCallNotFound {
- return &GetCallsCallNotFound{}
-}
-
-/*GetCallsCallNotFound handles this case with default header values.
-
-Call not found.
-*/
-type GetCallsCallNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetCallsCallNotFound) Error() string {
- return fmt.Sprintf("[GET /calls/{call}][%d] getCallsCallNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetCallsCallNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/functions_client.go b/vendor/github.com/funcy/functions_go/client/functions_client.go
deleted file mode 100644
index ac2259094..000000000
--- a/vendor/github.com/funcy/functions_go/client/functions_client.go
+++ /dev/null
@@ -1,136 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package client
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/runtime"
- httptransport "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/client/apps"
- "github.com/funcy/functions_go/client/call"
- "github.com/funcy/functions_go/client/operations"
- "github.com/funcy/functions_go/client/routes"
-)
-
-// Default functions HTTP client.
-var Default = NewHTTPClient(nil)
-
-const (
- // DefaultHost is the default Host
- // found in Meta (info) section of spec file
- DefaultHost string = "127.0.0.1:8080"
- // DefaultBasePath is the default BasePath
- // found in Meta (info) section of spec file
- DefaultBasePath string = "/v1"
-)
-
-// DefaultSchemes are the default schemes found in Meta (info) section of spec file
-var DefaultSchemes = []string{"http", "https"}
-
-// NewHTTPClient creates a new functions HTTP client.
-func NewHTTPClient(formats strfmt.Registry) *Functions {
- return NewHTTPClientWithConfig(formats, nil)
-}
-
-// NewHTTPClientWithConfig creates a new functions HTTP client,
-// using a customizable transport config.
-func NewHTTPClientWithConfig(formats strfmt.Registry, cfg *TransportConfig) *Functions {
- // ensure nullable parameters have default
- if formats == nil {
- formats = strfmt.Default
- }
- if cfg == nil {
- cfg = DefaultTransportConfig()
- }
-
- // create transport and client
- transport := httptransport.New(cfg.Host, cfg.BasePath, cfg.Schemes)
- return New(transport, formats)
-}
-
-// New creates a new functions client
-func New(transport runtime.ClientTransport, formats strfmt.Registry) *Functions {
- cli := new(Functions)
- cli.Transport = transport
-
- cli.Apps = apps.New(transport, formats)
-
- cli.Call = call.New(transport, formats)
-
- cli.Operations = operations.New(transport, formats)
-
- cli.Routes = routes.New(transport, formats)
-
- return cli
-}
-
-// DefaultTransportConfig creates a TransportConfig with the
-// default settings taken from the meta section of the spec file.
-func DefaultTransportConfig() *TransportConfig {
- return &TransportConfig{
- Host: DefaultHost,
- BasePath: DefaultBasePath,
- Schemes: DefaultSchemes,
- }
-}
-
-// TransportConfig contains the transport related info,
-// found in the meta section of the spec file.
-type TransportConfig struct {
- Host string
- BasePath string
- Schemes []string
-}
-
-// WithHost overrides the default host,
-// provided by the meta section of the spec file.
-func (cfg *TransportConfig) WithHost(host string) *TransportConfig {
- cfg.Host = host
- return cfg
-}
-
-// WithBasePath overrides the default basePath,
-// provided by the meta section of the spec file.
-func (cfg *TransportConfig) WithBasePath(basePath string) *TransportConfig {
- cfg.BasePath = basePath
- return cfg
-}
-
-// WithSchemes overrides the default schemes,
-// provided by the meta section of the spec file.
-func (cfg *TransportConfig) WithSchemes(schemes []string) *TransportConfig {
- cfg.Schemes = schemes
- return cfg
-}
-
-// Functions is a client for functions
-type Functions struct {
- Apps *apps.Client
-
- Call *call.Client
-
- Operations *operations.Client
-
- Routes *routes.Client
-
- Transport runtime.ClientTransport
-}
-
-// SetTransport changes the transport on the client and all its subresources
-func (c *Functions) SetTransport(transport runtime.ClientTransport) {
- c.Transport = transport
-
- c.Apps.SetTransport(transport)
-
- c.Call.SetTransport(transport)
-
- c.Operations.SetTransport(transport)
-
- c.Routes.SetTransport(transport)
-
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_parameters.go b/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_parameters.go
deleted file mode 100644
index 83b929965..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_parameters.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewDeleteAppsAppCallsCallLogParams creates a new DeleteAppsAppCallsCallLogParams object
-// with the default values initialized.
-func NewDeleteAppsAppCallsCallLogParams() *DeleteAppsAppCallsCallLogParams {
- var ()
- return &DeleteAppsAppCallsCallLogParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewDeleteAppsAppCallsCallLogParamsWithTimeout creates a new DeleteAppsAppCallsCallLogParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewDeleteAppsAppCallsCallLogParamsWithTimeout(timeout time.Duration) *DeleteAppsAppCallsCallLogParams {
- var ()
- return &DeleteAppsAppCallsCallLogParams{
-
- timeout: timeout,
- }
-}
-
-// NewDeleteAppsAppCallsCallLogParamsWithContext creates a new DeleteAppsAppCallsCallLogParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewDeleteAppsAppCallsCallLogParamsWithContext(ctx context.Context) *DeleteAppsAppCallsCallLogParams {
- var ()
- return &DeleteAppsAppCallsCallLogParams{
-
- Context: ctx,
- }
-}
-
-// NewDeleteAppsAppCallsCallLogParamsWithHTTPClient creates a new DeleteAppsAppCallsCallLogParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewDeleteAppsAppCallsCallLogParamsWithHTTPClient(client *http.Client) *DeleteAppsAppCallsCallLogParams {
- var ()
- return &DeleteAppsAppCallsCallLogParams{
- HTTPClient: client,
- }
-}
-
-/*DeleteAppsAppCallsCallLogParams contains all the parameters to send to the API endpoint
-for the delete apps app calls call log operation typically these are written to a http.Request
-*/
-type DeleteAppsAppCallsCallLogParams struct {
-
- /*App
- App name.
-
- */
- App string
- /*Call
- Call ID.
-
- */
- Call string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) WithTimeout(timeout time.Duration) *DeleteAppsAppCallsCallLogParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) WithContext(ctx context.Context) *DeleteAppsAppCallsCallLogParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) WithHTTPClient(client *http.Client) *DeleteAppsAppCallsCallLogParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) WithApp(app string) *DeleteAppsAppCallsCallLogParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) SetApp(app string) {
- o.App = app
-}
-
-// WithCall adds the call to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) WithCall(call string) *DeleteAppsAppCallsCallLogParams {
- o.SetCall(call)
- return o
-}
-
-// SetCall adds the call to the delete apps app calls call log params
-func (o *DeleteAppsAppCallsCallLogParams) SetCall(call string) {
- o.Call = call
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *DeleteAppsAppCallsCallLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- // path param call
- if err := r.SetPathParam("call", o.Call); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_responses.go b/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_responses.go
deleted file mode 100644
index 3b0219340..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/delete_apps_app_calls_call_log_responses.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// DeleteAppsAppCallsCallLogReader is a Reader for the DeleteAppsAppCallsCallLog structure.
-type DeleteAppsAppCallsCallLogReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *DeleteAppsAppCallsCallLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 202:
- result := NewDeleteAppsAppCallsCallLogAccepted()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewDeleteAppsAppCallsCallLogNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewDeleteAppsAppCallsCallLogDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewDeleteAppsAppCallsCallLogAccepted creates a DeleteAppsAppCallsCallLogAccepted with default headers values
-func NewDeleteAppsAppCallsCallLogAccepted() *DeleteAppsAppCallsCallLogAccepted {
- return &DeleteAppsAppCallsCallLogAccepted{}
-}
-
-/*DeleteAppsAppCallsCallLogAccepted handles this case with default header values.
-
-Log delete request accepted
-*/
-type DeleteAppsAppCallsCallLogAccepted struct {
-}
-
-func (o *DeleteAppsAppCallsCallLogAccepted) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}/calls/{call}/log][%d] deleteAppsAppCallsCallLogAccepted ", 202)
-}
-
-func (o *DeleteAppsAppCallsCallLogAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- return nil
-}
-
-// NewDeleteAppsAppCallsCallLogNotFound creates a DeleteAppsAppCallsCallLogNotFound with default headers values
-func NewDeleteAppsAppCallsCallLogNotFound() *DeleteAppsAppCallsCallLogNotFound {
- return &DeleteAppsAppCallsCallLogNotFound{}
-}
-
-/*DeleteAppsAppCallsCallLogNotFound handles this case with default header values.
-
-Does not exist.
-*/
-type DeleteAppsAppCallsCallLogNotFound struct {
- Payload *models.Error
-}
-
-func (o *DeleteAppsAppCallsCallLogNotFound) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}/calls/{call}/log][%d] deleteAppsAppCallsCallLogNotFound %+v", 404, o.Payload)
-}
-
-func (o *DeleteAppsAppCallsCallLogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewDeleteAppsAppCallsCallLogDefault creates a DeleteAppsAppCallsCallLogDefault with default headers values
-func NewDeleteAppsAppCallsCallLogDefault(code int) *DeleteAppsAppCallsCallLogDefault {
- return &DeleteAppsAppCallsCallLogDefault{
- _statusCode: code,
- }
-}
-
-/*DeleteAppsAppCallsCallLogDefault handles this case with default header values.
-
-Unexpected error
-*/
-type DeleteAppsAppCallsCallLogDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the delete apps app calls call log default response
-func (o *DeleteAppsAppCallsCallLogDefault) Code() int {
- return o._statusCode
-}
-
-func (o *DeleteAppsAppCallsCallLogDefault) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}/calls/{call}/log][%d] DeleteAppsAppCallsCallLog default %+v", o._statusCode, o.Payload)
-}
-
-func (o *DeleteAppsAppCallsCallLogDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/delete_calls_call_log_parameters.go b/vendor/github.com/funcy/functions_go/client/operations/delete_calls_call_log_parameters.go
deleted file mode 100644
index 7746e5872..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/delete_calls_call_log_parameters.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewDeleteCallsCallLogParams creates a new DeleteCallsCallLogParams object
-// with the default values initialized.
-func NewDeleteCallsCallLogParams() *DeleteCallsCallLogParams {
- var ()
- return &DeleteCallsCallLogParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewDeleteCallsCallLogParamsWithTimeout creates a new DeleteCallsCallLogParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewDeleteCallsCallLogParamsWithTimeout(timeout time.Duration) *DeleteCallsCallLogParams {
- var ()
- return &DeleteCallsCallLogParams{
-
- timeout: timeout,
- }
-}
-
-// NewDeleteCallsCallLogParamsWithContext creates a new DeleteCallsCallLogParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewDeleteCallsCallLogParamsWithContext(ctx context.Context) *DeleteCallsCallLogParams {
- var ()
- return &DeleteCallsCallLogParams{
-
- Context: ctx,
- }
-}
-
-// NewDeleteCallsCallLogParamsWithHTTPClient creates a new DeleteCallsCallLogParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewDeleteCallsCallLogParamsWithHTTPClient(client *http.Client) *DeleteCallsCallLogParams {
- var ()
- return &DeleteCallsCallLogParams{
- HTTPClient: client,
- }
-}
-
-/*DeleteCallsCallLogParams contains all the parameters to send to the API endpoint
-for the delete calls call log operation typically these are written to a http.Request
-*/
-type DeleteCallsCallLogParams struct {
-
- /*Call
- Call ID.
-
- */
- Call string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the delete calls call log params
-func (o *DeleteCallsCallLogParams) WithTimeout(timeout time.Duration) *DeleteCallsCallLogParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the delete calls call log params
-func (o *DeleteCallsCallLogParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the delete calls call log params
-func (o *DeleteCallsCallLogParams) WithContext(ctx context.Context) *DeleteCallsCallLogParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the delete calls call log params
-func (o *DeleteCallsCallLogParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the delete calls call log params
-func (o *DeleteCallsCallLogParams) WithHTTPClient(client *http.Client) *DeleteCallsCallLogParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the delete calls call log params
-func (o *DeleteCallsCallLogParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithCall adds the call to the delete calls call log params
-func (o *DeleteCallsCallLogParams) WithCall(call string) *DeleteCallsCallLogParams {
- o.SetCall(call)
- return o
-}
-
-// SetCall adds the call to the delete calls call log params
-func (o *DeleteCallsCallLogParams) SetCall(call string) {
- o.Call = call
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *DeleteCallsCallLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param call
- if err := r.SetPathParam("call", o.Call); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/delete_calls_call_log_responses.go b/vendor/github.com/funcy/functions_go/client/operations/delete_calls_call_log_responses.go
deleted file mode 100644
index c7e62949b..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/delete_calls_call_log_responses.go
+++ /dev/null
@@ -1,138 +0,0 @@
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// DeleteCallsCallLogReader is a Reader for the DeleteCallsCallLog structure.
-type DeleteCallsCallLogReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *DeleteCallsCallLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 202:
- result := NewDeleteCallsCallLogAccepted()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewDeleteCallsCallLogNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewDeleteCallsCallLogDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewDeleteCallsCallLogAccepted creates a DeleteCallsCallLogAccepted with default headers values
-func NewDeleteCallsCallLogAccepted() *DeleteCallsCallLogAccepted {
- return &DeleteCallsCallLogAccepted{}
-}
-
-/*DeleteCallsCallLogAccepted handles this case with default header values.
-
-Log delete request accepted
-*/
-type DeleteCallsCallLogAccepted struct {
-}
-
-func (o *DeleteCallsCallLogAccepted) Error() string {
- return fmt.Sprintf("[DELETE /calls/{call}/log][%d] deleteCallsCallLogAccepted ", 202)
-}
-
-func (o *DeleteCallsCallLogAccepted) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- return nil
-}
-
-// NewDeleteCallsCallLogNotFound creates a DeleteCallsCallLogNotFound with default headers values
-func NewDeleteCallsCallLogNotFound() *DeleteCallsCallLogNotFound {
- return &DeleteCallsCallLogNotFound{}
-}
-
-/*DeleteCallsCallLogNotFound handles this case with default header values.
-
-Does not exist.
-*/
-type DeleteCallsCallLogNotFound struct {
- Payload *models.Error
-}
-
-func (o *DeleteCallsCallLogNotFound) Error() string {
- return fmt.Sprintf("[DELETE /calls/{call}/log][%d] deleteCallsCallLogNotFound %+v", 404, o.Payload)
-}
-
-func (o *DeleteCallsCallLogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewDeleteCallsCallLogDefault creates a DeleteCallsCallLogDefault with default headers values
-func NewDeleteCallsCallLogDefault(code int) *DeleteCallsCallLogDefault {
- return &DeleteCallsCallLogDefault{
- _statusCode: code,
- }
-}
-
-/*DeleteCallsCallLogDefault handles this case with default header values.
-
-Unexpected error
-*/
-type DeleteCallsCallLogDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the delete calls call log default response
-func (o *DeleteCallsCallLogDefault) Code() int {
- return o._statusCode
-}
-
-func (o *DeleteCallsCallLogDefault) Error() string {
- return fmt.Sprintf("[DELETE /calls/{call}/log][%d] DeleteCallsCallLog default %+v", o._statusCode, o.Payload)
-}
-
-func (o *DeleteCallsCallLogDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_parameters.go b/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_parameters.go
deleted file mode 100644
index a5cbff4cb..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_parameters.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsAppCallsCallLogParams creates a new GetAppsAppCallsCallLogParams object
-// with the default values initialized.
-func NewGetAppsAppCallsCallLogParams() *GetAppsAppCallsCallLogParams {
- var ()
- return &GetAppsAppCallsCallLogParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsAppCallsCallLogParamsWithTimeout creates a new GetAppsAppCallsCallLogParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsAppCallsCallLogParamsWithTimeout(timeout time.Duration) *GetAppsAppCallsCallLogParams {
- var ()
- return &GetAppsAppCallsCallLogParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsAppCallsCallLogParamsWithContext creates a new GetAppsAppCallsCallLogParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsAppCallsCallLogParamsWithContext(ctx context.Context) *GetAppsAppCallsCallLogParams {
- var ()
- return &GetAppsAppCallsCallLogParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsAppCallsCallLogParamsWithHTTPClient creates a new GetAppsAppCallsCallLogParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsAppCallsCallLogParamsWithHTTPClient(client *http.Client) *GetAppsAppCallsCallLogParams {
- var ()
- return &GetAppsAppCallsCallLogParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsAppCallsCallLogParams contains all the parameters to send to the API endpoint
-for the get apps app calls call log operation typically these are written to a http.Request
-*/
-type GetAppsAppCallsCallLogParams struct {
-
- /*App
- App Name
-
- */
- App string
- /*Call
- Call ID.
-
- */
- Call string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) WithTimeout(timeout time.Duration) *GetAppsAppCallsCallLogParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) WithContext(ctx context.Context) *GetAppsAppCallsCallLogParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) WithHTTPClient(client *http.Client) *GetAppsAppCallsCallLogParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) WithApp(app string) *GetAppsAppCallsCallLogParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) SetApp(app string) {
- o.App = app
-}
-
-// WithCall adds the call to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) WithCall(call string) *GetAppsAppCallsCallLogParams {
- o.SetCall(call)
- return o
-}
-
-// SetCall adds the call to the get apps app calls call log params
-func (o *GetAppsAppCallsCallLogParams) SetCall(call string) {
- o.Call = call
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsAppCallsCallLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- // path param call
- if err := r.SetPathParam("call", o.Call); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_responses.go b/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_responses.go
deleted file mode 100644
index 9b6d48660..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/get_apps_app_calls_call_log_responses.go
+++ /dev/null
@@ -1,103 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsAppCallsCallLogReader is a Reader for the GetAppsAppCallsCallLog structure.
-type GetAppsAppCallsCallLogReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsAppCallsCallLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsAppCallsCallLogOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetAppsAppCallsCallLogNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewGetAppsAppCallsCallLogOK creates a GetAppsAppCallsCallLogOK with default headers values
-func NewGetAppsAppCallsCallLogOK() *GetAppsAppCallsCallLogOK {
- return &GetAppsAppCallsCallLogOK{}
-}
-
-/*GetAppsAppCallsCallLogOK handles this case with default header values.
-
-Log found
-*/
-type GetAppsAppCallsCallLogOK struct {
- Payload *models.LogWrapper
-}
-
-func (o *GetAppsAppCallsCallLogOK) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls/{call}/log][%d] getAppsAppCallsCallLogOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsAppCallsCallLogOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.LogWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppCallsCallLogNotFound creates a GetAppsAppCallsCallLogNotFound with default headers values
-func NewGetAppsAppCallsCallLogNotFound() *GetAppsAppCallsCallLogNotFound {
- return &GetAppsAppCallsCallLogNotFound{}
-}
-
-/*GetAppsAppCallsCallLogNotFound handles this case with default header values.
-
-Log not found.
-*/
-type GetAppsAppCallsCallLogNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetAppsAppCallsCallLogNotFound) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/calls/{call}/log][%d] getAppsAppCallsCallLogNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetAppsAppCallsCallLogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/get_calls_call_log_parameters.go b/vendor/github.com/funcy/functions_go/client/operations/get_calls_call_log_parameters.go
deleted file mode 100644
index f8b08fea7..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/get_calls_call_log_parameters.go
+++ /dev/null
@@ -1,135 +0,0 @@
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetCallsCallLogParams creates a new GetCallsCallLogParams object
-// with the default values initialized.
-func NewGetCallsCallLogParams() *GetCallsCallLogParams {
- var ()
- return &GetCallsCallLogParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetCallsCallLogParamsWithTimeout creates a new GetCallsCallLogParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetCallsCallLogParamsWithTimeout(timeout time.Duration) *GetCallsCallLogParams {
- var ()
- return &GetCallsCallLogParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetCallsCallLogParamsWithContext creates a new GetCallsCallLogParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetCallsCallLogParamsWithContext(ctx context.Context) *GetCallsCallLogParams {
- var ()
- return &GetCallsCallLogParams{
-
- Context: ctx,
- }
-}
-
-// NewGetCallsCallLogParamsWithHTTPClient creates a new GetCallsCallLogParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetCallsCallLogParamsWithHTTPClient(client *http.Client) *GetCallsCallLogParams {
- var ()
- return &GetCallsCallLogParams{
- HTTPClient: client,
- }
-}
-
-/*GetCallsCallLogParams contains all the parameters to send to the API endpoint
-for the get calls call log operation typically these are written to a http.Request
-*/
-type GetCallsCallLogParams struct {
-
- /*Call
- Call ID.
-
- */
- Call string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get calls call log params
-func (o *GetCallsCallLogParams) WithTimeout(timeout time.Duration) *GetCallsCallLogParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get calls call log params
-func (o *GetCallsCallLogParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get calls call log params
-func (o *GetCallsCallLogParams) WithContext(ctx context.Context) *GetCallsCallLogParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get calls call log params
-func (o *GetCallsCallLogParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get calls call log params
-func (o *GetCallsCallLogParams) WithHTTPClient(client *http.Client) *GetCallsCallLogParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get calls call log params
-func (o *GetCallsCallLogParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithCall adds the call to the get calls call log params
-func (o *GetCallsCallLogParams) WithCall(call string) *GetCallsCallLogParams {
- o.SetCall(call)
- return o
-}
-
-// SetCall adds the call to the get calls call log params
-func (o *GetCallsCallLogParams) SetCall(call string) {
- o.Call = call
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetCallsCallLogParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param call
- if err := r.SetPathParam("call", o.Call); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/get_calls_call_log_responses.go b/vendor/github.com/funcy/functions_go/client/operations/get_calls_call_log_responses.go
deleted file mode 100644
index 08de49ccf..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/get_calls_call_log_responses.go
+++ /dev/null
@@ -1,101 +0,0 @@
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetCallsCallLogReader is a Reader for the GetCallsCallLog structure.
-type GetCallsCallLogReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetCallsCallLogReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetCallsCallLogOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetCallsCallLogNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewGetCallsCallLogOK creates a GetCallsCallLogOK with default headers values
-func NewGetCallsCallLogOK() *GetCallsCallLogOK {
- return &GetCallsCallLogOK{}
-}
-
-/*GetCallsCallLogOK handles this case with default header values.
-
-Log found
-*/
-type GetCallsCallLogOK struct {
- Payload *models.LogWrapper
-}
-
-func (o *GetCallsCallLogOK) Error() string {
- return fmt.Sprintf("[GET /calls/{call}/log][%d] getCallsCallLogOK %+v", 200, o.Payload)
-}
-
-func (o *GetCallsCallLogOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.LogWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetCallsCallLogNotFound creates a GetCallsCallLogNotFound with default headers values
-func NewGetCallsCallLogNotFound() *GetCallsCallLogNotFound {
- return &GetCallsCallLogNotFound{}
-}
-
-/*GetCallsCallLogNotFound handles this case with default header values.
-
-Log not found.
-*/
-type GetCallsCallLogNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetCallsCallLogNotFound) Error() string {
- return fmt.Sprintf("[GET /calls/{call}/log][%d] getCallsCallLogNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetCallsCallLogNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/operations/operations_client.go b/vendor/github.com/funcy/functions_go/client/operations/operations_client.go
deleted file mode 100644
index d035c6ae0..000000000
--- a/vendor/github.com/funcy/functions_go/client/operations/operations_client.go
+++ /dev/null
@@ -1,90 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package operations
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// New creates a new operations API client.
-func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
- return &Client{transport: transport, formats: formats}
-}
-
-/*
-Client for operations API
-*/
-type Client struct {
- transport runtime.ClientTransport
- formats strfmt.Registry
-}
-
-/*
-DeleteAppsAppCallsCallLog deletes call log entry
-
-Delete call log entry
-*/
-func (a *Client) DeleteAppsAppCallsCallLog(params *DeleteAppsAppCallsCallLogParams) (*DeleteAppsAppCallsCallLogAccepted, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewDeleteAppsAppCallsCallLogParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "DeleteAppsAppCallsCallLog",
- Method: "DELETE",
- PathPattern: "/apps/{app}/calls/{call}/log",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &DeleteAppsAppCallsCallLogReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*DeleteAppsAppCallsCallLogAccepted), nil
-
-}
-
-/*
-GetAppsAppCallsCallLog gets call logs
-
-Get call logs
-*/
-func (a *Client) GetAppsAppCallsCallLog(params *GetAppsAppCallsCallLogParams) (*GetAppsAppCallsCallLogOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetAppsAppCallsCallLogParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetAppsAppCallsCallLog",
- Method: "GET",
- PathPattern: "/apps/{app}/calls/{call}/log",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetAppsAppCallsCallLogReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetAppsAppCallsCallLogOK), nil
-
-}
-
-// SetTransport changes the transport on the client
-func (a *Client) SetTransport(transport runtime.ClientTransport) {
- a.transport = transport
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_parameters.go b/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_parameters.go
deleted file mode 100644
index 824aa05e1..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_parameters.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewDeleteAppsAppRoutesRouteParams creates a new DeleteAppsAppRoutesRouteParams object
-// with the default values initialized.
-func NewDeleteAppsAppRoutesRouteParams() *DeleteAppsAppRoutesRouteParams {
- var ()
- return &DeleteAppsAppRoutesRouteParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewDeleteAppsAppRoutesRouteParamsWithTimeout creates a new DeleteAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewDeleteAppsAppRoutesRouteParamsWithTimeout(timeout time.Duration) *DeleteAppsAppRoutesRouteParams {
- var ()
- return &DeleteAppsAppRoutesRouteParams{
-
- timeout: timeout,
- }
-}
-
-// NewDeleteAppsAppRoutesRouteParamsWithContext creates a new DeleteAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewDeleteAppsAppRoutesRouteParamsWithContext(ctx context.Context) *DeleteAppsAppRoutesRouteParams {
- var ()
- return &DeleteAppsAppRoutesRouteParams{
-
- Context: ctx,
- }
-}
-
-// NewDeleteAppsAppRoutesRouteParamsWithHTTPClient creates a new DeleteAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewDeleteAppsAppRoutesRouteParamsWithHTTPClient(client *http.Client) *DeleteAppsAppRoutesRouteParams {
- var ()
- return &DeleteAppsAppRoutesRouteParams{
- HTTPClient: client,
- }
-}
-
-/*DeleteAppsAppRoutesRouteParams contains all the parameters to send to the API endpoint
-for the delete apps app routes route operation typically these are written to a http.Request
-*/
-type DeleteAppsAppRoutesRouteParams struct {
-
- /*App
- Name of app for this set of routes.
-
- */
- App string
- /*Route
- Route name
-
- */
- Route string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) WithTimeout(timeout time.Duration) *DeleteAppsAppRoutesRouteParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) WithContext(ctx context.Context) *DeleteAppsAppRoutesRouteParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) WithHTTPClient(client *http.Client) *DeleteAppsAppRoutesRouteParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) WithApp(app string) *DeleteAppsAppRoutesRouteParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) SetApp(app string) {
- o.App = app
-}
-
-// WithRoute adds the route to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) WithRoute(route string) *DeleteAppsAppRoutesRouteParams {
- o.SetRoute(route)
- return o
-}
-
-// SetRoute adds the route to the delete apps app routes route params
-func (o *DeleteAppsAppRoutesRouteParams) SetRoute(route string) {
- o.Route = route
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *DeleteAppsAppRoutesRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- // path param route
- if err := r.SetPathParam("route", o.Route); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_responses.go b/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_responses.go
deleted file mode 100644
index 2896224a8..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/delete_apps_app_routes_route_responses.go
+++ /dev/null
@@ -1,140 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// DeleteAppsAppRoutesRouteReader is a Reader for the DeleteAppsAppRoutesRoute structure.
-type DeleteAppsAppRoutesRouteReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *DeleteAppsAppRoutesRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewDeleteAppsAppRoutesRouteOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewDeleteAppsAppRoutesRouteNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewDeleteAppsAppRoutesRouteDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewDeleteAppsAppRoutesRouteOK creates a DeleteAppsAppRoutesRouteOK with default headers values
-func NewDeleteAppsAppRoutesRouteOK() *DeleteAppsAppRoutesRouteOK {
- return &DeleteAppsAppRoutesRouteOK{}
-}
-
-/*DeleteAppsAppRoutesRouteOK handles this case with default header values.
-
-Route successfully deleted.
-*/
-type DeleteAppsAppRoutesRouteOK struct {
-}
-
-func (o *DeleteAppsAppRoutesRouteOK) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}/routes/{route}][%d] deleteAppsAppRoutesRouteOK ", 200)
-}
-
-func (o *DeleteAppsAppRoutesRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- return nil
-}
-
-// NewDeleteAppsAppRoutesRouteNotFound creates a DeleteAppsAppRoutesRouteNotFound with default headers values
-func NewDeleteAppsAppRoutesRouteNotFound() *DeleteAppsAppRoutesRouteNotFound {
- return &DeleteAppsAppRoutesRouteNotFound{}
-}
-
-/*DeleteAppsAppRoutesRouteNotFound handles this case with default header values.
-
-Route does not exist.
-*/
-type DeleteAppsAppRoutesRouteNotFound struct {
- Payload *models.Error
-}
-
-func (o *DeleteAppsAppRoutesRouteNotFound) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}/routes/{route}][%d] deleteAppsAppRoutesRouteNotFound %+v", 404, o.Payload)
-}
-
-func (o *DeleteAppsAppRoutesRouteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewDeleteAppsAppRoutesRouteDefault creates a DeleteAppsAppRoutesRouteDefault with default headers values
-func NewDeleteAppsAppRoutesRouteDefault(code int) *DeleteAppsAppRoutesRouteDefault {
- return &DeleteAppsAppRoutesRouteDefault{
- _statusCode: code,
- }
-}
-
-/*DeleteAppsAppRoutesRouteDefault handles this case with default header values.
-
-Unexpected error
-*/
-type DeleteAppsAppRoutesRouteDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the delete apps app routes route default response
-func (o *DeleteAppsAppRoutesRouteDefault) Code() int {
- return o._statusCode
-}
-
-func (o *DeleteAppsAppRoutesRouteDefault) Error() string {
- return fmt.Sprintf("[DELETE /apps/{app}/routes/{route}][%d] DeleteAppsAppRoutesRoute default %+v", o._statusCode, o.Payload)
-}
-
-func (o *DeleteAppsAppRoutesRouteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_parameters.go b/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_parameters.go
deleted file mode 100644
index 878241a5e..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_parameters.go
+++ /dev/null
@@ -1,137 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsAppRoutesParams creates a new GetAppsAppRoutesParams object
-// with the default values initialized.
-func NewGetAppsAppRoutesParams() *GetAppsAppRoutesParams {
- var ()
- return &GetAppsAppRoutesParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsAppRoutesParamsWithTimeout creates a new GetAppsAppRoutesParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsAppRoutesParamsWithTimeout(timeout time.Duration) *GetAppsAppRoutesParams {
- var ()
- return &GetAppsAppRoutesParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsAppRoutesParamsWithContext creates a new GetAppsAppRoutesParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsAppRoutesParamsWithContext(ctx context.Context) *GetAppsAppRoutesParams {
- var ()
- return &GetAppsAppRoutesParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsAppRoutesParamsWithHTTPClient creates a new GetAppsAppRoutesParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsAppRoutesParamsWithHTTPClient(client *http.Client) *GetAppsAppRoutesParams {
- var ()
- return &GetAppsAppRoutesParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsAppRoutesParams contains all the parameters to send to the API endpoint
-for the get apps app routes operation typically these are written to a http.Request
-*/
-type GetAppsAppRoutesParams struct {
-
- /*App
- Name of app for this set of routes.
-
- */
- App string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps app routes params
-func (o *GetAppsAppRoutesParams) WithTimeout(timeout time.Duration) *GetAppsAppRoutesParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps app routes params
-func (o *GetAppsAppRoutesParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps app routes params
-func (o *GetAppsAppRoutesParams) WithContext(ctx context.Context) *GetAppsAppRoutesParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps app routes params
-func (o *GetAppsAppRoutesParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps app routes params
-func (o *GetAppsAppRoutesParams) WithHTTPClient(client *http.Client) *GetAppsAppRoutesParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps app routes params
-func (o *GetAppsAppRoutesParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the get apps app routes params
-func (o *GetAppsAppRoutesParams) WithApp(app string) *GetAppsAppRoutesParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the get apps app routes params
-func (o *GetAppsAppRoutesParams) SetApp(app string) {
- o.App = app
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsAppRoutesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_responses.go b/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_responses.go
deleted file mode 100644
index 3236f3a4d..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_responses.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsAppRoutesReader is a Reader for the GetAppsAppRoutes structure.
-type GetAppsAppRoutesReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsAppRoutesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsAppRoutesOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetAppsAppRoutesNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewGetAppsAppRoutesDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewGetAppsAppRoutesOK creates a GetAppsAppRoutesOK with default headers values
-func NewGetAppsAppRoutesOK() *GetAppsAppRoutesOK {
- return &GetAppsAppRoutesOK{}
-}
-
-/*GetAppsAppRoutesOK handles this case with default header values.
-
-Route information
-*/
-type GetAppsAppRoutesOK struct {
- Payload *models.RoutesWrapper
-}
-
-func (o *GetAppsAppRoutesOK) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/routes][%d] getAppsAppRoutesOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsAppRoutesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.RoutesWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppRoutesNotFound creates a GetAppsAppRoutesNotFound with default headers values
-func NewGetAppsAppRoutesNotFound() *GetAppsAppRoutesNotFound {
- return &GetAppsAppRoutesNotFound{}
-}
-
-/*GetAppsAppRoutesNotFound handles this case with default header values.
-
-App does not exist.
-*/
-type GetAppsAppRoutesNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetAppsAppRoutesNotFound) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/routes][%d] getAppsAppRoutesNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetAppsAppRoutesNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppRoutesDefault creates a GetAppsAppRoutesDefault with default headers values
-func NewGetAppsAppRoutesDefault(code int) *GetAppsAppRoutesDefault {
- return &GetAppsAppRoutesDefault{
- _statusCode: code,
- }
-}
-
-/*GetAppsAppRoutesDefault handles this case with default header values.
-
-Unexpected error
-*/
-type GetAppsAppRoutesDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the get apps app routes default response
-func (o *GetAppsAppRoutesDefault) Code() int {
- return o._statusCode
-}
-
-func (o *GetAppsAppRoutesDefault) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/routes][%d] GetAppsAppRoutes default %+v", o._statusCode, o.Payload)
-}
-
-func (o *GetAppsAppRoutesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_parameters.go b/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_parameters.go
deleted file mode 100644
index aa42dc628..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_parameters.go
+++ /dev/null
@@ -1,158 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetAppsAppRoutesRouteParams creates a new GetAppsAppRoutesRouteParams object
-// with the default values initialized.
-func NewGetAppsAppRoutesRouteParams() *GetAppsAppRoutesRouteParams {
- var ()
- return &GetAppsAppRoutesRouteParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetAppsAppRoutesRouteParamsWithTimeout creates a new GetAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetAppsAppRoutesRouteParamsWithTimeout(timeout time.Duration) *GetAppsAppRoutesRouteParams {
- var ()
- return &GetAppsAppRoutesRouteParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetAppsAppRoutesRouteParamsWithContext creates a new GetAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetAppsAppRoutesRouteParamsWithContext(ctx context.Context) *GetAppsAppRoutesRouteParams {
- var ()
- return &GetAppsAppRoutesRouteParams{
-
- Context: ctx,
- }
-}
-
-// NewGetAppsAppRoutesRouteParamsWithHTTPClient creates a new GetAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetAppsAppRoutesRouteParamsWithHTTPClient(client *http.Client) *GetAppsAppRoutesRouteParams {
- var ()
- return &GetAppsAppRoutesRouteParams{
- HTTPClient: client,
- }
-}
-
-/*GetAppsAppRoutesRouteParams contains all the parameters to send to the API endpoint
-for the get apps app routes route operation typically these are written to a http.Request
-*/
-type GetAppsAppRoutesRouteParams struct {
-
- /*App
- Name of app for this set of routes.
-
- */
- App string
- /*Route
- Route name
-
- */
- Route string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) WithTimeout(timeout time.Duration) *GetAppsAppRoutesRouteParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) WithContext(ctx context.Context) *GetAppsAppRoutesRouteParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) WithHTTPClient(client *http.Client) *GetAppsAppRoutesRouteParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) WithApp(app string) *GetAppsAppRoutesRouteParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) SetApp(app string) {
- o.App = app
-}
-
-// WithRoute adds the route to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) WithRoute(route string) *GetAppsAppRoutesRouteParams {
- o.SetRoute(route)
- return o
-}
-
-// SetRoute adds the route to the get apps app routes route params
-func (o *GetAppsAppRoutesRouteParams) SetRoute(route string) {
- o.Route = route
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetAppsAppRoutesRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- // path param route
- if err := r.SetPathParam("route", o.Route); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_responses.go b/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_responses.go
deleted file mode 100644
index 87f64bf3e..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/get_apps_app_routes_route_responses.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetAppsAppRoutesRouteReader is a Reader for the GetAppsAppRoutesRoute structure.
-type GetAppsAppRoutesRouteReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetAppsAppRoutesRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetAppsAppRoutesRouteOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 404:
- result := NewGetAppsAppRoutesRouteNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewGetAppsAppRoutesRouteDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewGetAppsAppRoutesRouteOK creates a GetAppsAppRoutesRouteOK with default headers values
-func NewGetAppsAppRoutesRouteOK() *GetAppsAppRoutesRouteOK {
- return &GetAppsAppRoutesRouteOK{}
-}
-
-/*GetAppsAppRoutesRouteOK handles this case with default header values.
-
-Route information
-*/
-type GetAppsAppRoutesRouteOK struct {
- Payload *models.RouteWrapper
-}
-
-func (o *GetAppsAppRoutesRouteOK) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/routes/{route}][%d] getAppsAppRoutesRouteOK %+v", 200, o.Payload)
-}
-
-func (o *GetAppsAppRoutesRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.RouteWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppRoutesRouteNotFound creates a GetAppsAppRoutesRouteNotFound with default headers values
-func NewGetAppsAppRoutesRouteNotFound() *GetAppsAppRoutesRouteNotFound {
- return &GetAppsAppRoutesRouteNotFound{}
-}
-
-/*GetAppsAppRoutesRouteNotFound handles this case with default header values.
-
-Route does not exist.
-*/
-type GetAppsAppRoutesRouteNotFound struct {
- Payload *models.Error
-}
-
-func (o *GetAppsAppRoutesRouteNotFound) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/routes/{route}][%d] getAppsAppRoutesRouteNotFound %+v", 404, o.Payload)
-}
-
-func (o *GetAppsAppRoutesRouteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetAppsAppRoutesRouteDefault creates a GetAppsAppRoutesRouteDefault with default headers values
-func NewGetAppsAppRoutesRouteDefault(code int) *GetAppsAppRoutesRouteDefault {
- return &GetAppsAppRoutesRouteDefault{
- _statusCode: code,
- }
-}
-
-/*GetAppsAppRoutesRouteDefault handles this case with default header values.
-
-Unexpected error
-*/
-type GetAppsAppRoutesRouteDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the get apps app routes route default response
-func (o *GetAppsAppRoutesRouteDefault) Code() int {
- return o._statusCode
-}
-
-func (o *GetAppsAppRoutesRouteDefault) Error() string {
- return fmt.Sprintf("[GET /apps/{app}/routes/{route}][%d] GetAppsAppRoutesRoute default %+v", o._statusCode, o.Payload)
-}
-
-func (o *GetAppsAppRoutesRouteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_parameters.go b/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_parameters.go
deleted file mode 100644
index e62734c49..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_parameters.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// NewPatchAppsAppRoutesRouteParams creates a new PatchAppsAppRoutesRouteParams object
-// with the default values initialized.
-func NewPatchAppsAppRoutesRouteParams() *PatchAppsAppRoutesRouteParams {
- var ()
- return &PatchAppsAppRoutesRouteParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewPatchAppsAppRoutesRouteParamsWithTimeout creates a new PatchAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewPatchAppsAppRoutesRouteParamsWithTimeout(timeout time.Duration) *PatchAppsAppRoutesRouteParams {
- var ()
- return &PatchAppsAppRoutesRouteParams{
-
- timeout: timeout,
- }
-}
-
-// NewPatchAppsAppRoutesRouteParamsWithContext creates a new PatchAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewPatchAppsAppRoutesRouteParamsWithContext(ctx context.Context) *PatchAppsAppRoutesRouteParams {
- var ()
- return &PatchAppsAppRoutesRouteParams{
-
- Context: ctx,
- }
-}
-
-// NewPatchAppsAppRoutesRouteParamsWithHTTPClient creates a new PatchAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewPatchAppsAppRoutesRouteParamsWithHTTPClient(client *http.Client) *PatchAppsAppRoutesRouteParams {
- var ()
- return &PatchAppsAppRoutesRouteParams{
- HTTPClient: client,
- }
-}
-
-/*PatchAppsAppRoutesRouteParams contains all the parameters to send to the API endpoint
-for the patch apps app routes route operation typically these are written to a http.Request
-*/
-type PatchAppsAppRoutesRouteParams struct {
-
- /*App
- name of the app.
-
- */
- App string
- /*Body
- One route to post.
-
- */
- Body *models.RouteWrapper
- /*Route
- route path.
-
- */
- Route string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) WithTimeout(timeout time.Duration) *PatchAppsAppRoutesRouteParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) WithContext(ctx context.Context) *PatchAppsAppRoutesRouteParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) WithHTTPClient(client *http.Client) *PatchAppsAppRoutesRouteParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) WithApp(app string) *PatchAppsAppRoutesRouteParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) SetApp(app string) {
- o.App = app
-}
-
-// WithBody adds the body to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) WithBody(body *models.RouteWrapper) *PatchAppsAppRoutesRouteParams {
- o.SetBody(body)
- return o
-}
-
-// SetBody adds the body to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) SetBody(body *models.RouteWrapper) {
- o.Body = body
-}
-
-// WithRoute adds the route to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) WithRoute(route string) *PatchAppsAppRoutesRouteParams {
- o.SetRoute(route)
- return o
-}
-
-// SetRoute adds the route to the patch apps app routes route params
-func (o *PatchAppsAppRoutesRouteParams) SetRoute(route string) {
- o.Route = route
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *PatchAppsAppRoutesRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if o.Body == nil {
- o.Body = new(models.RouteWrapper)
- }
-
- if err := r.SetBodyParam(o.Body); err != nil {
- return err
- }
-
- // path param route
- if err := r.SetPathParam("route", o.Route); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_responses.go b/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_responses.go
deleted file mode 100644
index 885847015..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/patch_apps_app_routes_route_responses.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// PatchAppsAppRoutesRouteReader is a Reader for the PatchAppsAppRoutesRoute structure.
-type PatchAppsAppRoutesRouteReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *PatchAppsAppRoutesRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewPatchAppsAppRoutesRouteOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 400:
- result := NewPatchAppsAppRoutesRouteBadRequest()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- case 404:
- result := NewPatchAppsAppRoutesRouteNotFound()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewPatchAppsAppRoutesRouteDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewPatchAppsAppRoutesRouteOK creates a PatchAppsAppRoutesRouteOK with default headers values
-func NewPatchAppsAppRoutesRouteOK() *PatchAppsAppRoutesRouteOK {
- return &PatchAppsAppRoutesRouteOK{}
-}
-
-/*PatchAppsAppRoutesRouteOK handles this case with default header values.
-
-Route updated
-*/
-type PatchAppsAppRoutesRouteOK struct {
- Payload *models.RouteWrapper
-}
-
-func (o *PatchAppsAppRoutesRouteOK) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}/routes/{route}][%d] patchAppsAppRoutesRouteOK %+v", 200, o.Payload)
-}
-
-func (o *PatchAppsAppRoutesRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.RouteWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPatchAppsAppRoutesRouteBadRequest creates a PatchAppsAppRoutesRouteBadRequest with default headers values
-func NewPatchAppsAppRoutesRouteBadRequest() *PatchAppsAppRoutesRouteBadRequest {
- return &PatchAppsAppRoutesRouteBadRequest{}
-}
-
-/*PatchAppsAppRoutesRouteBadRequest handles this case with default header values.
-
-Invalid route due to parameters being missing or invalid.
-*/
-type PatchAppsAppRoutesRouteBadRequest struct {
- Payload *models.Error
-}
-
-func (o *PatchAppsAppRoutesRouteBadRequest) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}/routes/{route}][%d] patchAppsAppRoutesRouteBadRequest %+v", 400, o.Payload)
-}
-
-func (o *PatchAppsAppRoutesRouteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPatchAppsAppRoutesRouteNotFound creates a PatchAppsAppRoutesRouteNotFound with default headers values
-func NewPatchAppsAppRoutesRouteNotFound() *PatchAppsAppRoutesRouteNotFound {
- return &PatchAppsAppRoutesRouteNotFound{}
-}
-
-/*PatchAppsAppRoutesRouteNotFound handles this case with default header values.
-
-App / Route does not exist.
-*/
-type PatchAppsAppRoutesRouteNotFound struct {
- Payload *models.Error
-}
-
-func (o *PatchAppsAppRoutesRouteNotFound) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}/routes/{route}][%d] patchAppsAppRoutesRouteNotFound %+v", 404, o.Payload)
-}
-
-func (o *PatchAppsAppRoutesRouteNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPatchAppsAppRoutesRouteDefault creates a PatchAppsAppRoutesRouteDefault with default headers values
-func NewPatchAppsAppRoutesRouteDefault(code int) *PatchAppsAppRoutesRouteDefault {
- return &PatchAppsAppRoutesRouteDefault{
- _statusCode: code,
- }
-}
-
-/*PatchAppsAppRoutesRouteDefault handles this case with default header values.
-
-Unexpected error
-*/
-type PatchAppsAppRoutesRouteDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the patch apps app routes route default response
-func (o *PatchAppsAppRoutesRouteDefault) Code() int {
- return o._statusCode
-}
-
-func (o *PatchAppsAppRoutesRouteDefault) Error() string {
- return fmt.Sprintf("[PATCH /apps/{app}/routes/{route}][%d] PatchAppsAppRoutesRoute default %+v", o._statusCode, o.Payload)
-}
-
-func (o *PatchAppsAppRoutesRouteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_parameters.go b/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_parameters.go
deleted file mode 100644
index d7faa8b37..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_parameters.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// NewPostAppsAppRoutesParams creates a new PostAppsAppRoutesParams object
-// with the default values initialized.
-func NewPostAppsAppRoutesParams() *PostAppsAppRoutesParams {
- var ()
- return &PostAppsAppRoutesParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewPostAppsAppRoutesParamsWithTimeout creates a new PostAppsAppRoutesParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewPostAppsAppRoutesParamsWithTimeout(timeout time.Duration) *PostAppsAppRoutesParams {
- var ()
- return &PostAppsAppRoutesParams{
-
- timeout: timeout,
- }
-}
-
-// NewPostAppsAppRoutesParamsWithContext creates a new PostAppsAppRoutesParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewPostAppsAppRoutesParamsWithContext(ctx context.Context) *PostAppsAppRoutesParams {
- var ()
- return &PostAppsAppRoutesParams{
-
- Context: ctx,
- }
-}
-
-// NewPostAppsAppRoutesParamsWithHTTPClient creates a new PostAppsAppRoutesParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewPostAppsAppRoutesParamsWithHTTPClient(client *http.Client) *PostAppsAppRoutesParams {
- var ()
- return &PostAppsAppRoutesParams{
- HTTPClient: client,
- }
-}
-
-/*PostAppsAppRoutesParams contains all the parameters to send to the API endpoint
-for the post apps app routes operation typically these are written to a http.Request
-*/
-type PostAppsAppRoutesParams struct {
-
- /*App
- name of the app.
-
- */
- App string
- /*Body
- One route to post.
-
- */
- Body *models.RouteWrapper
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the post apps app routes params
-func (o *PostAppsAppRoutesParams) WithTimeout(timeout time.Duration) *PostAppsAppRoutesParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the post apps app routes params
-func (o *PostAppsAppRoutesParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the post apps app routes params
-func (o *PostAppsAppRoutesParams) WithContext(ctx context.Context) *PostAppsAppRoutesParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the post apps app routes params
-func (o *PostAppsAppRoutesParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the post apps app routes params
-func (o *PostAppsAppRoutesParams) WithHTTPClient(client *http.Client) *PostAppsAppRoutesParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the post apps app routes params
-func (o *PostAppsAppRoutesParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the post apps app routes params
-func (o *PostAppsAppRoutesParams) WithApp(app string) *PostAppsAppRoutesParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the post apps app routes params
-func (o *PostAppsAppRoutesParams) SetApp(app string) {
- o.App = app
-}
-
-// WithBody adds the body to the post apps app routes params
-func (o *PostAppsAppRoutesParams) WithBody(body *models.RouteWrapper) *PostAppsAppRoutesParams {
- o.SetBody(body)
- return o
-}
-
-// SetBody adds the body to the post apps app routes params
-func (o *PostAppsAppRoutesParams) SetBody(body *models.RouteWrapper) {
- o.Body = body
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *PostAppsAppRoutesParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if o.Body == nil {
- o.Body = new(models.RouteWrapper)
- }
-
- if err := r.SetBodyParam(o.Body); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_responses.go b/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_responses.go
deleted file mode 100644
index 93df10580..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/post_apps_app_routes_responses.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// PostAppsAppRoutesReader is a Reader for the PostAppsAppRoutes structure.
-type PostAppsAppRoutesReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *PostAppsAppRoutesReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewPostAppsAppRoutesOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 400:
- result := NewPostAppsAppRoutesBadRequest()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- case 409:
- result := NewPostAppsAppRoutesConflict()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewPostAppsAppRoutesDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewPostAppsAppRoutesOK creates a PostAppsAppRoutesOK with default headers values
-func NewPostAppsAppRoutesOK() *PostAppsAppRoutesOK {
- return &PostAppsAppRoutesOK{}
-}
-
-/*PostAppsAppRoutesOK handles this case with default header values.
-
-Route created
-*/
-type PostAppsAppRoutesOK struct {
- Payload *models.RouteWrapper
-}
-
-func (o *PostAppsAppRoutesOK) Error() string {
- return fmt.Sprintf("[POST /apps/{app}/routes][%d] postAppsAppRoutesOK %+v", 200, o.Payload)
-}
-
-func (o *PostAppsAppRoutesOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.RouteWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPostAppsAppRoutesBadRequest creates a PostAppsAppRoutesBadRequest with default headers values
-func NewPostAppsAppRoutesBadRequest() *PostAppsAppRoutesBadRequest {
- return &PostAppsAppRoutesBadRequest{}
-}
-
-/*PostAppsAppRoutesBadRequest handles this case with default header values.
-
-Invalid route due to parameters being missing or invalid.
-*/
-type PostAppsAppRoutesBadRequest struct {
- Payload *models.Error
-}
-
-func (o *PostAppsAppRoutesBadRequest) Error() string {
- return fmt.Sprintf("[POST /apps/{app}/routes][%d] postAppsAppRoutesBadRequest %+v", 400, o.Payload)
-}
-
-func (o *PostAppsAppRoutesBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPostAppsAppRoutesConflict creates a PostAppsAppRoutesConflict with default headers values
-func NewPostAppsAppRoutesConflict() *PostAppsAppRoutesConflict {
- return &PostAppsAppRoutesConflict{}
-}
-
-/*PostAppsAppRoutesConflict handles this case with default header values.
-
-Route already exists.
-*/
-type PostAppsAppRoutesConflict struct {
- Payload *models.Error
-}
-
-func (o *PostAppsAppRoutesConflict) Error() string {
- return fmt.Sprintf("[POST /apps/{app}/routes][%d] postAppsAppRoutesConflict %+v", 409, o.Payload)
-}
-
-func (o *PostAppsAppRoutesConflict) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPostAppsAppRoutesDefault creates a PostAppsAppRoutesDefault with default headers values
-func NewPostAppsAppRoutesDefault(code int) *PostAppsAppRoutesDefault {
- return &PostAppsAppRoutesDefault{
- _statusCode: code,
- }
-}
-
-/*PostAppsAppRoutesDefault handles this case with default header values.
-
-Unexpected error
-*/
-type PostAppsAppRoutesDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the post apps app routes default response
-func (o *PostAppsAppRoutesDefault) Code() int {
- return o._statusCode
-}
-
-func (o *PostAppsAppRoutesDefault) Error() string {
- return fmt.Sprintf("[POST /apps/{app}/routes][%d] PostAppsAppRoutes default %+v", o._statusCode, o.Payload)
-}
-
-func (o *PostAppsAppRoutesDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_parameters.go b/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_parameters.go
deleted file mode 100644
index 501a374d1..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_parameters.go
+++ /dev/null
@@ -1,184 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// NewPutAppsAppRoutesRouteParams creates a new PutAppsAppRoutesRouteParams object
-// with the default values initialized.
-func NewPutAppsAppRoutesRouteParams() *PutAppsAppRoutesRouteParams {
- var ()
- return &PutAppsAppRoutesRouteParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewPutAppsAppRoutesRouteParamsWithTimeout creates a new PutAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewPutAppsAppRoutesRouteParamsWithTimeout(timeout time.Duration) *PutAppsAppRoutesRouteParams {
- var ()
- return &PutAppsAppRoutesRouteParams{
-
- timeout: timeout,
- }
-}
-
-// NewPutAppsAppRoutesRouteParamsWithContext creates a new PutAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewPutAppsAppRoutesRouteParamsWithContext(ctx context.Context) *PutAppsAppRoutesRouteParams {
- var ()
- return &PutAppsAppRoutesRouteParams{
-
- Context: ctx,
- }
-}
-
-// NewPutAppsAppRoutesRouteParamsWithHTTPClient creates a new PutAppsAppRoutesRouteParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewPutAppsAppRoutesRouteParamsWithHTTPClient(client *http.Client) *PutAppsAppRoutesRouteParams {
- var ()
- return &PutAppsAppRoutesRouteParams{
- HTTPClient: client,
- }
-}
-
-/*PutAppsAppRoutesRouteParams contains all the parameters to send to the API endpoint
-for the put apps app routes route operation typically these are written to a http.Request
-*/
-type PutAppsAppRoutesRouteParams struct {
-
- /*App
- name of the app.
-
- */
- App string
- /*Body
- One route to post.
-
- */
- Body *models.RouteWrapper
- /*Route
- route path.
-
- */
- Route string
-
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) WithTimeout(timeout time.Duration) *PutAppsAppRoutesRouteParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) WithContext(ctx context.Context) *PutAppsAppRoutesRouteParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) WithHTTPClient(client *http.Client) *PutAppsAppRoutesRouteParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WithApp adds the app to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) WithApp(app string) *PutAppsAppRoutesRouteParams {
- o.SetApp(app)
- return o
-}
-
-// SetApp adds the app to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) SetApp(app string) {
- o.App = app
-}
-
-// WithBody adds the body to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) WithBody(body *models.RouteWrapper) *PutAppsAppRoutesRouteParams {
- o.SetBody(body)
- return o
-}
-
-// SetBody adds the body to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) SetBody(body *models.RouteWrapper) {
- o.Body = body
-}
-
-// WithRoute adds the route to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) WithRoute(route string) *PutAppsAppRoutesRouteParams {
- o.SetRoute(route)
- return o
-}
-
-// SetRoute adds the route to the put apps app routes route params
-func (o *PutAppsAppRoutesRouteParams) SetRoute(route string) {
- o.Route = route
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *PutAppsAppRoutesRouteParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- // path param app
- if err := r.SetPathParam("app", o.App); err != nil {
- return err
- }
-
- if o.Body == nil {
- o.Body = new(models.RouteWrapper)
- }
-
- if err := r.SetBodyParam(o.Body); err != nil {
- return err
- }
-
- // path param route
- if err := r.SetPathParam("route", o.Route); err != nil {
- return err
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_responses.go b/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_responses.go
deleted file mode 100644
index bcfd1dc30..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/put_apps_app_routes_route_responses.go
+++ /dev/null
@@ -1,148 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// PutAppsAppRoutesRouteReader is a Reader for the PutAppsAppRoutesRoute structure.
-type PutAppsAppRoutesRouteReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *PutAppsAppRoutesRouteReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewPutAppsAppRoutesRouteOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- case 400:
- result := NewPutAppsAppRoutesRouteBadRequest()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return nil, result
-
- default:
- result := NewPutAppsAppRoutesRouteDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewPutAppsAppRoutesRouteOK creates a PutAppsAppRoutesRouteOK with default headers values
-func NewPutAppsAppRoutesRouteOK() *PutAppsAppRoutesRouteOK {
- return &PutAppsAppRoutesRouteOK{}
-}
-
-/*PutAppsAppRoutesRouteOK handles this case with default header values.
-
-Route created or updated
-*/
-type PutAppsAppRoutesRouteOK struct {
- Payload *models.RouteWrapper
-}
-
-func (o *PutAppsAppRoutesRouteOK) Error() string {
- return fmt.Sprintf("[PUT /apps/{app}/routes/{route}][%d] putAppsAppRoutesRouteOK %+v", 200, o.Payload)
-}
-
-func (o *PutAppsAppRoutesRouteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.RouteWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPutAppsAppRoutesRouteBadRequest creates a PutAppsAppRoutesRouteBadRequest with default headers values
-func NewPutAppsAppRoutesRouteBadRequest() *PutAppsAppRoutesRouteBadRequest {
- return &PutAppsAppRoutesRouteBadRequest{}
-}
-
-/*PutAppsAppRoutesRouteBadRequest handles this case with default header values.
-
-Invalid route due to parameters being missing or invalid.
-*/
-type PutAppsAppRoutesRouteBadRequest struct {
- Payload *models.Error
-}
-
-func (o *PutAppsAppRoutesRouteBadRequest) Error() string {
- return fmt.Sprintf("[PUT /apps/{app}/routes/{route}][%d] putAppsAppRoutesRouteBadRequest %+v", 400, o.Payload)
-}
-
-func (o *PutAppsAppRoutesRouteBadRequest) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewPutAppsAppRoutesRouteDefault creates a PutAppsAppRoutesRouteDefault with default headers values
-func NewPutAppsAppRoutesRouteDefault(code int) *PutAppsAppRoutesRouteDefault {
- return &PutAppsAppRoutesRouteDefault{
- _statusCode: code,
- }
-}
-
-/*PutAppsAppRoutesRouteDefault handles this case with default header values.
-
-Unexpected error
-*/
-type PutAppsAppRoutesRouteDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the put apps app routes route default response
-func (o *PutAppsAppRoutesRouteDefault) Code() int {
- return o._statusCode
-}
-
-func (o *PutAppsAppRoutesRouteDefault) Error() string {
- return fmt.Sprintf("[PUT /apps/{app}/routes/{route}][%d] PutAppsAppRoutesRoute default %+v", o._statusCode, o.Payload)
-}
-
-func (o *PutAppsAppRoutesRouteDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/routes/routes_client.go b/vendor/github.com/funcy/functions_go/client/routes/routes_client.go
deleted file mode 100644
index ffc5d95b0..000000000
--- a/vendor/github.com/funcy/functions_go/client/routes/routes_client.go
+++ /dev/null
@@ -1,210 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package routes
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// New creates a new routes API client.
-func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
- return &Client{transport: transport, formats: formats}
-}
-
-/*
-Client for routes API
-*/
-type Client struct {
- transport runtime.ClientTransport
- formats strfmt.Registry
-}
-
-/*
-DeleteAppsAppRoutesRoute deletes the route
-
-Deletes the route.
-*/
-func (a *Client) DeleteAppsAppRoutesRoute(params *DeleteAppsAppRoutesRouteParams) (*DeleteAppsAppRoutesRouteOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewDeleteAppsAppRoutesRouteParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "DeleteAppsAppRoutesRoute",
- Method: "DELETE",
- PathPattern: "/apps/{app}/routes/{route}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &DeleteAppsAppRoutesRouteReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*DeleteAppsAppRoutesRouteOK), nil
-
-}
-
-/*
-GetAppsAppRoutes gets route list by app name
-
-This will list routes for a particular app.
-*/
-func (a *Client) GetAppsAppRoutes(params *GetAppsAppRoutesParams) (*GetAppsAppRoutesOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetAppsAppRoutesParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetAppsAppRoutes",
- Method: "GET",
- PathPattern: "/apps/{app}/routes",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetAppsAppRoutesReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetAppsAppRoutesOK), nil
-
-}
-
-/*
-GetAppsAppRoutesRoute gets route by name
-
-Gets a route by name.
-*/
-func (a *Client) GetAppsAppRoutesRoute(params *GetAppsAppRoutesRouteParams) (*GetAppsAppRoutesRouteOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetAppsAppRoutesRouteParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetAppsAppRoutesRoute",
- Method: "GET",
- PathPattern: "/apps/{app}/routes/{route}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetAppsAppRoutesRouteReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetAppsAppRoutesRouteOK), nil
-
-}
-
-/*
-PatchAppsAppRoutesRoute updates a route fails if the route or app does not exist accepts partial updates skips validation of zero values
-
-Update a route
-*/
-func (a *Client) PatchAppsAppRoutesRoute(params *PatchAppsAppRoutesRouteParams) (*PatchAppsAppRoutesRouteOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewPatchAppsAppRoutesRouteParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "PatchAppsAppRoutesRoute",
- Method: "PATCH",
- PathPattern: "/apps/{app}/routes/{route}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &PatchAppsAppRoutesRouteReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*PatchAppsAppRoutesRouteOK), nil
-
-}
-
-/*
-PostAppsAppRoutes creates new route
-
-Create a new route in an app, if app doesn't exists, it creates the app. Post does not skip validation of zero values.
-*/
-func (a *Client) PostAppsAppRoutes(params *PostAppsAppRoutesParams) (*PostAppsAppRoutesOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewPostAppsAppRoutesParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "PostAppsAppRoutes",
- Method: "POST",
- PathPattern: "/apps/{app}/routes",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &PostAppsAppRoutesReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*PostAppsAppRoutesOK), nil
-
-}
-
-/*
-PutAppsAppRoutesRoute creates a route if it does not exist update if it does will also create app if it does not exist put does not skip validation of zero values
-
-Update or Create a route
-*/
-func (a *Client) PutAppsAppRoutesRoute(params *PutAppsAppRoutesRouteParams) (*PutAppsAppRoutesRouteOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewPutAppsAppRoutesRouteParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "PutAppsAppRoutesRoute",
- Method: "PUT",
- PathPattern: "/apps/{app}/routes/{route}",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &PutAppsAppRoutesRouteReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*PutAppsAppRoutesRouteOK), nil
-
-}
-
-// SetTransport changes the transport on the client
-func (a *Client) SetTransport(transport runtime.ClientTransport) {
- a.transport = transport
-}
diff --git a/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go b/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go
deleted file mode 100644
index 5398ab931..000000000
--- a/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_parameters.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package tasks
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetTasksParams creates a new GetTasksParams object
-// with the default values initialized.
-func NewGetTasksParams() *GetTasksParams {
-
- return &GetTasksParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetTasksParamsWithTimeout creates a new GetTasksParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetTasksParamsWithTimeout(timeout time.Duration) *GetTasksParams {
-
- return &GetTasksParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetTasksParamsWithContext creates a new GetTasksParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetTasksParamsWithContext(ctx context.Context) *GetTasksParams {
-
- return &GetTasksParams{
-
- Context: ctx,
- }
-}
-
-// NewGetTasksParamsWithHTTPClient creates a new GetTasksParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetTasksParamsWithHTTPClient(client *http.Client) *GetTasksParams {
-
- return &GetTasksParams{
- HTTPClient: client,
- }
-}
-
-/*GetTasksParams contains all the parameters to send to the API endpoint
-for the get tasks operation typically these are written to a http.Request
-*/
-type GetTasksParams struct {
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get tasks params
-func (o *GetTasksParams) WithTimeout(timeout time.Duration) *GetTasksParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get tasks params
-func (o *GetTasksParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get tasks params
-func (o *GetTasksParams) WithContext(ctx context.Context) *GetTasksParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get tasks params
-func (o *GetTasksParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get tasks params
-func (o *GetTasksParams) WithHTTPClient(client *http.Client) *GetTasksParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get tasks params
-func (o *GetTasksParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetTasksParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go b/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go
deleted file mode 100644
index 4dee4b7f6..000000000
--- a/vendor/github.com/funcy/functions_go/client/tasks/get_tasks_responses.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package tasks
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetTasksReader is a Reader for the GetTasks structure.
-type GetTasksReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetTasksReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetTasksOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- default:
- result := NewGetTasksDefault(response.Code())
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- if response.Code()/100 == 2 {
- return result, nil
- }
- return nil, result
- }
-}
-
-// NewGetTasksOK creates a GetTasksOK with default headers values
-func NewGetTasksOK() *GetTasksOK {
- return &GetTasksOK{}
-}
-
-/*GetTasksOK handles this case with default header values.
-
-Task information
-*/
-type GetTasksOK struct {
- Payload *models.TaskWrapper
-}
-
-func (o *GetTasksOK) Error() string {
- return fmt.Sprintf("[GET /tasks][%d] getTasksOK %+v", 200, o.Payload)
-}
-
-func (o *GetTasksOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.TaskWrapper)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
-
-// NewGetTasksDefault creates a GetTasksDefault with default headers values
-func NewGetTasksDefault(code int) *GetTasksDefault {
- return &GetTasksDefault{
- _statusCode: code,
- }
-}
-
-/*GetTasksDefault handles this case with default header values.
-
-Unexpected error
-*/
-type GetTasksDefault struct {
- _statusCode int
-
- Payload *models.Error
-}
-
-// Code gets the status code for the get tasks default response
-func (o *GetTasksDefault) Code() int {
- return o._statusCode
-}
-
-func (o *GetTasksDefault) Error() string {
- return fmt.Sprintf("[GET /tasks][%d] GetTasks default %+v", o._statusCode, o.Payload)
-}
-
-func (o *GetTasksDefault) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Error)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go b/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go
deleted file mode 100644
index fdd690d61..000000000
--- a/vendor/github.com/funcy/functions_go/client/tasks/tasks_client.go
+++ /dev/null
@@ -1,60 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package tasks
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// New creates a new tasks API client.
-func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
- return &Client{transport: transport, formats: formats}
-}
-
-/*
-Client for tasks API
-*/
-type Client struct {
- transport runtime.ClientTransport
- formats strfmt.Registry
-}
-
-/*
-GetTasks gets next task
-
-Gets the next task in the queue, ready for processing. Consumers should start processing tasks in order. No other consumer can retrieve this task.
-*/
-func (a *Client) GetTasks(params *GetTasksParams) (*GetTasksOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetTasksParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetTasks",
- Method: "GET",
- PathPattern: "/tasks",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetTasksReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetTasksOK), nil
-
-}
-
-// SetTransport changes the transport on the client
-func (a *Client) SetTransport(transport runtime.ClientTransport) {
- a.transport = transport
-}
diff --git a/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go b/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go
deleted file mode 100644
index 062b0a2f8..000000000
--- a/vendor/github.com/funcy/functions_go/client/version/get_version_parameters.go
+++ /dev/null
@@ -1,114 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package version
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "net/http"
- "time"
-
- "golang.org/x/net/context"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/runtime"
- cr "github.com/go-openapi/runtime/client"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// NewGetVersionParams creates a new GetVersionParams object
-// with the default values initialized.
-func NewGetVersionParams() *GetVersionParams {
-
- return &GetVersionParams{
-
- timeout: cr.DefaultTimeout,
- }
-}
-
-// NewGetVersionParamsWithTimeout creates a new GetVersionParams object
-// with the default values initialized, and the ability to set a timeout on a request
-func NewGetVersionParamsWithTimeout(timeout time.Duration) *GetVersionParams {
-
- return &GetVersionParams{
-
- timeout: timeout,
- }
-}
-
-// NewGetVersionParamsWithContext creates a new GetVersionParams object
-// with the default values initialized, and the ability to set a context for a request
-func NewGetVersionParamsWithContext(ctx context.Context) *GetVersionParams {
-
- return &GetVersionParams{
-
- Context: ctx,
- }
-}
-
-// NewGetVersionParamsWithHTTPClient creates a new GetVersionParams object
-// with the default values initialized, and the ability to set a custom HTTPClient for a request
-func NewGetVersionParamsWithHTTPClient(client *http.Client) *GetVersionParams {
-
- return &GetVersionParams{
- HTTPClient: client,
- }
-}
-
-/*GetVersionParams contains all the parameters to send to the API endpoint
-for the get version operation typically these are written to a http.Request
-*/
-type GetVersionParams struct {
- timeout time.Duration
- Context context.Context
- HTTPClient *http.Client
-}
-
-// WithTimeout adds the timeout to the get version params
-func (o *GetVersionParams) WithTimeout(timeout time.Duration) *GetVersionParams {
- o.SetTimeout(timeout)
- return o
-}
-
-// SetTimeout adds the timeout to the get version params
-func (o *GetVersionParams) SetTimeout(timeout time.Duration) {
- o.timeout = timeout
-}
-
-// WithContext adds the context to the get version params
-func (o *GetVersionParams) WithContext(ctx context.Context) *GetVersionParams {
- o.SetContext(ctx)
- return o
-}
-
-// SetContext adds the context to the get version params
-func (o *GetVersionParams) SetContext(ctx context.Context) {
- o.Context = ctx
-}
-
-// WithHTTPClient adds the HTTPClient to the get version params
-func (o *GetVersionParams) WithHTTPClient(client *http.Client) *GetVersionParams {
- o.SetHTTPClient(client)
- return o
-}
-
-// SetHTTPClient adds the HTTPClient to the get version params
-func (o *GetVersionParams) SetHTTPClient(client *http.Client) {
- o.HTTPClient = client
-}
-
-// WriteToRequest writes these params to a swagger request
-func (o *GetVersionParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error {
-
- if err := r.SetTimeout(o.timeout); err != nil {
- return err
- }
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go b/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go
deleted file mode 100644
index 123a54b27..000000000
--- a/vendor/github.com/funcy/functions_go/client/version/get_version_responses.go
+++ /dev/null
@@ -1,67 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package version
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "fmt"
- "io"
-
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/funcy/functions_go/models"
-)
-
-// GetVersionReader is a Reader for the GetVersion structure.
-type GetVersionReader struct {
- formats strfmt.Registry
-}
-
-// ReadResponse reads a server response into the received o.
-func (o *GetVersionReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
- switch response.Code() {
-
- case 200:
- result := NewGetVersionOK()
- if err := result.readResponse(response, consumer, o.formats); err != nil {
- return nil, err
- }
- return result, nil
-
- default:
- return nil, runtime.NewAPIError("unknown error", response, response.Code())
- }
-}
-
-// NewGetVersionOK creates a GetVersionOK with default headers values
-func NewGetVersionOK() *GetVersionOK {
- return &GetVersionOK{}
-}
-
-/*GetVersionOK handles this case with default header values.
-
-Daemon version.
-*/
-type GetVersionOK struct {
- Payload *models.Version
-}
-
-func (o *GetVersionOK) Error() string {
- return fmt.Sprintf("[GET /version][%d] getVersionOK %+v", 200, o.Payload)
-}
-
-func (o *GetVersionOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
-
- o.Payload = new(models.Version)
-
- // response payload
- if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
- return err
- }
-
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/client/version/version_client.go b/vendor/github.com/funcy/functions_go/client/version/version_client.go
deleted file mode 100644
index 0624a0e2c..000000000
--- a/vendor/github.com/funcy/functions_go/client/version/version_client.go
+++ /dev/null
@@ -1,58 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package version
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "github.com/go-openapi/runtime"
-
- strfmt "github.com/go-openapi/strfmt"
-)
-
-// New creates a new version API client.
-func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client {
- return &Client{transport: transport, formats: formats}
-}
-
-/*
-Client for version API
-*/
-type Client struct {
- transport runtime.ClientTransport
- formats strfmt.Registry
-}
-
-/*
-GetVersion gets daemon version
-*/
-func (a *Client) GetVersion(params *GetVersionParams) (*GetVersionOK, error) {
- // TODO: Validate the params before sending
- if params == nil {
- params = NewGetVersionParams()
- }
-
- result, err := a.transport.Submit(&runtime.ClientOperation{
- ID: "GetVersion",
- Method: "GET",
- PathPattern: "/version",
- ProducesMediaTypes: []string{"application/json"},
- ConsumesMediaTypes: []string{"application/json"},
- Schemes: []string{"http", "https"},
- Params: params,
- Reader: &GetVersionReader{formats: a.formats},
- Context: params.Context,
- Client: params.HTTPClient,
- })
- if err != nil {
- return nil, err
- }
- return result.(*GetVersionOK), nil
-
-}
-
-// SetTransport changes the transport on the client
-func (a *Client) SetTransport(transport runtime.ClientTransport) {
- a.transport = transport
-}
diff --git a/vendor/github.com/funcy/functions_go/configuration.go b/vendor/github.com/funcy/functions_go/configuration.go
deleted file mode 100644
index b9ae04857..000000000
--- a/vendor/github.com/funcy/functions_go/configuration.go
+++ /dev/null
@@ -1,57 +0,0 @@
-package functions
-
-import (
- "encoding/base64"
- "net/http"
- "time"
-)
-
-
-type Configuration struct {
- UserName string `json:"userName,omitempty"`
- Password string `json:"password,omitempty"`
- APIKeyPrefix map[string]string `json:"APIKeyPrefix,omitempty"`
- APIKey map[string]string `json:"APIKey,omitempty"`
- Debug bool `json:"debug,omitempty"`
- DebugFile string `json:"debugFile,omitempty"`
- OAuthToken string `json:"oAuthToken,omitempty"`
- BasePath string `json:"basePath,omitempty"`
- Host string `json:"host,omitempty"`
- Scheme string `json:"scheme,omitempty"`
- AccessToken string `json:"accessToken,omitempty"`
- DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
- UserAgent string `json:"userAgent,omitempty"`
- APIClient *APIClient
- Transport *http.Transport
- Timeout *time.Duration `json:"timeout,omitempty"`
-}
-
-func NewConfiguration() *Configuration {
- cfg := &Configuration{
- BasePath: "https://127.0.0.1:8080/v1",
- DefaultHeader: make(map[string]string),
- APIKey: make(map[string]string),
- APIKeyPrefix: make(map[string]string),
- UserAgent: "Swagger-Codegen/0.1.28/go",
- APIClient: &APIClient{},
- }
-
- cfg.APIClient.config = cfg
- return cfg
-}
-
-func (c *Configuration) GetBasicAuthEncodedString() string {
- return base64.StdEncoding.EncodeToString([]byte(c.UserName + ":" + c.Password))
-}
-
-func (c *Configuration) AddDefaultHeader(key string, value string) {
- c.DefaultHeader[key] = value
-}
-
-func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string {
- if c.APIKeyPrefix[APIKeyIdentifier] != "" {
- return c.APIKeyPrefix[APIKeyIdentifier] + " " + c.APIKey[APIKeyIdentifier]
- }
-
- return c.APIKey[APIKeyIdentifier]
-}
diff --git a/vendor/github.com/funcy/functions_go/docs/App.md b/vendor/github.com/funcy/functions_go/docs/App.md
deleted file mode 100644
index c71afc8e3..000000000
--- a/vendor/github.com/funcy/functions_go/docs/App.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# App
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Name** | **string** | Name of this app. Must be different than the image name. Can ony contain alphanumeric, -, and _. | [optional] [default to null]
-**Config** | **map[string]string** | Application configuration | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/AppWrapper.md b/vendor/github.com/funcy/functions_go/docs/AppWrapper.md
deleted file mode 100644
index 719aff3ab..000000000
--- a/vendor/github.com/funcy/functions_go/docs/AppWrapper.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# AppWrapper
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**App** | [**App**](App.md) | | [default to null]
-**Error_** | [**ErrorBody**](ErrorBody.md) | | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/AppsApi.md b/vendor/github.com/funcy/functions_go/docs/AppsApi.md
deleted file mode 100644
index e4ae0bc5e..000000000
--- a/vendor/github.com/funcy/functions_go/docs/AppsApi.md
+++ /dev/null
@@ -1,156 +0,0 @@
-# \AppsApi
-
-All URIs are relative to *https://127.0.0.1:8080/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**AppsAppDelete**](AppsApi.md#AppsAppDelete) | **Delete** /apps/{app} | Delete an app.
-[**AppsAppGet**](AppsApi.md#AppsAppGet) | **Get** /apps/{app} | Get information for a app.
-[**AppsAppPatch**](AppsApi.md#AppsAppPatch) | **Patch** /apps/{app} | Updates an app.
-[**AppsGet**](AppsApi.md#AppsGet) | **Get** /apps | Get all app names.
-[**AppsPost**](AppsApi.md#AppsPost) | **Post** /apps | Post new app
-
-
-# **AppsAppDelete**
-> AppsAppDelete($app)
-
-Delete an app.
-
-Delete an app.
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| Name of the app. |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsAppGet**
-> AppWrapper AppsAppGet($app)
-
-Get information for a app.
-
-This gives more details about a app, such as statistics.
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| name of the app. |
-
-### Return type
-
-[**AppWrapper**](AppWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsAppPatch**
-> AppWrapper AppsAppPatch($app, $body)
-
-Updates an app.
-
-You can set app level settings here.
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| name of the app. |
- **body** | [**AppWrapper**](AppWrapper.md)| App to post. |
-
-### Return type
-
-[**AppWrapper**](AppWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsGet**
-> AppsWrapper AppsGet()
-
-Get all app names.
-
-Get a list of all the apps in the system.
-
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**AppsWrapper**](AppsWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsPost**
-> AppWrapper AppsPost($body)
-
-Post new app
-
-Insert a new app
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **body** | [**AppWrapper**](AppWrapper.md)| App to post. |
-
-### Return type
-
-[**AppWrapper**](AppWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/vendor/github.com/funcy/functions_go/docs/AppsWrapper.md b/vendor/github.com/funcy/functions_go/docs/AppsWrapper.md
deleted file mode 100644
index e6c4dee99..000000000
--- a/vendor/github.com/funcy/functions_go/docs/AppsWrapper.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# AppsWrapper
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Apps** | [**[]App**](App.md) | | [default to null]
-**Error_** | [**ErrorBody**](ErrorBody.md) | | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/ErrorBody.md b/vendor/github.com/funcy/functions_go/docs/ErrorBody.md
deleted file mode 100644
index 6c9f191c5..000000000
--- a/vendor/github.com/funcy/functions_go/docs/ErrorBody.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# ErrorBody
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Message** | **string** | | [optional] [default to null]
-**Fields** | **string** | | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/ModelError.md b/vendor/github.com/funcy/functions_go/docs/ModelError.md
deleted file mode 100644
index 5009b2c08..000000000
--- a/vendor/github.com/funcy/functions_go/docs/ModelError.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# ModelError
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Error_** | [**ErrorBody**](ErrorBody.md) | | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/NewTask.md b/vendor/github.com/funcy/functions_go/docs/NewTask.md
deleted file mode 100644
index c2f3819a6..000000000
--- a/vendor/github.com/funcy/functions_go/docs/NewTask.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# NewTask
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Image** | **string** | Name of Docker image to use. This is optional and can be used to override the image defined at the group level. | [default to null]
-**Payload** | **string** | Payload for the task. This is what you pass into each task to make it do something. | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/NewTasksWrapper.md b/vendor/github.com/funcy/functions_go/docs/NewTasksWrapper.md
deleted file mode 100644
index 47b0d1c27..000000000
--- a/vendor/github.com/funcy/functions_go/docs/NewTasksWrapper.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# NewTasksWrapper
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Tasks** | [**[]NewTask**](NewTask.md) | | [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/Route.md b/vendor/github.com/funcy/functions_go/docs/Route.md
deleted file mode 100644
index 7f2eaa550..000000000
--- a/vendor/github.com/funcy/functions_go/docs/Route.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# Route
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Path** | **string** | URL path that will be matched to this route | [optional] [default to null]
-**Image** | **string** | Name of Docker image to use in this route. You should include the image tag, which should be a version number, to be more accurate. Can be overridden on a per route basis with route.image. | [optional] [default to null]
-**Headers** | [**map[string][]string**](array.md) | Map of http headers that will be sent with the response | [optional] [default to null]
-**Memory** | **int64** | Max usable memory for this route (MiB). | [optional] [default to null]
-**Type_** | **string** | Route type | [optional] [default to null]
-**Format** | **string** | Payload format sent into function. | [optional] [default to null]
-**MaxConcurrency** | **int32** | Maximum number of hot containers concurrency | [optional] [default to null]
-**Config** | **map[string]string** | Route configuration - overrides application configuration | [optional] [default to null]
-**Timeout** | **int32** | Timeout for executions of this route. Value in Seconds | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/RouteWrapper.md b/vendor/github.com/funcy/functions_go/docs/RouteWrapper.md
deleted file mode 100644
index 665c54517..000000000
--- a/vendor/github.com/funcy/functions_go/docs/RouteWrapper.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# RouteWrapper
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Message** | **string** | | [optional] [default to null]
-**Error_** | [**ErrorBody**](ErrorBody.md) | | [optional] [default to null]
-**Route** | [**Route**](Route.md) | | [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/RoutesApi.md b/vendor/github.com/funcy/functions_go/docs/RoutesApi.md
deleted file mode 100644
index d0bb56e8b..000000000
--- a/vendor/github.com/funcy/functions_go/docs/RoutesApi.md
+++ /dev/null
@@ -1,163 +0,0 @@
-# \RoutesApi
-
-All URIs are relative to *https://127.0.0.1:8080/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**AppsAppRoutesGet**](RoutesApi.md#AppsAppRoutesGet) | **Get** /apps/{app}/routes | Get route list by app name.
-[**AppsAppRoutesPost**](RoutesApi.md#AppsAppRoutesPost) | **Post** /apps/{app}/routes | Create new Route
-[**AppsAppRoutesRouteDelete**](RoutesApi.md#AppsAppRoutesRouteDelete) | **Delete** /apps/{app}/routes/{route} | Deletes the route
-[**AppsAppRoutesRouteGet**](RoutesApi.md#AppsAppRoutesRouteGet) | **Get** /apps/{app}/routes/{route} | Gets route by name
-[**AppsAppRoutesRoutePatch**](RoutesApi.md#AppsAppRoutesRoutePatch) | **Patch** /apps/{app}/routes/{route} | Update a Route
-
-
-# **AppsAppRoutesGet**
-> RoutesWrapper AppsAppRoutesGet($app)
-
-Get route list by app name.
-
-This will list routes for a particular app.
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| Name of app for this set of routes. |
-
-### Return type
-
-[**RoutesWrapper**](RoutesWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsAppRoutesPost**
-> RouteWrapper AppsAppRoutesPost($app, $body)
-
-Create new Route
-
-Create a new route in an app, if app doesn't exists, it creates the app
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| name of the app. |
- **body** | [**RouteWrapper**](RouteWrapper.md)| One route to post. |
-
-### Return type
-
-[**RouteWrapper**](RouteWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsAppRoutesRouteDelete**
-> AppsAppRoutesRouteDelete($app, $route)
-
-Deletes the route
-
-Deletes the route.
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| Name of app for this set of routes. |
- **route** | **string**| Route name |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsAppRoutesRouteGet**
-> RouteWrapper AppsAppRoutesRouteGet($app, $route)
-
-Gets route by name
-
-Gets a route by name.
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| Name of app for this set of routes. |
- **route** | **string**| Route name |
-
-### Return type
-
-[**RouteWrapper**](RouteWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **AppsAppRoutesRoutePatch**
-> RouteWrapper AppsAppRoutesRoutePatch($app, $route, $body)
-
-Update a Route
-
-Update a route
-
-
-### Parameters
-
-Name | Type | Description | Notes
-------------- | ------------- | ------------- | -------------
- **app** | **string**| name of the app. |
- **route** | **string**| route path. |
- **body** | [**RouteWrapper**](RouteWrapper.md)| One route to post. |
-
-### Return type
-
-[**RouteWrapper**](RouteWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/vendor/github.com/funcy/functions_go/docs/RoutesWrapper.md b/vendor/github.com/funcy/functions_go/docs/RoutesWrapper.md
deleted file mode 100644
index fbb928aa4..000000000
--- a/vendor/github.com/funcy/functions_go/docs/RoutesWrapper.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# RoutesWrapper
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Routes** | [**[]Route**](Route.md) | | [default to null]
-**Error_** | [**ErrorBody**](ErrorBody.md) | | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/Task.md b/vendor/github.com/funcy/functions_go/docs/Task.md
deleted file mode 100644
index 8ef88a2b3..000000000
--- a/vendor/github.com/funcy/functions_go/docs/Task.md
+++ /dev/null
@@ -1,20 +0,0 @@
-# Task
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Image** | **string** | Name of Docker image to use. This is optional and can be used to override the image defined at the group level. | [default to null]
-**Payload** | **string** | Payload for the task. This is what you pass into each task to make it do something. | [optional] [default to null]
-**GroupName** | **string** | Group this task belongs to. | [optional] [default to null]
-**Error_** | **string** | The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log. | [optional] [default to null]
-**Reason** | **string** | Machine usable reason for task being in this state. Valid values for error status are `timeout | killed | bad_exit`. Valid values for cancelled status are `client_request`. For everything else, this is undefined. | [optional] [default to null]
-**CreatedAt** | [**time.Time**](time.Time.md) | Time when task was submitted. Always in UTC. | [optional] [default to null]
-**StartedAt** | [**time.Time**](time.Time.md) | Time when task started execution. Always in UTC. | [optional] [default to null]
-**CompletedAt** | [**time.Time**](time.Time.md) | Time when task completed, whether it was successul or failed. Always in UTC. | [optional] [default to null]
-**RetryOf** | **string** | If this field is set, then this task is a retry of the ID in this field. | [optional] [default to null]
-**RetryAt** | **string** | If this field is set, then this task was retried by the task referenced in this field. | [optional] [default to null]
-**EnvVars** | **map[string]string** | Env vars for the task. Comes from the ones set on the Group. | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/TaskWrapper.md b/vendor/github.com/funcy/functions_go/docs/TaskWrapper.md
deleted file mode 100644
index 2e749ec25..000000000
--- a/vendor/github.com/funcy/functions_go/docs/TaskWrapper.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# TaskWrapper
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Task** | [**Task**](Task.md) | | [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/TasksApi.md b/vendor/github.com/funcy/functions_go/docs/TasksApi.md
deleted file mode 100644
index 311cc7cc4..000000000
--- a/vendor/github.com/funcy/functions_go/docs/TasksApi.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# \TasksApi
-
-All URIs are relative to *https://127.0.0.1:8080/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**TasksGet**](TasksApi.md#TasksGet) | **Get** /tasks | Get next task.
-
-
-# **TasksGet**
-> TaskWrapper TasksGet()
-
-Get next task.
-
-Gets the next task in the queue, ready for processing. Consumers should start processing tasks in order. No other consumer can retrieve this task.
-
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**TaskWrapper**](TaskWrapper.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/vendor/github.com/funcy/functions_go/docs/TasksWrapper.md b/vendor/github.com/funcy/functions_go/docs/TasksWrapper.md
deleted file mode 100644
index 90a36a26b..000000000
--- a/vendor/github.com/funcy/functions_go/docs/TasksWrapper.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# TasksWrapper
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Tasks** | [**[]Task**](Task.md) | | [default to null]
-**Cursor** | **string** | Used to paginate results. If this is returned, pass it into the same query again to get more results. | [optional] [default to null]
-**Error_** | [**ErrorBody**](ErrorBody.md) | | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/Version.md b/vendor/github.com/funcy/functions_go/docs/Version.md
deleted file mode 100644
index fb09e432a..000000000
--- a/vendor/github.com/funcy/functions_go/docs/Version.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# Version
-
-## Properties
-Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
-**Version** | **string** | | [optional] [default to null]
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
-
-
diff --git a/vendor/github.com/funcy/functions_go/docs/VersionApi.md b/vendor/github.com/funcy/functions_go/docs/VersionApi.md
deleted file mode 100644
index 47b6d56e4..000000000
--- a/vendor/github.com/funcy/functions_go/docs/VersionApi.md
+++ /dev/null
@@ -1,33 +0,0 @@
-# \VersionApi
-
-All URIs are relative to *https://127.0.0.1:8080/v1*
-
-Method | HTTP request | Description
-------------- | ------------- | -------------
-[**VersionGet**](VersionApi.md#VersionGet) | **Get** /version | Get daemon version.
-
-
-# **VersionGet**
-> Version VersionGet()
-
-Get daemon version.
-
-
-### Parameters
-This endpoint does not need any parameter.
-
-### Return type
-
-[**Version**](Version.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
- - **Content-Type**: application/json
- - **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
diff --git a/vendor/github.com/funcy/functions_go/error_body.go b/vendor/github.com/funcy/functions_go/error_body.go
deleted file mode 100644
index e73e440b6..000000000
--- a/vendor/github.com/funcy/functions_go/error_body.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package functions
-
-type ErrorBody struct {
-
- Message string `json:"message,omitempty"`
-
- Fields string `json:"fields,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/git_push.sh b/vendor/github.com/funcy/functions_go/git_push.sh
deleted file mode 100644
index 6ca091b49..000000000
--- a/vendor/github.com/funcy/functions_go/git_push.sh
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/sh
-# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
-#
-# Usage example: /bin/sh ./git_push.sh wing328 swagger-petstore-perl "minor update"
-
-git_user_id=$1
-git_repo_id=$2
-release_note=$3
-
-if [ "$git_user_id" = "" ]; then
- git_user_id=""
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
-fi
-
-if [ "$git_repo_id" = "" ]; then
- git_repo_id=""
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
-fi
-
-if [ "$release_note" = "" ]; then
- release_note=""
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
-fi
-
-# Initialize the local directory as a Git repository
-git init
-
-# Adds the files in the local repository and stages them for commit.
-git add .
-
-# Commits the tracked changes and prepares them to be pushed to a remote repository.
-git commit -m "$release_note"
-
-# Sets the new remote
-git_remote=`git remote`
-if [ "$git_remote" = "" ]; then # git remote not defined
-
- if [ "$GIT_TOKEN" = "" ]; then
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git crediential in your environment."
- git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
- else
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
- fi
-
-fi
-
-git pull origin master
-
-# Pushes (Forces) the changes in the local repository up to the remote repository
-echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
-git push origin master 2>&1 | grep -v 'To https'
-
diff --git a/vendor/github.com/funcy/functions_go/glide.lock b/vendor/github.com/funcy/functions_go/glide.lock
deleted file mode 100644
index c8a9dd35d..000000000
--- a/vendor/github.com/funcy/functions_go/glide.lock
+++ /dev/null
@@ -1,55 +0,0 @@
-hash: fcf8f59eab23c579286280cd18a5b0a32b6136a896e07aad6a0002499d3d900a
-updated: 2016-12-07T08:51:17.664202292-08:00
-imports:
-- name: github.com/asaskevich/govalidator
- version: 7b3beb6df3c42abd3509abfc3bcacc0fbfb7c877
-- name: github.com/go-openapi/analysis
- version: 7222828b8ce19afee3c595aef6643b9e42150120
-- name: github.com/go-openapi/errors
- version: 49fe8b3a0e0d32a617d8d50c67f856ad6e45b28b
-- name: github.com/go-openapi/jsonpointer
- version: 8d96a2dc61536b690bd36b2e9df0b3c0b62825b2
-- name: github.com/go-openapi/jsonreference
- version: 36d33bfe519efae5632669801b180bf1a245da3b
-- name: github.com/go-openapi/loads
- version: 315567415dfd74b651f7a62cabfc82a57ed7b9ad
-- name: github.com/go-openapi/runtime
- version: 14b161b40ece9dac8e244ab2fde2d209e108c6f5
- subpackages:
- - client
-- name: github.com/go-openapi/spec
- version: f7ae86df5bc115a2744343016c789a89f065a4bd
-- name: github.com/go-openapi/strfmt
- version: 34fc3ba7c0f5fb615fda47a2b4fbd4c641b215f2
-- name: github.com/go-openapi/swag
- version: 3b6d86cd965820f968760d5d419cb4add096bdd7
-- name: github.com/go-openapi/validate
- version: 027696d4b54399770f1cdcc6c6daa56975f9e14e
-- name: github.com/go-resty/resty
- version: 24dc7ba4bc1ef9215048b28e7248f99c42901db5
-- name: github.com/mailru/easyjson
- version: 159cdb893c982e3d1bc6450322fedd514f9c9de3
- subpackages:
- - buffer
- - jlexer
- - jwriter
-- name: github.com/mitchellh/mapstructure
- version: f3009df150dadf309fdee4a54ed65c124afad715
-- name: github.com/PuerkitoBio/purell
- version: 0bcb03f4b4d0a9428594752bd2a3b9aa0a9d4bd4
-- name: github.com/PuerkitoBio/urlesc
- version: 5bd2802263f21d8788851d5305584c82a5c75d7e
-- name: golang.org/x/net
- version: f315505cf3349909cdf013ea56690da34e96a451
- subpackages:
- - context
- - context/ctxhttp
- - idna
- - publicsuffix
-- name: golang.org/x/text
- version: 5c6cf4f9a2357d38515014cea8c488ed22bdab90
- subpackages:
- - transform
- - unicode/norm
- - width
-testImports: []
diff --git a/vendor/github.com/funcy/functions_go/glide.yaml b/vendor/github.com/funcy/functions_go/glide.yaml
deleted file mode 100644
index 26d31b822..000000000
--- a/vendor/github.com/funcy/functions_go/glide.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
-package: github.com/funcy/functions_go
-import:
-- package: github.com/go-openapi/errors
-- package: github.com/go-openapi/runtime
- subpackages:
- - client
-- package: github.com/go-openapi/strfmt
-- package: github.com/go-openapi/swag
-- package: github.com/go-openapi/validate
-- package: github.com/go-resty/resty
-- package: golang.org/x/net
- subpackages:
- - context
diff --git a/vendor/github.com/funcy/functions_go/model_error.go b/vendor/github.com/funcy/functions_go/model_error.go
deleted file mode 100644
index 3abb3fa1f..000000000
--- a/vendor/github.com/funcy/functions_go/model_error.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package functions
-
-type ModelError struct {
-
- Error_ ErrorBody `json:"error,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/models/app.go b/vendor/github.com/funcy/functions_go/models/app.go
deleted file mode 100644
index 0c980ab98..000000000
--- a/vendor/github.com/funcy/functions_go/models/app.go
+++ /dev/null
@@ -1,53 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// App app
-// swagger:model App
-type App struct {
-
- // Application configuration
- Config map[string]string `json:"config,omitempty"`
-
- // Name of this app. Must be different than the image name. Can ony contain alphanumeric, -, and _.
- // Read Only: true
- Name string `json:"name,omitempty"`
-}
-
-// Validate validates this app
-func (m *App) Validate(formats strfmt.Registry) error {
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *App) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *App) UnmarshalBinary(b []byte) error {
- var res App
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/app_wrapper.go b/vendor/github.com/funcy/functions_go/models/app_wrapper.go
deleted file mode 100644
index 441f52879..000000000
--- a/vendor/github.com/funcy/functions_go/models/app_wrapper.go
+++ /dev/null
@@ -1,102 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// AppWrapper app wrapper
-// swagger:model AppWrapper
-type AppWrapper struct {
-
- // app
- // Required: true
- App *App `json:"app"`
-
- // error
- Error *ErrorBody `json:"error,omitempty"`
-}
-
-// Validate validates this app wrapper
-func (m *AppWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateApp(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateError(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *AppWrapper) validateApp(formats strfmt.Registry) error {
-
- if err := validate.Required("app", "body", m.App); err != nil {
- return err
- }
-
- if m.App != nil {
-
- if err := m.App.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("app")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *AppWrapper) validateError(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Error) { // not required
- return nil
- }
-
- if m.Error != nil {
-
- if err := m.Error.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("error")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *AppWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *AppWrapper) UnmarshalBinary(b []byte) error {
- var res AppWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/apps_wrapper.go b/vendor/github.com/funcy/functions_go/models/apps_wrapper.go
deleted file mode 100644
index a3052fa29..000000000
--- a/vendor/github.com/funcy/functions_go/models/apps_wrapper.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "strconv"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// AppsWrapper apps wrapper
-// swagger:model AppsWrapper
-type AppsWrapper struct {
-
- // apps
- // Required: true
- Apps []*App `json:"apps"`
-
- // error
- Error *ErrorBody `json:"error,omitempty"`
-}
-
-// Validate validates this apps wrapper
-func (m *AppsWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateApps(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateError(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *AppsWrapper) validateApps(formats strfmt.Registry) error {
-
- if err := validate.Required("apps", "body", m.Apps); err != nil {
- return err
- }
-
- for i := 0; i < len(m.Apps); i++ {
-
- if swag.IsZero(m.Apps[i]) { // not required
- continue
- }
-
- if m.Apps[i] != nil {
-
- if err := m.Apps[i].Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("apps" + "." + strconv.Itoa(i))
- }
- return err
- }
- }
-
- }
-
- return nil
-}
-
-func (m *AppsWrapper) validateError(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Error) { // not required
- return nil
- }
-
- if m.Error != nil {
-
- if err := m.Error.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("error")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *AppsWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *AppsWrapper) UnmarshalBinary(b []byte) error {
- var res AppsWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/call.go b/vendor/github.com/funcy/functions_go/models/call.go
deleted file mode 100644
index a1b59c5c2..000000000
--- a/vendor/github.com/funcy/functions_go/models/call.go
+++ /dev/null
@@ -1,74 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// Call call
-// swagger:model Call
-type Call struct {
-
- // App name that is assigned to a route that is being executed.
- // Read Only: true
- AppName string `json:"app_name,omitempty"`
-
- // Time when call completed, whether it was successul or failed. Always in UTC.
- // Read Only: true
- CompletedAt strfmt.DateTime `json:"completed_at,omitempty"`
-
- // Time when call was submitted. Always in UTC.
- // Read Only: true
- CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
-
- // Call UUID ID.
- // Read Only: true
- ID string `json:"id,omitempty"`
-
- // App route that is being executed.
- // Read Only: true
- Path string `json:"path,omitempty"`
-
- // Time when call started execution. Always in UTC.
- // Read Only: true
- StartedAt strfmt.DateTime `json:"started_at,omitempty"`
-
- // Call execution status.
- // Read Only: true
- Status string `json:"status,omitempty"`
-}
-
-// Validate validates this call
-func (m *Call) Validate(formats strfmt.Registry) error {
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Call) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Call) UnmarshalBinary(b []byte) error {
- var res Call
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/call_wrapper.go b/vendor/github.com/funcy/functions_go/models/call_wrapper.go
deleted file mode 100644
index 48594aeb2..000000000
--- a/vendor/github.com/funcy/functions_go/models/call_wrapper.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// CallWrapper call wrapper
-// swagger:model CallWrapper
-type CallWrapper struct {
-
- // Call object.
- // Required: true
- Call *Call `json:"call"`
-}
-
-// Validate validates this call wrapper
-func (m *CallWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateCall(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *CallWrapper) validateCall(formats strfmt.Registry) error {
-
- if err := validate.Required("call", "body", m.Call); err != nil {
- return err
- }
-
- if m.Call != nil {
-
- if err := m.Call.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("call")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *CallWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *CallWrapper) UnmarshalBinary(b []byte) error {
- var res CallWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/calls_wrapper.go b/vendor/github.com/funcy/functions_go/models/calls_wrapper.go
deleted file mode 100644
index 03b4edd24..000000000
--- a/vendor/github.com/funcy/functions_go/models/calls_wrapper.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "strconv"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// CallsWrapper calls wrapper
-// swagger:model CallsWrapper
-type CallsWrapper struct {
-
- // calls
- // Required: true
- Calls []*Call `json:"calls"`
-
- // error
- Error *ErrorBody `json:"error,omitempty"`
-}
-
-// Validate validates this calls wrapper
-func (m *CallsWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateCalls(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateError(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *CallsWrapper) validateCalls(formats strfmt.Registry) error {
-
- if err := validate.Required("calls", "body", m.Calls); err != nil {
- return err
- }
-
- for i := 0; i < len(m.Calls); i++ {
-
- if swag.IsZero(m.Calls[i]) { // not required
- continue
- }
-
- if m.Calls[i] != nil {
-
- if err := m.Calls[i].Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("calls" + "." + strconv.Itoa(i))
- }
- return err
- }
- }
-
- }
-
- return nil
-}
-
-func (m *CallsWrapper) validateError(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Error) { // not required
- return nil
- }
-
- if m.Error != nil {
-
- if err := m.Error.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("error")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *CallsWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *CallsWrapper) UnmarshalBinary(b []byte) error {
- var res CallsWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/error.go b/vendor/github.com/funcy/functions_go/models/error.go
deleted file mode 100644
index 00080eb53..000000000
--- a/vendor/github.com/funcy/functions_go/models/error.go
+++ /dev/null
@@ -1,73 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// Error error
-// swagger:model Error
-type Error struct {
-
- // error
- Error *ErrorBody `json:"error,omitempty"`
-}
-
-// Validate validates this error
-func (m *Error) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateError(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *Error) validateError(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Error) { // not required
- return nil
- }
-
- if m.Error != nil {
-
- if err := m.Error.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("error")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Error) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Error) UnmarshalBinary(b []byte) error {
- var res Error
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/error_body.go b/vendor/github.com/funcy/functions_go/models/error_body.go
deleted file mode 100644
index 2df71285c..000000000
--- a/vendor/github.com/funcy/functions_go/models/error_body.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// ErrorBody error body
-// swagger:model ErrorBody
-type ErrorBody struct {
-
- // fields
- // Read Only: true
- Fields string `json:"fields,omitempty"`
-
- // message
- // Read Only: true
- Message string `json:"message,omitempty"`
-}
-
-// Validate validates this error body
-func (m *ErrorBody) Validate(formats strfmt.Registry) error {
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *ErrorBody) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *ErrorBody) UnmarshalBinary(b []byte) error {
- var res ErrorBody
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/log.go b/vendor/github.com/funcy/functions_go/models/log.go
deleted file mode 100644
index 429a6c74a..000000000
--- a/vendor/github.com/funcy/functions_go/models/log.go
+++ /dev/null
@@ -1,52 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// Log log
-// swagger:model Log
-type Log struct {
-
- // Call UUID ID
- CallID string `json:"call_id,omitempty"`
-
- // log
- Log string `json:"log,omitempty"`
-}
-
-// Validate validates this log
-func (m *Log) Validate(formats strfmt.Registry) error {
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Log) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Log) UnmarshalBinary(b []byte) error {
- var res Log
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/log_wrapper.go b/vendor/github.com/funcy/functions_go/models/log_wrapper.go
deleted file mode 100644
index dbc1c8e21..000000000
--- a/vendor/github.com/funcy/functions_go/models/log_wrapper.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// LogWrapper log wrapper
-// swagger:model LogWrapper
-type LogWrapper struct {
-
- // Call log entry.
- // Required: true
- Log *Log `json:"log"`
-}
-
-// Validate validates this log wrapper
-func (m *LogWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateLog(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *LogWrapper) validateLog(formats strfmt.Registry) error {
-
- if err := validate.Required("log", "body", m.Log); err != nil {
- return err
- }
-
- if m.Log != nil {
-
- if err := m.Log.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("log")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *LogWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *LogWrapper) UnmarshalBinary(b []byte) error {
- var res LogWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/new_task.go b/vendor/github.com/funcy/functions_go/models/new_task.go
deleted file mode 100644
index 85469a4a5..000000000
--- a/vendor/github.com/funcy/functions_go/models/new_task.go
+++ /dev/null
@@ -1,66 +0,0 @@
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// NewTask new task
-// swagger:model NewTask
-type NewTask struct {
-
- // Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
- // Required: true
- Image *string `json:"image"`
-
- // Payload for the task. This is what you pass into each task to make it do something.
- Payload string `json:"payload,omitempty"`
-}
-
-// Validate validates this new task
-func (m *NewTask) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateImage(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *NewTask) validateImage(formats strfmt.Registry) error {
-
- if err := validate.Required("image", "body", m.Image); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *NewTask) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *NewTask) UnmarshalBinary(b []byte) error {
- var res NewTask
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/route.go b/vendor/github.com/funcy/functions_go/models/route.go
deleted file mode 100644
index 4aa3b430f..000000000
--- a/vendor/github.com/funcy/functions_go/models/route.go
+++ /dev/null
@@ -1,189 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "encoding/json"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// Route route
-// swagger:model Route
-type Route struct {
-
- // Route configuration - overrides application configuration
- Config map[string]string `json:"config,omitempty"`
-
- // Payload format sent into function.
- Format string `json:"format,omitempty"`
-
- // Map of http headers that will be sent with the response
- Headers map[string][]string `json:"headers,omitempty"`
-
- // Hot functions idle timeout before termination. Value in Seconds
- IDLETimeout *int32 `json:"idle_timeout,omitempty"`
-
- // Name of Docker image to use in this route. You should include the image tag, which should be a version number, to be more accurate. Can be overridden on a per route basis with route.image.
- Image string `json:"image,omitempty"`
-
- // Max usable memory for this route (MiB).
- Memory uint64 `json:"memory,omitempty"`
-
- // URL path that will be matched to this route
- // Read Only: true
- Path string `json:"path,omitempty"`
-
- // Timeout for executions of this route. Value in Seconds
- Timeout *int32 `json:"timeout,omitempty"`
-
- // Route type
- Type string `json:"type,omitempty"`
-}
-
-// Validate validates this route
-func (m *Route) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateFormat(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateHeaders(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateType(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-var routeTypeFormatPropEnum []interface{}
-
-func init() {
- var res []string
- if err := json.Unmarshal([]byte(`["default","http","json"]`), &res); err != nil {
- panic(err)
- }
- for _, v := range res {
- routeTypeFormatPropEnum = append(routeTypeFormatPropEnum, v)
- }
-}
-
-const (
- // RouteFormatDefault captures enum value "default"
- RouteFormatDefault string = "default"
- // RouteFormatHTTP captures enum value "http"
- RouteFormatHTTP string = "http"
- // RouteFormatJSON captures enum value "json"
- RouteFormatJSON string = "json"
-)
-
-// prop value enum
-func (m *Route) validateFormatEnum(path, location string, value string) error {
- if err := validate.Enum(path, location, value, routeTypeFormatPropEnum); err != nil {
- return err
- }
- return nil
-}
-
-func (m *Route) validateFormat(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Format) { // not required
- return nil
- }
-
- // value enum
- if err := m.validateFormatEnum("format", "body", m.Format); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *Route) validateHeaders(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Headers) { // not required
- return nil
- }
-
- if swag.IsZero(m.Headers) { // not required
- return nil
- }
-
- return nil
-}
-
-var routeTypeTypePropEnum []interface{}
-
-func init() {
- var res []string
- if err := json.Unmarshal([]byte(`["sync","async"]`), &res); err != nil {
- panic(err)
- }
- for _, v := range res {
- routeTypeTypePropEnum = append(routeTypeTypePropEnum, v)
- }
-}
-
-const (
- // RouteTypeSync captures enum value "sync"
- RouteTypeSync string = "sync"
- // RouteTypeAsync captures enum value "async"
- RouteTypeAsync string = "async"
-)
-
-// prop value enum
-func (m *Route) validateTypeEnum(path, location string, value string) error {
- if err := validate.Enum(path, location, value, routeTypeTypePropEnum); err != nil {
- return err
- }
- return nil
-}
-
-func (m *Route) validateType(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Type) { // not required
- return nil
- }
-
- // value enum
- if err := m.validateTypeEnum("type", "body", m.Type); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Route) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Route) UnmarshalBinary(b []byte) error {
- var res Route
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/route_wrapper.go b/vendor/github.com/funcy/functions_go/models/route_wrapper.go
deleted file mode 100644
index 1de7cd4cf..000000000
--- a/vendor/github.com/funcy/functions_go/models/route_wrapper.go
+++ /dev/null
@@ -1,105 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// RouteWrapper route wrapper
-// swagger:model RouteWrapper
-type RouteWrapper struct {
-
- // error
- Error *ErrorBody `json:"error,omitempty"`
-
- // message
- Message string `json:"message,omitempty"`
-
- // route
- // Required: true
- Route *Route `json:"route"`
-}
-
-// Validate validates this route wrapper
-func (m *RouteWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateError(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateRoute(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *RouteWrapper) validateError(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Error) { // not required
- return nil
- }
-
- if m.Error != nil {
-
- if err := m.Error.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("error")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *RouteWrapper) validateRoute(formats strfmt.Registry) error {
-
- if err := validate.Required("route", "body", m.Route); err != nil {
- return err
- }
-
- if m.Route != nil {
-
- if err := m.Route.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("route")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *RouteWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *RouteWrapper) UnmarshalBinary(b []byte) error {
- var res RouteWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/routes_wrapper.go b/vendor/github.com/funcy/functions_go/models/routes_wrapper.go
deleted file mode 100644
index a65aee1a3..000000000
--- a/vendor/github.com/funcy/functions_go/models/routes_wrapper.go
+++ /dev/null
@@ -1,112 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "strconv"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// RoutesWrapper routes wrapper
-// swagger:model RoutesWrapper
-type RoutesWrapper struct {
-
- // error
- Error *ErrorBody `json:"error,omitempty"`
-
- // routes
- // Required: true
- Routes []*Route `json:"routes"`
-}
-
-// Validate validates this routes wrapper
-func (m *RoutesWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateError(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateRoutes(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *RoutesWrapper) validateError(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Error) { // not required
- return nil
- }
-
- if m.Error != nil {
-
- if err := m.Error.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("error")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *RoutesWrapper) validateRoutes(formats strfmt.Registry) error {
-
- if err := validate.Required("routes", "body", m.Routes); err != nil {
- return err
- }
-
- for i := 0; i < len(m.Routes); i++ {
-
- if swag.IsZero(m.Routes[i]) { // not required
- continue
- }
-
- if m.Routes[i] != nil {
-
- if err := m.Routes[i].Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("routes" + "." + strconv.Itoa(i))
- }
- return err
- }
- }
-
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *RoutesWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *RoutesWrapper) UnmarshalBinary(b []byte) error {
- var res RoutesWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/task.go b/vendor/github.com/funcy/functions_go/models/task.go
deleted file mode 100644
index f265c99d7..000000000
--- a/vendor/github.com/funcy/functions_go/models/task.go
+++ /dev/null
@@ -1,155 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- "encoding/json"
-
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// Task task
-// swagger:model Task
-type Task struct {
-
- // Time when task completed, whether it was successul or failed. Always in UTC.
- CompletedAt strfmt.DateTime `json:"completed_at,omitempty"`
-
- // Time when task was submitted. Always in UTC.
- // Read Only: true
- CreatedAt strfmt.DateTime `json:"created_at,omitempty"`
-
- // Env vars for the task. Comes from the ones set on the Group.
- EnvVars map[string]string `json:"env_vars,omitempty"`
-
- // The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log.
- Error string `json:"error,omitempty"`
-
- // Group this task belongs to.
- // Read Only: true
- GroupName string `json:"group_name,omitempty"`
-
- // Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
- // Required: true
- Image *string `json:"image"`
-
- // Payload for the task. This is what you pass into each task to make it do something.
- Payload string `json:"payload,omitempty"`
-
- // Machine usable reason for task being in this state.
- // Valid values for error status are `timeout | killed | bad_exit`.
- // Valid values for cancelled status are `client_request`.
- // For everything else, this is undefined.
- //
- Reason string `json:"reason,omitempty"`
-
- // If this field is set, then this task was retried by the task referenced in this field.
- // Read Only: true
- RetryAt string `json:"retry_at,omitempty"`
-
- // If this field is set, then this task is a retry of the ID in this field.
- // Read Only: true
- RetryOf string `json:"retry_of,omitempty"`
-
- // Time when task started execution. Always in UTC.
- StartedAt strfmt.DateTime `json:"started_at,omitempty"`
-}
-
-// Validate validates this task
-func (m *Task) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateImage(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if err := m.validateReason(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *Task) validateImage(formats strfmt.Registry) error {
-
- if err := validate.Required("image", "body", m.Image); err != nil {
- return err
- }
-
- return nil
-}
-
-var taskTypeReasonPropEnum []interface{}
-
-func init() {
- var res []string
- if err := json.Unmarshal([]byte(`["timeout","killed","bad_exit","client_request"]`), &res); err != nil {
- panic(err)
- }
- for _, v := range res {
- taskTypeReasonPropEnum = append(taskTypeReasonPropEnum, v)
- }
-}
-
-const (
- // TaskReasonTimeout captures enum value "timeout"
- TaskReasonTimeout string = "timeout"
- // TaskReasonKilled captures enum value "killed"
- TaskReasonKilled string = "killed"
- // TaskReasonBadExit captures enum value "bad_exit"
- TaskReasonBadExit string = "bad_exit"
- // TaskReasonClientRequest captures enum value "client_request"
- TaskReasonClientRequest string = "client_request"
-)
-
-// prop value enum
-func (m *Task) validateReasonEnum(path, location string, value string) error {
- if err := validate.Enum(path, location, value, taskTypeReasonPropEnum); err != nil {
- return err
- }
- return nil
-}
-
-func (m *Task) validateReason(formats strfmt.Registry) error {
-
- if swag.IsZero(m.Reason) { // not required
- return nil
- }
-
- // value enum
- if err := m.validateReasonEnum("reason", "body", m.Reason); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Task) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Task) UnmarshalBinary(b []byte) error {
- var res Task
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/task_wrapper.go b/vendor/github.com/funcy/functions_go/models/task_wrapper.go
deleted file mode 100644
index 099d162ba..000000000
--- a/vendor/github.com/funcy/functions_go/models/task_wrapper.go
+++ /dev/null
@@ -1,75 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
- "github.com/go-openapi/validate"
-)
-
-// TaskWrapper task wrapper
-// swagger:model TaskWrapper
-type TaskWrapper struct {
-
- // task
- // Required: true
- Task *Task `json:"task"`
-}
-
-// Validate validates this task wrapper
-func (m *TaskWrapper) Validate(formats strfmt.Registry) error {
- var res []error
-
- if err := m.validateTask(formats); err != nil {
- // prop
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *TaskWrapper) validateTask(formats strfmt.Registry) error {
-
- if err := validate.Required("task", "body", m.Task); err != nil {
- return err
- }
-
- if m.Task != nil {
-
- if err := m.Task.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("task")
- }
- return err
- }
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *TaskWrapper) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *TaskWrapper) UnmarshalBinary(b []byte) error {
- var res TaskWrapper
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/models/version.go b/vendor/github.com/funcy/functions_go/models/version.go
deleted file mode 100644
index db845cf27..000000000
--- a/vendor/github.com/funcy/functions_go/models/version.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Code generated by go-swagger; DO NOT EDIT.
-
-package models
-
-// This file was generated by the swagger tool.
-// Editing this file might prove futile when you re-run the swagger generate command
-
-import (
- strfmt "github.com/go-openapi/strfmt"
-
- "github.com/go-openapi/errors"
- "github.com/go-openapi/swag"
-)
-
-// Version version
-// swagger:model Version
-type Version struct {
-
- // version
- // Read Only: true
- Version string `json:"version,omitempty"`
-}
-
-// Validate validates this version
-func (m *Version) Validate(formats strfmt.Registry) error {
- var res []error
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *Version) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *Version) UnmarshalBinary(b []byte) error {
- var res Version
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}
diff --git a/vendor/github.com/funcy/functions_go/new_task.go b/vendor/github.com/funcy/functions_go/new_task.go
deleted file mode 100644
index b31c11083..000000000
--- a/vendor/github.com/funcy/functions_go/new_task.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package functions
-
-type NewTask struct {
-
- // Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
- Image string `json:"image,omitempty"`
-
- // Payload for the task. This is what you pass into each task to make it do something.
- Payload string `json:"payload,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/new_tasks_wrapper.go b/vendor/github.com/funcy/functions_go/new_tasks_wrapper.go
deleted file mode 100644
index 7132344d3..000000000
--- a/vendor/github.com/funcy/functions_go/new_tasks_wrapper.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package functions
-
-type NewTasksWrapper struct {
-
- Tasks []NewTask `json:"tasks,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/pom.xml b/vendor/github.com/funcy/functions_go/pom.xml
deleted file mode 100644
index 029480f5d..000000000
--- a/vendor/github.com/funcy/functions_go/pom.xml
+++ /dev/null
@@ -1,75 +0,0 @@
-
- 4.0.0
- com.wordnik
- Gofunctions
- pom
- 0.1.0
- Gofunctions
-
-
-
- maven-dependency-plugin
-
-
- package
-
- copy-dependencies
-
-
- ${project.build.directory}
-
-
-
-
-
- org.codehaus.mojo
- exec-maven-plugin
- 1.2.1
-
-
- go-get-testify
- pre-integration-test
-
- exec
-
-
- go
-
- get
- github.com/stretchr/testify/assert
-
-
-
-
- go-get-sling
- pre-integration-test
-
- exec
-
-
- go
-
- get
- github.com/dghubble/sling
-
-
-
-
- go-test
- integration-test
-
- exec
-
-
- go
-
- test
- -v
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/vendor/github.com/funcy/functions_go/route.go b/vendor/github.com/funcy/functions_go/route.go
deleted file mode 100644
index 2b1af02b8..000000000
--- a/vendor/github.com/funcy/functions_go/route.go
+++ /dev/null
@@ -1,31 +0,0 @@
-package functions
-
-type Route struct {
-
- // URL path that will be matched to this route
- Path string `json:"path,omitempty"`
-
- // Name of Docker image to use in this route. You should include the image tag, which should be a version number, to be more accurate. Can be overridden on a per route basis with route.image.
- Image string `json:"image,omitempty"`
-
- // Map of http headers that will be sent with the response
- Headers map[string][]string `json:"headers,omitempty"`
-
- // Max usable memory for this route (MiB).
- Memory int64 `json:"memory,omitempty"`
-
- // Route type
- Type_ string `json:"type,omitempty"`
-
- // Payload format sent into function.
- Format string `json:"format,omitempty"`
-
- // Maximum number of hot containers concurrency
- MaxConcurrency int32 `json:"max_concurrency,omitempty"`
-
- // Route configuration - overrides application configuration
- Config map[string]string `json:"config,omitempty"`
-
- // Timeout for executions of this route. Value in Seconds
- Timeout int32 `json:"timeout,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/route_wrapper.go b/vendor/github.com/funcy/functions_go/route_wrapper.go
deleted file mode 100644
index 3763bab49..000000000
--- a/vendor/github.com/funcy/functions_go/route_wrapper.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package functions
-
-type RouteWrapper struct {
-
- Message string `json:"message,omitempty"`
-
- Error_ ErrorBody `json:"error,omitempty"`
-
- Route Route `json:"route,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/routes_api.go b/vendor/github.com/funcy/functions_go/routes_api.go
deleted file mode 100644
index f9b3b0018..000000000
--- a/vendor/github.com/funcy/functions_go/routes_api.go
+++ /dev/null
@@ -1,344 +0,0 @@
-package functions
-
-import (
- "net/url"
- "strings"
- "encoding/json"
- "fmt"
-)
-
-type RoutesApi struct {
- Configuration *Configuration
-}
-
-func NewRoutesApi() *RoutesApi {
- configuration := NewConfiguration()
- return &RoutesApi{
- Configuration: configuration,
- }
-}
-
-func NewRoutesApiWithBasePath(basePath string) *RoutesApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &RoutesApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get route list by app name.
- * This will list routes for a particular app.
- *
- * @param app Name of app for this set of routes.
- * @return *RoutesWrapper
- */
-func (a RoutesApi) AppsAppRoutesGet(app string) (*RoutesWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}/routes"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(RoutesWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppRoutesGet", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Create new Route
- * Create a new route in an app, if app doesn't exists, it creates the app
- *
- * @param app name of the app.
- * @param body One route to post.
- * @return *RouteWrapper
- */
-func (a RoutesApi) AppsAppRoutesPost(app string, body RouteWrapper) (*RouteWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Post")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}/routes"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &body
- var successPayload = new(RouteWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppRoutesPost", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Deletes the route
- * Deletes the route.
- *
- * @param app Name of app for this set of routes.
- * @param route Route name
- * @return void
- */
-func (a RoutesApi) AppsAppRoutesRouteDelete(app string, route string) (*APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Delete")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}/routes/{route}"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"route"+"}", fmt.Sprintf("%v", route), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppRoutesRouteDelete", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return localVarAPIResponse, err
- }
- return localVarAPIResponse, err
-}
-
-/**
- * Gets route by name
- * Gets a route by name.
- *
- * @param app Name of app for this set of routes.
- * @param route Route name
- * @return *RouteWrapper
- */
-func (a RoutesApi) AppsAppRoutesRouteGet(app string, route string) (*RouteWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}/routes/{route}"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"route"+"}", fmt.Sprintf("%v", route), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(RouteWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppRoutesRouteGet", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
-/**
- * Update a Route
- * Update a route
- *
- * @param app name of the app.
- * @param route route path.
- * @param body One route to post.
- * @return *RouteWrapper
- */
-func (a RoutesApi) AppsAppRoutesRoutePatch(app string, route string, body RouteWrapper) (*RouteWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Patch")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/apps/{app}/routes/{route}"
- localVarPath = strings.Replace(localVarPath, "{"+"app"+"}", fmt.Sprintf("%v", app), -1)
- localVarPath = strings.Replace(localVarPath, "{"+"route"+"}", fmt.Sprintf("%v", route), -1)
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- // body params
- localVarPostBody = &body
- var successPayload = new(RouteWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "AppsAppRoutesRoutePatch", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/vendor/github.com/funcy/functions_go/routes_wrapper.go b/vendor/github.com/funcy/functions_go/routes_wrapper.go
deleted file mode 100644
index 222bd81ab..000000000
--- a/vendor/github.com/funcy/functions_go/routes_wrapper.go
+++ /dev/null
@@ -1,8 +0,0 @@
-package functions
-
-type RoutesWrapper struct {
-
- Routes []Route `json:"routes,omitempty"`
-
- Error_ ErrorBody `json:"error,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/task.go b/vendor/github.com/funcy/functions_go/task.go
deleted file mode 100644
index 998a6428e..000000000
--- a/vendor/github.com/funcy/functions_go/task.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package functions
-
-import (
- "time"
-)
-
-type Task struct {
-
- // Name of Docker image to use. This is optional and can be used to override the image defined at the group level.
- Image string `json:"image,omitempty"`
-
- // Payload for the task. This is what you pass into each task to make it do something.
- Payload string `json:"payload,omitempty"`
-
- // Group this task belongs to.
- GroupName string `json:"group_name,omitempty"`
-
- // The error message, if status is 'error'. This is errors due to things outside the task itself. Errors from user code will be found in the log.
- Error_ string `json:"error,omitempty"`
-
- // Machine usable reason for task being in this state. Valid values for error status are `timeout | killed | bad_exit`. Valid values for cancelled status are `client_request`. For everything else, this is undefined.
- Reason string `json:"reason,omitempty"`
-
- // Time when task was submitted. Always in UTC.
- CreatedAt time.Time `json:"created_at,omitempty"`
-
- // Time when task started execution. Always in UTC.
- StartedAt time.Time `json:"started_at,omitempty"`
-
- // Time when task completed, whether it was successul or failed. Always in UTC.
- CompletedAt time.Time `json:"completed_at,omitempty"`
-
- // If this field is set, then this task is a retry of the ID in this field.
- RetryOf string `json:"retry_of,omitempty"`
-
- // If this field is set, then this task was retried by the task referenced in this field.
- RetryAt string `json:"retry_at,omitempty"`
-
- // Env vars for the task. Comes from the ones set on the Group.
- EnvVars map[string]string `json:"env_vars,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/task_wrapper.go b/vendor/github.com/funcy/functions_go/task_wrapper.go
deleted file mode 100644
index b7928623d..000000000
--- a/vendor/github.com/funcy/functions_go/task_wrapper.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package functions
-
-type TaskWrapper struct {
-
- Task Task `json:"task,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/tasks_api.go b/vendor/github.com/funcy/functions_go/tasks_api.go
deleted file mode 100644
index dda5407ff..000000000
--- a/vendor/github.com/funcy/functions_go/tasks_api.go
+++ /dev/null
@@ -1,87 +0,0 @@
-package functions
-
-import (
- "net/url"
- "strings"
- "encoding/json"
-)
-
-type TasksApi struct {
- Configuration *Configuration
-}
-
-func NewTasksApi() *TasksApi {
- configuration := NewConfiguration()
- return &TasksApi{
- Configuration: configuration,
- }
-}
-
-func NewTasksApiWithBasePath(basePath string) *TasksApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &TasksApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get next task.
- * Gets the next task in the queue, ready for processing. Consumers should start processing tasks in order. No other consumer can retrieve this task.
- *
- * @return *TaskWrapper
- */
-func (a TasksApi) TasksGet() (*TaskWrapper, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/tasks"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(TaskWrapper)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "TasksGet", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/vendor/github.com/funcy/functions_go/tasks_wrapper.go b/vendor/github.com/funcy/functions_go/tasks_wrapper.go
deleted file mode 100644
index ee6468f16..000000000
--- a/vendor/github.com/funcy/functions_go/tasks_wrapper.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package functions
-
-type TasksWrapper struct {
-
- Tasks []Task `json:"tasks,omitempty"`
-
- // Used to paginate results. If this is returned, pass it into the same query again to get more results.
- Cursor string `json:"cursor,omitempty"`
-
- Error_ ErrorBody `json:"error,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/version.go b/vendor/github.com/funcy/functions_go/version.go
deleted file mode 100644
index 8ad946ce2..000000000
--- a/vendor/github.com/funcy/functions_go/version.go
+++ /dev/null
@@ -1,6 +0,0 @@
-package functions
-
-type Version struct {
-
- Version string `json:"version,omitempty"`
-}
diff --git a/vendor/github.com/funcy/functions_go/version_api.go b/vendor/github.com/funcy/functions_go/version_api.go
deleted file mode 100644
index adec797b3..000000000
--- a/vendor/github.com/funcy/functions_go/version_api.go
+++ /dev/null
@@ -1,86 +0,0 @@
-package functions
-
-import (
- "net/url"
- "strings"
- "encoding/json"
-)
-
-type VersionApi struct {
- Configuration *Configuration
-}
-
-func NewVersionApi() *VersionApi {
- configuration := NewConfiguration()
- return &VersionApi{
- Configuration: configuration,
- }
-}
-
-func NewVersionApiWithBasePath(basePath string) *VersionApi {
- configuration := NewConfiguration()
- configuration.BasePath = basePath
-
- return &VersionApi{
- Configuration: configuration,
- }
-}
-
-/**
- * Get daemon version.
- *
- * @return *Version
- */
-func (a VersionApi) VersionGet() (*Version, *APIResponse, error) {
-
- var localVarHttpMethod = strings.ToUpper("Get")
- // create path and map variables
- localVarPath := a.Configuration.BasePath + "/version"
-
- localVarHeaderParams := make(map[string]string)
- localVarQueryParams := url.Values{}
- localVarFormParams := make(map[string]string)
- var localVarPostBody interface{}
- var localVarFileName string
- var localVarFileBytes []byte
- // add default headers if any
- for key := range a.Configuration.DefaultHeader {
- localVarHeaderParams[key] = a.Configuration.DefaultHeader[key]
- }
-
- // to determine the Content-Type header
- localVarHttpContentTypes := []string{ "application/json", }
-
- // set Content-Type header
- localVarHttpContentType := a.Configuration.APIClient.SelectHeaderContentType(localVarHttpContentTypes)
- if localVarHttpContentType != "" {
- localVarHeaderParams["Content-Type"] = localVarHttpContentType
- }
- // to determine the Accept header
- localVarHttpHeaderAccepts := []string{
- "application/json",
- }
-
- // set Accept header
- localVarHttpHeaderAccept := a.Configuration.APIClient.SelectHeaderAccept(localVarHttpHeaderAccepts)
- if localVarHttpHeaderAccept != "" {
- localVarHeaderParams["Accept"] = localVarHttpHeaderAccept
- }
- var successPayload = new(Version)
- localVarHttpResponse, err := a.Configuration.APIClient.CallAPI(localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
-
- var localVarURL, _ = url.Parse(localVarPath)
- localVarURL.RawQuery = localVarQueryParams.Encode()
- var localVarAPIResponse = &APIResponse{Operation: "VersionGet", Method: localVarHttpMethod, RequestURL: localVarURL.String()}
- if localVarHttpResponse != nil {
- localVarAPIResponse.Response = localVarHttpResponse.RawResponse
- localVarAPIResponse.Payload = localVarHttpResponse.Body()
- }
-
- if err != nil {
- return successPayload, localVarAPIResponse, err
- }
- err = json.Unmarshal(localVarHttpResponse.Body(), &successPayload)
- return successPayload, localVarAPIResponse, err
-}
-
diff --git a/vendor/github.com/garyburd/redigo/.travis.yml b/vendor/github.com/garyburd/redigo/.travis.yml
index e70302ea1..158f16142 100644
--- a/vendor/github.com/garyburd/redigo/.travis.yml
+++ b/vendor/github.com/garyburd/redigo/.travis.yml
@@ -9,6 +9,7 @@ go:
- 1.6
- 1.7
- 1.8
+ - 1.9
- tip
script:
diff --git a/vendor/github.com/gin-gonic/gin/.travis.yml b/vendor/github.com/gin-gonic/gin/.travis.yml
index 72daa3f35..ec12cad6a 100644
--- a/vendor/github.com/gin-gonic/gin/.travis.yml
+++ b/vendor/github.com/gin-gonic/gin/.travis.yml
@@ -4,7 +4,7 @@ go:
- 1.6.x
- 1.7.x
- 1.8.x
- - 1.9
+ - 1.9.x
- master
git:
diff --git a/vendor/github.com/gin-gonic/gin/README.md b/vendor/github.com/gin-gonic/gin/README.md
index 07357be4e..0dc165bc2 100644
--- a/vendor/github.com/gin-gonic/gin/README.md
+++ b/vendor/github.com/gin-gonic/gin/README.md
@@ -277,6 +277,8 @@ References issue [#774](https://github.com/gin-gonic/gin/issues/774) and detail
```go
func main() {
router := gin.Default()
+ // Set a lower memory limit for multipart forms (default is 32 MiB)
+ // router.MaxMultipartMemory = 8 << 20 // 8 MiB
router.POST("/upload", func(c *gin.Context) {
// single file
file, _ := c.FormFile("file")
@@ -306,6 +308,8 @@ See the detail [example code](examples/upload-file/multiple).
```go
func main() {
router := gin.Default()
+ // Set a lower memory limit for multipart forms (default is 32 MiB)
+ // router.MaxMultipartMemory = 8 << 20 // 8 MiB
router.POST("/upload", func(c *gin.Context) {
// Multipart form
form, _ := c.MultipartForm()
@@ -1220,7 +1224,7 @@ func main() {
if err := srv.Shutdown(ctx); err != nil {
log.Fatal("Server Shutdown:", err)
}
- log.Println("Server exist")
+ log.Println("Server exiting")
}
```
diff --git a/vendor/github.com/gin-gonic/gin/context.go b/vendor/github.com/gin-gonic/gin/context.go
index d7b6c61da..74995e68e 100644
--- a/vendor/github.com/gin-gonic/gin/context.go
+++ b/vendor/github.com/gin-gonic/gin/context.go
@@ -34,8 +34,7 @@ const (
)
const (
- defaultMemory = 32 << 20 // 32 MB
- abortIndex int8 = math.MaxInt8 / 2
+ abortIndex int8 = math.MaxInt8 / 2
)
// Context is the most important part of gin. It allows us to pass variables between middleware,
@@ -407,7 +406,7 @@ func (c *Context) PostFormArray(key string) []string {
func (c *Context) GetPostFormArray(key string) ([]string, bool) {
req := c.Request
req.ParseForm()
- req.ParseMultipartForm(defaultMemory)
+ req.ParseMultipartForm(c.engine.MaxMultipartMemory)
if values := req.PostForm[key]; len(values) > 0 {
return values, true
}
@@ -427,7 +426,7 @@ func (c *Context) FormFile(name string) (*multipart.FileHeader, error) {
// MultipartForm is the parsed multipart form, including file uploads.
func (c *Context) MultipartForm() (*multipart.Form, error) {
- err := c.Request.ParseMultipartForm(defaultMemory)
+ err := c.Request.ParseMultipartForm(c.engine.MaxMultipartMemory)
return c.Request.MultipartForm, err
}
diff --git a/vendor/github.com/gin-gonic/gin/deprecated.go b/vendor/github.com/gin-gonic/gin/deprecated.go
index 7b50dc70e..ab4474296 100644
--- a/vendor/github.com/gin-gonic/gin/deprecated.go
+++ b/vendor/github.com/gin-gonic/gin/deprecated.go
@@ -15,7 +15,7 @@ import (
func (c *Context) BindWith(obj interface{}, b binding.Binding) error {
log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to
be deprecated, please check issue #662 and either use MustBindWith() if you
- want HTTP 400 to be automatically returned if any error occur, of use
+ want HTTP 400 to be automatically returned if any error occur, or use
ShouldBindWith() if you need to manage the error.`)
return c.MustBindWith(obj, b)
}
diff --git a/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/close/server.go b/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/close/server.go
index 547783931..9c4e90fac 100644
--- a/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/close/server.go
+++ b/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/close/server.go
@@ -41,5 +41,5 @@ func main() {
}
}
- log.Println("Server exist")
+ log.Println("Server exiting")
}
diff --git a/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/graceful-shutdown/server.go b/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/graceful-shutdown/server.go
index 060de081c..6debe7f59 100644
--- a/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/graceful-shutdown/server.go
+++ b/vendor/github.com/gin-gonic/gin/examples/graceful-shutdown/graceful-shutdown/server.go
@@ -44,5 +44,5 @@ func main() {
if err := srv.Shutdown(ctx); err != nil {
log.Fatal("Server Shutdown:", err)
}
- log.Println("Server exist")
+ log.Println("Server exiting")
}
diff --git a/vendor/github.com/gin-gonic/gin/examples/upload-file/multiple/main.go b/vendor/github.com/gin-gonic/gin/examples/upload-file/multiple/main.go
index 4bb4cdcb9..a55325ed5 100644
--- a/vendor/github.com/gin-gonic/gin/examples/upload-file/multiple/main.go
+++ b/vendor/github.com/gin-gonic/gin/examples/upload-file/multiple/main.go
@@ -9,6 +9,8 @@ import (
func main() {
router := gin.Default()
+ // Set a lower memory limit for multipart forms (default is 32 MiB)
+ router.MaxMultipartMemory = 8 << 20 // 8 MiB
router.Static("/", "./public")
router.POST("/upload", func(c *gin.Context) {
name := c.PostForm("name")
diff --git a/vendor/github.com/gin-gonic/gin/examples/upload-file/single/main.go b/vendor/github.com/gin-gonic/gin/examples/upload-file/single/main.go
index 372a29942..5d438651a 100644
--- a/vendor/github.com/gin-gonic/gin/examples/upload-file/single/main.go
+++ b/vendor/github.com/gin-gonic/gin/examples/upload-file/single/main.go
@@ -9,6 +9,8 @@ import (
func main() {
router := gin.Default()
+ // Set a lower memory limit for multipart forms (default is 32 MiB)
+ router.MaxMultipartMemory = 8 << 20 // 8 MiB
router.Static("/", "./public")
router.POST("/upload", func(c *gin.Context) {
name := c.PostForm("name")
diff --git a/vendor/github.com/gin-gonic/gin/gin.go b/vendor/github.com/gin-gonic/gin/gin.go
index ee39c9aab..24c4dd8d7 100644
--- a/vendor/github.com/gin-gonic/gin/gin.go
+++ b/vendor/github.com/gin-gonic/gin/gin.go
@@ -15,7 +15,10 @@ import (
)
// Version is Framework's version.
-const Version = "v1.2"
+const (
+ Version = "v1.2"
+ defaultMultipartMemory = 32 << 20 // 32 MB
+)
var default404Body = []byte("404 page not found")
var default405Body = []byte("405 method not allowed")
@@ -92,6 +95,10 @@ type Engine struct {
// If UseRawPath is false (by default), the UnescapePathValues effectively is true,
// as url.Path gonna be used, which is already unescaped.
UnescapePathValues bool
+
+ // Value of 'maxMemory' param that is given to http.Request's ParseMultipartForm
+ // method call.
+ MaxMultipartMemory int64
}
var _ IRouter = &Engine{}
@@ -120,6 +127,7 @@ func New() *Engine {
AppEngine: defaultAppEngine,
UseRawPath: false,
UnescapePathValues: true,
+ MaxMultipartMemory: defaultMultipartMemory,
trees: make(methodTrees, 0, 9),
delims: render.Delims{Left: "{{", Right: "}}"},
secureJsonPrefix: "while(1);",
diff --git a/vendor/github.com/go-openapi/runtime/authinfo_test.go b/vendor/github.com/go-openapi/runtime/authinfo_test.go
index 0768df3b7..6a7d94b1a 100644
--- a/vendor/github.com/go-openapi/runtime/authinfo_test.go
+++ b/vendor/github.com/go-openapi/runtime/authinfo_test.go
@@ -23,11 +23,11 @@ import (
func TestAuthInfoWriter(t *testing.T) {
hand := ClientAuthInfoWriterFunc(func(r ClientRequest, _ strfmt.Registry) error {
- return r.SetHeaderParam("authorization", "Bearer the-token-goes-here")
+ r.SetHeaderParam("authorization", "Bearer the-token-goes-here")
+ return nil
})
tr := new(trw)
- err := hand.AuthenticateRequest(tr, nil)
- assert.NoError(t, err)
+ hand.AuthenticateRequest(tr, nil)
assert.Equal(t, "Bearer the-token-goes-here", tr.Headers.Get("Authorization"))
}
diff --git a/vendor/github.com/go-openapi/runtime/client/auth_info.go b/vendor/github.com/go-openapi/runtime/client/auth_info.go
index 9e18222b5..290a3eb62 100644
--- a/vendor/github.com/go-openapi/runtime/client/auth_info.go
+++ b/vendor/github.com/go-openapi/runtime/client/auth_info.go
@@ -32,7 +32,8 @@ func init() {
func BasicAuth(username, password string) runtime.ClientAuthInfoWriter {
return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error {
encoded := base64.StdEncoding.EncodeToString([]byte(username + ":" + password))
- return r.SetHeaderParam("Authorization", "Basic "+encoded)
+ r.SetHeaderParam("Authorization", "Basic "+encoded)
+ return nil
})
}
@@ -40,13 +41,15 @@ func BasicAuth(username, password string) runtime.ClientAuthInfoWriter {
func APIKeyAuth(name, in, value string) runtime.ClientAuthInfoWriter {
if in == "query" {
return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error {
- return r.SetQueryParam(name, value)
+ r.SetQueryParam(name, value)
+ return nil
})
}
if in == "header" {
return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error {
- return r.SetHeaderParam(name, value)
+ r.SetHeaderParam(name, value)
+ return nil
})
}
return nil
@@ -55,6 +58,7 @@ func APIKeyAuth(name, in, value string) runtime.ClientAuthInfoWriter {
// BearerToken provides a header based oauth2 bearer access token auth info writer
func BearerToken(token string) runtime.ClientAuthInfoWriter {
return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error {
- return r.SetHeaderParam("Authorization", "Bearer "+token)
+ r.SetHeaderParam("Authorization", "Bearer "+token)
+ return nil
})
}
diff --git a/vendor/github.com/go-openapi/runtime/client/auth_info_test.go b/vendor/github.com/go-openapi/runtime/client/auth_info_test.go
index ef8859443..70cf8466f 100644
--- a/vendor/github.com/go-openapi/runtime/client/auth_info_test.go
+++ b/vendor/github.com/go-openapi/runtime/client/auth_info_test.go
@@ -25,8 +25,7 @@ func TestBasicAuth(t *testing.T) {
r, _ := newRequest("GET", "/", nil)
writer := BasicAuth("someone", "with a password")
- err := writer.AuthenticateRequest(r, nil)
- assert.NoError(t, err)
+ writer.AuthenticateRequest(r, nil)
req := new(http.Request)
req.Header = make(http.Header)
@@ -42,8 +41,7 @@ func TestAPIKeyAuth_Query(t *testing.T) {
r, _ := newRequest("GET", "/", nil)
writer := APIKeyAuth("api_key", "query", "the-shared-key")
- err := writer.AuthenticateRequest(r, nil)
- assert.NoError(t, err)
+ writer.AuthenticateRequest(r, nil)
assert.Equal(t, "the-shared-key", r.query.Get("api_key"))
}
@@ -52,8 +50,7 @@ func TestAPIKeyAuth_Header(t *testing.T) {
r, _ := newRequest("GET", "/", nil)
writer := APIKeyAuth("x-api-token", "header", "the-shared-key")
- err := writer.AuthenticateRequest(r, nil)
- assert.NoError(t, err)
+ writer.AuthenticateRequest(r, nil)
assert.Equal(t, "the-shared-key", r.header.Get("x-api-token"))
}
@@ -62,8 +59,7 @@ func TestBearerTokenAuth(t *testing.T) {
r, _ := newRequest("GET", "/", nil)
writer := BearerToken("the-shared-token")
- err := writer.AuthenticateRequest(r, nil)
- assert.NoError(t, err)
+ writer.AuthenticateRequest(r, nil)
assert.Equal(t, "Bearer the-shared-token", r.header.Get("Authorization"))
}
diff --git a/vendor/github.com/go-openapi/runtime/client/request_test.go b/vendor/github.com/go-openapi/runtime/client/request_test.go
index 0f1d60267..7f44095e8 100644
--- a/vendor/github.com/go-openapi/runtime/client/request_test.go
+++ b/vendor/github.com/go-openapi/runtime/client/request_test.go
@@ -38,20 +38,20 @@ var testProducers = map[string]runtime.Producer{
func TestBuildRequest_SetHeaders(t *testing.T) {
r, _ := newRequest("GET", "/flats/{id}/", nil)
// single value
- _ = r.SetHeaderParam("X-Rate-Limit", "500")
+ r.SetHeaderParam("X-Rate-Limit", "500")
assert.Equal(t, "500", r.header.Get("X-Rate-Limit"))
- _ = r.SetHeaderParam("X-Rate-Limit", "400")
+ r.SetHeaderParam("X-Rate-Limit", "400")
assert.Equal(t, "400", r.header.Get("X-Rate-Limit"))
// multi value
- _ = r.SetHeaderParam("X-Accepts", "json", "xml", "yaml")
+ r.SetHeaderParam("X-Accepts", "json", "xml", "yaml")
assert.EqualValues(t, []string{"json", "xml", "yaml"}, r.header["X-Accepts"])
}
func TestBuildRequest_SetPath(t *testing.T) {
r, _ := newRequest("GET", "/flats/{id}/?hello=world", nil)
- _ = r.SetPathParam("id", "1345")
+ r.SetPathParam("id", "1345")
assert.Equal(t, "1345", r.pathParams["id"])
}
@@ -59,20 +59,20 @@ func TestBuildRequest_SetQuery(t *testing.T) {
r, _ := newRequest("GET", "/flats/{id}/", nil)
// single value
- _ = r.SetQueryParam("hello", "there")
+ r.SetQueryParam("hello", "there")
assert.Equal(t, "there", r.query.Get("hello"))
// multi value
- _ = r.SetQueryParam("goodbye", "cruel", "world")
+ r.SetQueryParam("goodbye", "cruel", "world")
assert.Equal(t, []string{"cruel", "world"}, r.query["goodbye"])
}
func TestBuildRequest_SetForm(t *testing.T) {
// non-multipart
r, _ := newRequest("POST", "/flats", nil)
- _ = r.SetFormParam("hello", "world")
+ r.SetFormParam("hello", "world")
assert.Equal(t, "world", r.formFields.Get("hello"))
- _ = r.SetFormParam("goodbye", "cruel", "world")
+ r.SetFormParam("goodbye", "cruel", "world")
assert.Equal(t, []string{"cruel", "world"}, r.formFields["goodbye"])
}
@@ -107,16 +107,16 @@ func TestBuildRequest_SetBody(t *testing.T) {
r, _ := newRequest("GET", "/flats/{id}/?hello=world", nil)
bd := []struct{ Name, Hobby string }{{"Tom", "Organ trail"}, {"John", "Bird watching"}}
- _ = r.SetBodyParam(bd)
+ r.SetBodyParam(bd)
assert.Equal(t, bd, r.payload)
}
func TestBuildRequest_BuildHTTP_NoPayload(t *testing.T) {
reqWrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error {
- _ = req.SetBodyParam(nil)
- _ = req.SetQueryParam("hello", "world")
- _ = req.SetPathParam("id", "1234")
- _ = req.SetHeaderParam("X-Rate-Limit", "200")
+ req.SetBodyParam(nil)
+ req.SetQueryParam("hello", "world")
+ req.SetPathParam("id", "1234")
+ req.SetHeaderParam("X-Rate-Limit", "200")
return nil
})
r, _ := newRequest("POST", "/flats/{id}/", reqWrtr)
@@ -133,14 +133,14 @@ func TestBuildRequest_BuildHTTP_NoPayload(t *testing.T) {
func TestBuildRequest_BuildHTTP_Payload(t *testing.T) {
bd := []struct{ Name, Hobby string }{{"Tom", "Organ trail"}, {"John", "Bird watching"}}
reqWrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error {
- _ = req.SetBodyParam(bd)
- _ = req.SetQueryParam("hello", "world")
- _ = req.SetPathParam("id", "1234")
- _ = req.SetHeaderParam("X-Rate-Limit", "200")
+ req.SetBodyParam(bd)
+ req.SetQueryParam("hello", "world")
+ req.SetPathParam("id", "1234")
+ req.SetHeaderParam("X-Rate-Limit", "200")
return nil
})
r, _ := newRequest("GET", "/flats/{id}/", reqWrtr)
- _ = r.SetHeaderParam(runtime.HeaderContentType, runtime.JSONMime)
+ r.SetHeaderParam(runtime.HeaderContentType, runtime.JSONMime)
req, err := r.BuildHTTP(runtime.JSONMime, testProducers, nil)
if assert.NoError(t, err) && assert.NotNil(t, req) {
@@ -160,14 +160,14 @@ func TestBuildRequest_BuildHTTP_XMLPayload(t *testing.T) {
Hobby string `xml:"hobby"`
}{{xml.Name{}, "Tom", "Organ trail"}, {xml.Name{}, "John", "Bird watching"}}
reqWrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error {
- _ = req.SetBodyParam(bd)
- _ = req.SetQueryParam("hello", "world")
- _ = req.SetPathParam("id", "1234")
- _ = req.SetHeaderParam("X-Rate-Limit", "200")
+ req.SetBodyParam(bd)
+ req.SetQueryParam("hello", "world")
+ req.SetPathParam("id", "1234")
+ req.SetHeaderParam("X-Rate-Limit", "200")
return nil
})
r, _ := newRequest("GET", "/flats/{id}/", reqWrtr)
- _ = r.SetHeaderParam(runtime.HeaderContentType, runtime.XMLMime)
+ r.SetHeaderParam(runtime.HeaderContentType, runtime.XMLMime)
req, err := r.BuildHTTP(runtime.XMLMime, testProducers, nil)
if assert.NoError(t, err) && assert.NotNil(t, req) {
@@ -183,14 +183,14 @@ func TestBuildRequest_BuildHTTP_XMLPayload(t *testing.T) {
func TestBuildRequest_BuildHTTP_TextPayload(t *testing.T) {
bd := "Tom: Organ trail; John: Bird watching"
reqWrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error {
- _ = req.SetBodyParam(bd)
- _ = req.SetQueryParam("hello", "world")
- _ = req.SetPathParam("id", "1234")
- _ = req.SetHeaderParam("X-Rate-Limit", "200")
+ req.SetBodyParam(bd)
+ req.SetQueryParam("hello", "world")
+ req.SetPathParam("id", "1234")
+ req.SetHeaderParam("X-Rate-Limit", "200")
return nil
})
r, _ := newRequest("GET", "/flats/{id}/", reqWrtr)
- _ = r.SetHeaderParam(runtime.HeaderContentType, runtime.TextMime)
+ r.SetHeaderParam(runtime.HeaderContentType, runtime.TextMime)
req, err := r.BuildHTTP(runtime.TextMime, testProducers, nil)
if assert.NoError(t, err) && assert.NotNil(t, req) {
@@ -205,14 +205,14 @@ func TestBuildRequest_BuildHTTP_TextPayload(t *testing.T) {
func TestBuildRequest_BuildHTTP_Form(t *testing.T) {
reqWrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error {
- _ = req.SetFormParam("something", "some value")
- _ = req.SetQueryParam("hello", "world")
- _ = req.SetPathParam("id", "1234")
- _ = req.SetHeaderParam("X-Rate-Limit", "200")
+ req.SetFormParam("something", "some value")
+ req.SetQueryParam("hello", "world")
+ req.SetPathParam("id", "1234")
+ req.SetHeaderParam("X-Rate-Limit", "200")
return nil
})
r, _ := newRequest("GET", "/flats/{id}/", reqWrtr)
- _ = r.SetHeaderParam(runtime.HeaderContentType, runtime.JSONMime)
+ r.SetHeaderParam(runtime.HeaderContentType, runtime.JSONMime)
req, err := r.BuildHTTP(runtime.JSONMime, testProducers, nil)
if assert.NoError(t, err) && assert.NotNil(t, req) {
@@ -227,14 +227,14 @@ func TestBuildRequest_BuildHTTP_Form(t *testing.T) {
func TestBuildRequest_BuildHTTP_Form_Content_Length(t *testing.T) {
reqWrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error {
- _ = req.SetFormParam("something", "some value")
- _ = req.SetQueryParam("hello", "world")
- _ = req.SetPathParam("id", "1234")
- _ = req.SetHeaderParam("X-Rate-Limit", "200")
+ req.SetFormParam("something", "some value")
+ req.SetQueryParam("hello", "world")
+ req.SetPathParam("id", "1234")
+ req.SetHeaderParam("X-Rate-Limit", "200")
return nil
})
r, _ := newRequest("GET", "/flats/{id}/", reqWrtr)
- _ = r.SetHeaderParam(runtime.HeaderContentType, runtime.MultipartFormMime)
+ r.SetHeaderParam(runtime.HeaderContentType, runtime.MultipartFormMime)
req, err := r.BuildHTTP(runtime.JSONMime, testProducers, nil)
if assert.NoError(t, err) && assert.NotNil(t, req) {
@@ -252,15 +252,15 @@ func TestBuildRequest_BuildHTTP_Form_Content_Length(t *testing.T) {
func TestBuildRequest_BuildHTTP_Files(t *testing.T) {
cont, _ := ioutil.ReadFile("./runtime.go")
reqWrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, reg strfmt.Registry) error {
- _ = req.SetFormParam("something", "some value")
- _ = req.SetFileParam("file", mustGetFile("./runtime.go"))
- _ = req.SetQueryParam("hello", "world")
- _ = req.SetPathParam("id", "1234")
- _ = req.SetHeaderParam("X-Rate-Limit", "200")
+ req.SetFormParam("something", "some value")
+ req.SetFileParam("file", mustGetFile("./runtime.go"))
+ req.SetQueryParam("hello", "world")
+ req.SetPathParam("id", "1234")
+ req.SetHeaderParam("X-Rate-Limit", "200")
return nil
})
r, _ := newRequest("GET", "/flats/{id}/", reqWrtr)
- _ = r.SetHeaderParam(runtime.HeaderContentType, runtime.JSONMime)
+ r.SetHeaderParam(runtime.HeaderContentType, runtime.JSONMime)
req, err := r.BuildHTTP(runtime.JSONMime, testProducers, nil)
if assert.NoError(t, err) && assert.NotNil(t, req) {
assert.Equal(t, "200", req.Header.Get("x-rate-limit"))
diff --git a/vendor/github.com/go-openapi/runtime/client/runtime.go b/vendor/github.com/go-openapi/runtime/client/runtime.go
index 6ec9cb6dc..3fea025c9 100644
--- a/vendor/github.com/go-openapi/runtime/client/runtime.go
+++ b/vendor/github.com/go-openapi/runtime/client/runtime.go
@@ -214,10 +214,10 @@ func (r *Runtime) Submit(operation *runtime.ClientOperation) (interface{}, error
}
var accept []string
- accept = append(accept, operation.ProducesMediaTypes...)
- if err = request.SetHeaderParam(runtime.HeaderAccept, accept...); err != nil {
- return nil, err
+ for _, mimeType := range operation.ProducesMediaTypes {
+ accept = append(accept, mimeType)
}
+ request.SetHeaderParam(runtime.HeaderAccept, accept...)
if auth == nil && r.DefaultAuthentication != nil {
auth = r.DefaultAuthentication
diff --git a/vendor/github.com/go-openapi/runtime/client/runtime_test.go b/vendor/github.com/go-openapi/runtime/client/runtime_test.go
index 1d878f22f..6572ad78f 100644
--- a/vendor/github.com/go-openapi/runtime/client/runtime_test.go
+++ b/vendor/github.com/go-openapi/runtime/client/runtime_test.go
@@ -77,7 +77,7 @@ func TestRuntime_Concurrent(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.JSONMime)
rw.WriteHeader(http.StatusOK)
jsongen := json.NewEncoder(rw)
- _ = jsongen.Encode(result)
+ jsongen.Encode(result)
}))
defer server.Close()
@@ -153,7 +153,7 @@ func TestRuntime_Canary(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.JSONMime)
rw.WriteHeader(http.StatusOK)
jsongen := json.NewEncoder(rw)
- _ = jsongen.Encode(result)
+ jsongen.Encode(result)
}))
defer server.Close()
@@ -204,7 +204,7 @@ func TestRuntime_XMLCanary(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.XMLMime)
rw.WriteHeader(http.StatusOK)
xmlgen := xml.NewEncoder(rw)
- _ = xmlgen.Encode(result)
+ xmlgen.Encode(result)
}))
defer server.Close()
@@ -245,7 +245,7 @@ func TestRuntime_TextCanary(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, req *http.Request) {
rw.Header().Add(runtime.HeaderContentType, runtime.TextMime)
rw.WriteHeader(http.StatusOK)
- _, _ = rw.Write([]byte(result))
+ rw.Write([]byte(result))
}))
defer server.Close()
@@ -305,7 +305,7 @@ func TestRuntime_CustomTransport(t *testing.T) {
resp.Header.Set("content-type", "application/json")
buf := bytes.NewBuffer(nil)
enc := json.NewEncoder(buf)
- _ = enc.Encode(result)
+ enc.Encode(result)
resp.Body = ioutil.NopCloser(buf)
return &resp, nil
})
@@ -354,7 +354,7 @@ func TestRuntime_CustomCookieJar(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.JSONMime)
rw.WriteHeader(http.StatusOK)
jsongen := json.NewEncoder(rw)
- _ = jsongen.Encode([]task{})
+ jsongen.Encode([]task{})
} else {
rw.WriteHeader(http.StatusUnauthorized)
}
@@ -407,7 +407,7 @@ func TestRuntime_AuthCanary(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.JSONMime)
rw.WriteHeader(http.StatusOK)
jsongen := json.NewEncoder(rw)
- _ = jsongen.Encode(result)
+ jsongen.Encode(result)
}))
defer server.Close()
@@ -455,12 +455,13 @@ func TestRuntime_PickConsumer(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.JSONMime+";charset=utf-8")
rw.WriteHeader(http.StatusOK)
jsongen := json.NewEncoder(rw)
- _ = jsongen.Encode(result)
+ jsongen.Encode(result)
}))
defer server.Close()
rwrtr := runtime.ClientRequestWriterFunc(func(req runtime.ClientRequest, _ strfmt.Registry) error {
- return req.SetBodyParam(bytes.NewBufferString("hello"))
+ req.SetBodyParam(bytes.NewBufferString("hello"))
+ return nil
})
hu, _ := url.Parse(server.URL)
@@ -508,7 +509,7 @@ func TestRuntime_ContentTypeCanary(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.JSONMime+";charset=utf-8")
rw.WriteHeader(http.StatusOK)
jsongen := json.NewEncoder(rw)
- _ = jsongen.Encode(result)
+ jsongen.Encode(result)
}))
defer server.Close()
@@ -562,7 +563,7 @@ func TestRuntime_ChunkedResponse(t *testing.T) {
rw.Header().Add(runtime.HeaderContentType, runtime.JSONMime+";charset=utf-8")
rw.WriteHeader(http.StatusOK)
jsongen := json.NewEncoder(rw)
- _ = jsongen.Encode(result)
+ jsongen.Encode(result)
}))
defer server.Close()
@@ -604,26 +605,26 @@ func TestRuntime_DebugValue(t *testing.T) {
original := os.Getenv("DEBUG")
// Emtpy DEBUG means Debug is False
- _ = os.Setenv("DEBUG", "")
+ os.Setenv("DEBUG", "")
runtime := New("", "/", []string{"https"})
assert.False(t, runtime.Debug)
// Non-Empty Debug means Debug is True
- _ = os.Setenv("DEBUG", "1")
+ os.Setenv("DEBUG", "1")
runtime = New("", "/", []string{"https"})
assert.True(t, runtime.Debug)
- _ = os.Setenv("DEBUG", "true")
+ os.Setenv("DEBUG", "true")
runtime = New("", "/", []string{"https"})
assert.True(t, runtime.Debug)
- _ = os.Setenv("DEBUG", "foo")
+ os.Setenv("DEBUG", "foo")
runtime = New("", "/", []string{"https"})
assert.True(t, runtime.Debug)
// Make sure DEBUG is initial value once again
- _ = os.Setenv("DEBUG", original)
+ os.Setenv("DEBUG", original)
}
func TestRuntime_OverrideScheme(t *testing.T) {
diff --git a/vendor/github.com/go-openapi/runtime/client_request_test.go b/vendor/github.com/go-openapi/runtime/client_request_test.go
index ea93401d3..5fc3a4460 100644
--- a/vendor/github.com/go-openapi/runtime/client_request_test.go
+++ b/vendor/github.com/go-openapi/runtime/client_request_test.go
@@ -56,13 +56,13 @@ func (t *trw) SetTimeout(timeout time.Duration) error {
func TestRequestWriterFunc(t *testing.T) {
hand := ClientRequestWriterFunc(func(r ClientRequest, reg strfmt.Registry) error {
- _ = r.SetHeaderParam("blah", "blah blah")
- _ = r.SetBodyParam(struct{ Name string }{"Adriana"})
+ r.SetHeaderParam("blah", "blah blah")
+ r.SetBodyParam(struct{ Name string }{"Adriana"})
return nil
})
tr := new(trw)
- _ = hand.WriteToRequest(tr, nil)
+ hand.WriteToRequest(tr, nil)
assert.Equal(t, "blah blah", tr.Headers.Get("blah"))
assert.Equal(t, "Adriana", tr.Body.(struct{ Name string }).Name)
}
diff --git a/vendor/github.com/go-openapi/runtime/client_response_test.go b/vendor/github.com/go-openapi/runtime/client_response_test.go
index 7422d349d..d3f5db4d1 100644
--- a/vendor/github.com/go-openapi/runtime/client_response_test.go
+++ b/vendor/github.com/go-openapi/runtime/client_response_test.go
@@ -52,7 +52,7 @@ func TestResponseReaderFunc(t *testing.T) {
actual.Header = r.GetHeader("blah")
return actual, nil
})
- _, _ = reader.ReadResponse(response{}, nil)
+ reader.ReadResponse(response{}, nil)
assert.Equal(t, "the content", actual.Body)
assert.Equal(t, "the message", actual.Message)
assert.Equal(t, "the header", actual.Header)
diff --git a/vendor/github.com/go-openapi/runtime/interfaces.go b/vendor/github.com/go-openapi/runtime/interfaces.go
index 5f2a472a8..85330aa3f 100644
--- a/vendor/github.com/go-openapi/runtime/interfaces.go
+++ b/vendor/github.com/go-openapi/runtime/interfaces.go
@@ -15,10 +15,8 @@
package runtime
import (
- "io"
- "net/http"
-
"github.com/go-openapi/strfmt"
+ "io"
)
// OperationHandlerFunc an adapter for a function to the OperationHandler interface
@@ -79,21 +77,6 @@ type Authenticator interface {
Authenticate(interface{}) (bool, interface{}, error)
}
-// AuthorizerFunc turns a function into an authorizer
-type AuthorizerFunc func(*http.Request, interface{}) error
-
-// Authorize authorizes the processing of the request for the principal
-func (f AuthorizerFunc) Authorize(r *http.Request, principal interface{}) error {
- return f(r, principal)
-}
-
-// Authorizer represents an authorization strategy
-// implementations of Authorizer know how to authorize the principal object
-// using the request data and returns error if unauthorized
-type Authorizer interface {
- Authorize(*http.Request, interface{}) error
-}
-
// Validatable types implementing this interface allow customizing their validation
// this will be used instead of the reflective valditation based on the spec document.
// the implementations are assumed to have been generated by the swagger tool so they should
diff --git a/vendor/github.com/go-openapi/runtime/internal/testing/petstore/api.go b/vendor/github.com/go-openapi/runtime/internal/testing/petstore/api.go
index 2a066cee1..e5bf19385 100644
--- a/vendor/github.com/go-openapi/runtime/internal/testing/petstore/api.go
+++ b/vendor/github.com/go-openapi/runtime/internal/testing/petstore/api.go
@@ -15,10 +15,7 @@
package petstore
import (
- goerrors "errors"
"io"
- "net/http"
- "strings"
gotest "testing"
"github.com/go-openapi/errors"
@@ -49,8 +46,6 @@ func NewAPI(t gotest.TB) (*loads.Document, *untyped.API) {
api.RegisterAuth("basic", security.BasicAuth(func(username, password string) (interface{}, error) {
if username == "admin" && password == "admin" {
return "admin", nil
- } else if username == "topuser" && password == "topuser" {
- return "topuser", nil
}
return nil, errors.Unauthenticated("basic")
}))
@@ -60,12 +55,6 @@ func NewAPI(t gotest.TB) (*loads.Document, *untyped.API) {
}
return nil, errors.Unauthenticated("token")
}))
- api.RegisterAuthorizer(runtime.AuthorizerFunc(func(r *http.Request, user interface{}) error {
- if r.Method == http.MethodPost && strings.HasPrefix(r.URL.Path, "/api/pets") && user.(string) != "admin" {
- return goerrors.New("unauthorized")
- }
- return nil
- }))
api.RegisterOperation("get", "/pets", new(stubOperationHandler))
api.RegisterOperation("post", "/pets", new(stubOperationHandler))
api.RegisterOperation("delete", "/pets/{id}", new(stubOperationHandler))
@@ -105,7 +94,6 @@ func NewRootAPI(t gotest.TB) (*loads.Document, *untyped.API) {
}
return nil, errors.Unauthenticated("token")
}))
- api.RegisterAuthorizer(security.Authorized())
api.RegisterOperation("get", "/pets", new(stubOperationHandler))
api.RegisterOperation("post", "/pets", new(stubOperationHandler))
api.RegisterOperation("delete", "/pets/{id}", new(stubOperationHandler))
diff --git a/vendor/github.com/go-openapi/runtime/middleware/body_test.go b/vendor/github.com/go-openapi/runtime/middleware/body_test.go
index 7e8ad0f93..f78783a65 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/body_test.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/body_test.go
@@ -68,12 +68,12 @@ func TestBindRequest_DeleteNoBody(t *testing.T) {
ri, rCtx, ok := ctx.RouteInfo(req)
if assert.True(t, ok) {
req = rCtx
- bverr := ctx.BindValidRequest(req, ri, rbn(func(r *http.Request, rr *MatchedRoute) error {
+ err := ctx.BindValidRequest(req, ri, rbn(func(r *http.Request, rr *MatchedRoute) error {
return nil
}))
- assert.NoError(t, bverr)
- //assert.Equal(t, io.EOF, bverr)
+ assert.NoError(t, err)
+ //assert.Equal(t, io.EOF, err)
}
}
diff --git a/vendor/github.com/go-openapi/runtime/middleware/context.go b/vendor/github.com/go-openapi/runtime/middleware/context.go
index c5c6c6efc..8b472d9c0 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/context.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/context.go
@@ -75,6 +75,7 @@ type Context struct {
analyzer *analysis.Spec
api RoutableAPI
router Router
+ formats strfmt.Registry
}
type routableUntypedAPI struct {
@@ -172,9 +173,6 @@ func (r *routableUntypedAPI) ProducersFor(mediaTypes []string) map[string]runtim
func (r *routableUntypedAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator {
return r.api.AuthenticatorsFor(schemes)
}
-func (r *routableUntypedAPI) Authorizer() runtime.Authorizer {
- return r.api.Authorizer()
-}
func (r *routableUntypedAPI) Formats() strfmt.Registry {
return r.api.Formats()
}
@@ -227,9 +225,12 @@ const (
ctxContentType
ctxResponseFormat
ctxMatchedRoute
+ ctxAllowedMethods
ctxBoundParams
ctxSecurityPrincipal
ctxSecurityScopes
+
+ ctxConsumer
)
type contentTypeValue struct {
@@ -395,11 +396,6 @@ func (c *Context) Authorize(request *http.Request, route *MatchedRoute) (interfa
}
continue
}
- if route.Authorizer != nil {
- if err := route.Authorizer.Authorize(request, usr); err != nil {
- return nil, nil, errors.New(http.StatusForbidden, err.Error())
- }
- }
rCtx = stdContext.WithValue(rCtx, ctxSecurityPrincipal, usr)
rCtx = stdContext.WithValue(rCtx, ctxSecurityScopes, route.Scopes[scheme])
return usr, request.WithContext(rCtx), nil
@@ -546,7 +542,7 @@ func (c *Context) APIHandler(builder Builder) http.Handler {
Title: title,
}
- return Spec("", c.spec.Raw(), Redoc(redocOpts, c.RoutesHandler(b)))
+ return Spec("", c.spec.Raw(), Redoc(redocOpts, c.RoutesHandler(builder)))
}
// RoutesHandler returns a handler to serve the API, just the routes and the contract defined in the swagger spec
diff --git a/vendor/github.com/go-openapi/runtime/middleware/context_test.go b/vendor/github.com/go-openapi/runtime/middleware/context_test.go
index e236ece89..d02d3c4c3 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/context_test.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/context_test.go
@@ -39,6 +39,13 @@ func (s *stubOperationHandler) Handle(params interface{}) (interface{}, error) {
return nil, nil
}
+type testBinder struct {
+}
+
+func (t *testBinder) BindRequest(r *http.Request, m *MatchedRoute) error {
+ return nil
+}
+
func init() {
loads.AddLoader(fmts.YAMLMatcher, fmts.YAMLDoc)
}
@@ -131,32 +138,6 @@ func TestContextAuthorize(t *testing.T) {
assert.Equal(t, request, reqCtx)
}
-func TestContextAuthorize_WithAuthorizer(t *testing.T) {
- spec, api := petstore.NewAPI(t)
- ctx := NewContext(spec, api, nil)
- ctx.router = DefaultRouter(spec, ctx.api)
-
- request, _ := runtime.JSONRequest("POST", "/api/pets", nil)
-
- ri, reqWithCtx, ok := ctx.RouteInfo(request)
- assert.True(t, ok)
- assert.NotNil(t, reqWithCtx)
-
- request = reqWithCtx
-
- request.SetBasicAuth("topuser", "topuser")
- p, reqWithCtx, err := ctx.Authorize(request, ri)
- assert.Error(t, err)
- assert.Nil(t, p)
- assert.Nil(t, reqWithCtx)
-
- request.SetBasicAuth("admin", "admin")
- p, reqWithCtx, err = ctx.Authorize(request, ri)
- assert.NoError(t, err)
- assert.Equal(t, "admin", p)
- assert.NotNil(t, reqWithCtx)
-}
-
func TestContextNegotiateContentType(t *testing.T) {
spec, api := petstore.NewAPI(t)
ctx := NewContext(spec, api, nil)
@@ -259,7 +240,6 @@ func TestContextRender(t *testing.T) {
ri, request, _ = ctx.RouteInfo(request)
ctx.Respond(recorder, request, ri.Produces, ri, nil)
assert.Equal(t, 204, recorder.Code)
-
}
func TestContextValidResponseFormat(t *testing.T) {
@@ -286,7 +266,7 @@ func TestContextValidResponseFormat(t *testing.T) {
assert.Equal(t, ct, cached)
// check if the cast works and fetch from cache too
- mt, _ = ctx.ResponseFormat(request, []string{ct})
+ mt, request = ctx.ResponseFormat(request, []string{ct})
assert.Equal(t, ct, mt)
}
diff --git a/vendor/github.com/go-openapi/runtime/middleware/header/header.go b/vendor/github.com/go-openapi/runtime/middleware/header/header.go
index 3e342258b..4bfde8b86 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/header/header.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/header/header.go
@@ -46,8 +46,8 @@ func init() {
var t octetType
isCtl := c <= 31 || c == 127
isChar := 0 <= c && c <= 127
- isSeparator := strings.ContainsRune(" \t\"(),/:;<=>?@[]\\{}", rune(c))
- if strings.ContainsRune(" \t\r\n", rune(c)) {
+ isSeparator := strings.IndexRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) >= 0
+ if strings.IndexRune(" \t\r\n", rune(c)) >= 0 {
t |= isSpace
}
if isChar && !isCtl && !isSeparator {
@@ -167,13 +167,11 @@ func parseValueAndParams(s string) (value string, params map[string]string) {
return
}
-// AcceptSpec ...
type AcceptSpec struct {
Value string
Q float64
}
-// ParseAccept2 ...
func ParseAccept2(header http.Header, key string) (specs []AcceptSpec) {
for _, en := range ParseList(header, key) {
v, p := parseValueAndParams(en)
diff --git a/vendor/github.com/go-openapi/runtime/middleware/parameter.go b/vendor/github.com/go-openapi/runtime/middleware/parameter.go
index 8975b6e1c..9eb39c82e 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/parameter.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/parameter.go
@@ -193,28 +193,28 @@ func (p *untypedParamBinder) Bind(request *http.Request, routeParams RouteParams
}
if mt == "multipart/form-data" {
- if err = request.ParseMultipartForm(defaultMaxMemory); err != nil {
+ if err := request.ParseMultipartForm(defaultMaxMemory); err != nil {
return errors.NewParseError(p.Name, p.parameter.In, "", err)
}
}
- if err = request.ParseForm(); err != nil {
+ if err := request.ParseForm(); err != nil {
return errors.NewParseError(p.Name, p.parameter.In, "", err)
}
if p.parameter.Type == "file" {
- file, header, ffErr := request.FormFile(p.parameter.Name)
- if ffErr != nil {
- return errors.NewParseError(p.Name, p.parameter.In, "", ffErr)
+ file, header, err := request.FormFile(p.parameter.Name)
+ if err != nil {
+ return errors.NewParseError(p.Name, p.parameter.In, "", err)
}
target.Set(reflect.ValueOf(runtime.File{Data: file, Header: header}))
return nil
}
if request.MultipartForm != nil {
- data, custom, hasKey, rvErr := p.readValue(runtime.Values(request.MultipartForm.Value), target)
- if rvErr != nil {
- return rvErr
+ data, custom, hasKey, err := p.readValue(runtime.Values(request.MultipartForm.Value), target)
+ if err != nil {
+ return err
}
if custom {
return nil
diff --git a/vendor/github.com/go-openapi/runtime/middleware/parameter_test.go b/vendor/github.com/go-openapi/runtime/middleware/parameter_test.go
index d0524ab9a..8cba12145 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/parameter_test.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/parameter_test.go
@@ -28,9 +28,9 @@ import (
"github.com/stretchr/testify/assert"
)
-// type email struct {
-// Address string
-// }
+type email struct {
+ Address string
+}
type paramFactory func(string) *spec.Parameter
diff --git a/vendor/github.com/go-openapi/runtime/middleware/redoc.go b/vendor/github.com/go-openapi/runtime/middleware/redoc.go
index 21277948c..23ce367e6 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/redoc.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/redoc.go
@@ -51,7 +51,7 @@ func Redoc(opts RedocOpts, next http.Handler) http.Handler {
tmpl := template.Must(template.New("redoc").Parse(redocTemplate))
buf := bytes.NewBuffer(nil)
- _ = tmpl.Execute(buf, opts)
+ tmpl.Execute(buf, opts)
b := buf.Bytes()
return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
@@ -59,14 +59,14 @@ func Redoc(opts RedocOpts, next http.Handler) http.Handler {
rw.Header().Set("Content-Type", "text/html; charset=utf-8")
rw.WriteHeader(http.StatusOK)
- _, _ = rw.Write(b)
+ rw.Write(b)
return
}
if next == nil {
rw.Header().Set("Content-Type", "text/plain")
rw.WriteHeader(http.StatusNotFound)
- _, _ = rw.Write([]byte(fmt.Sprintf("%q not found", pth)))
+ rw.Write([]byte(fmt.Sprintf("%q not found", pth)))
return
}
next.ServeHTTP(rw, r)
diff --git a/vendor/github.com/go-openapi/runtime/middleware/request.go b/vendor/github.com/go-openapi/runtime/middleware/request.go
index ee725f587..6171ca71b 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/request.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/request.go
@@ -54,7 +54,7 @@ func (o *untypedRequestBinder) Bind(request *http.Request, routeParams RoutePara
debugLog("binding %d parameters for %s %s", len(o.Parameters), request.Method, request.URL.EscapedPath())
for fieldName, param := range o.Parameters {
binder := o.paramBinders[fieldName]
- debugLog("binding parameter %s for %s %s", fieldName, request.Method, request.URL.EscapedPath())
+ debugLog("binding paramter %s for %s %s", fieldName, request.Method, request.URL.EscapedPath())
var target reflect.Value
if !isMap {
binder.Name = fieldName
diff --git a/vendor/github.com/go-openapi/runtime/middleware/request_test.go b/vendor/github.com/go-openapi/runtime/middleware/request_test.go
index 395065b80..091bad07d 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/request_test.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/request_test.go
@@ -67,6 +67,21 @@ type jsonRequestSlice struct {
Friend []friend
}
+type jsonRequestAllTypes struct {
+ Confirmed bool
+ Planned strfmt.Date
+ Delivered strfmt.DateTime
+ Age int32
+ ID int64
+ Score float32
+ Factor float64
+ Friend friend
+ Name string
+ Tags []string
+ Picture []byte
+ RequestID int64
+}
+
func parametersForAllTypes(fmt string) map[string]spec.Parameter {
if fmt == "" {
fmt = "csv"
@@ -284,7 +299,7 @@ func TestRequestBindingForValid(t *testing.T) {
binder := newUntypedRequestBinder(op1, new(spec.Swagger), strfmt.Default)
lval := []string{"one", "two", "three"}
- var queryString string
+ queryString := ""
switch fmt {
case "multi":
queryString = strings.Join(lval, "&tags=")
@@ -413,8 +428,8 @@ func TestBindingFileUpload(t *testing.T) {
part, err := writer.CreateFormFile("file", "plain-jane.txt")
assert.NoError(t, err)
- _, _ = part.Write([]byte("the file contents"))
- _ = writer.WriteField("name", "the-name")
+ part.Write([]byte("the file contents"))
+ writer.WriteField("name", "the-name")
assert.NoError(t, writer.Close())
urlStr := "http://localhost:8002/hello"
@@ -447,8 +462,8 @@ func TestBindingFileUpload(t *testing.T) {
part, err = writer.CreateFormFile("bad-name", "plain-jane.txt")
assert.NoError(t, err)
- _, _ = part.Write([]byte("the file contents"))
- _ = writer.WriteField("name", "the-name")
+ part.Write([]byte("the file contents"))
+ writer.WriteField("name", "the-name")
assert.NoError(t, writer.Close())
req, _ = http.NewRequest("POST", urlStr, body)
req.Header.Set("Content-Type", writer.FormDataContentType())
@@ -458,7 +473,7 @@ func TestBindingFileUpload(t *testing.T) {
req, _ = http.NewRequest("POST", urlStr, body)
req.Header.Set("Content-Type", writer.FormDataContentType())
- _, _ = req.MultipartReader()
+ req.MultipartReader()
data = fileRequest{}
assert.Error(t, binder.Bind(req, nil, runtime.JSONConsumer(), &data))
diff --git a/vendor/github.com/go-openapi/runtime/middleware/router.go b/vendor/github.com/go-openapi/runtime/middleware/router.go
index 6ae490508..44e7fae38 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/router.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/router.go
@@ -92,7 +92,6 @@ type RoutableAPI interface {
ConsumersFor([]string) map[string]runtime.Consumer
ProducersFor([]string) map[string]runtime.Producer
AuthenticatorsFor(map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- Authorizer() runtime.Authorizer
Formats() strfmt.Registry
DefaultProduces() string
DefaultConsumes() string
@@ -113,6 +112,7 @@ type defaultRouteBuilder struct {
type defaultRouter struct {
spec *loads.Document
+ api RoutableAPI
routers map[string]*denco.Router
}
@@ -153,7 +153,6 @@ type routeEntry struct {
Formats strfmt.Registry
Binder *untypedRequestBinder
Authenticators map[string]runtime.Authenticator
- Authorizer runtime.Authorizer
Scopes map[string][]string
}
@@ -249,7 +248,6 @@ func (d *defaultRouteBuilder) AddRoute(method, path string, operation *spec.Oper
Formats: d.api.Formats(),
Binder: newUntypedRequestBinder(parameters, d.spec.Spec(), d.api.Formats()),
Authenticators: d.api.AuthenticatorsFor(definitions),
- Authorizer: d.api.Authorizer(),
Scopes: scopes,
})
d.records[mn] = append(d.records[mn], record)
@@ -260,7 +258,7 @@ func (d *defaultRouteBuilder) Build() *defaultRouter {
routers := make(map[string]*denco.Router)
for method, records := range d.records {
router := denco.New()
- _ = router.Build(records)
+ router.Build(records)
routers[method] = router
}
return &defaultRouter{
diff --git a/vendor/github.com/go-openapi/runtime/middleware/security.go b/vendor/github.com/go-openapi/runtime/middleware/security.go
index 399058310..1e21a81af 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/security.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/security.go
@@ -27,12 +27,12 @@ func newSecureAPI(ctx *Context, next http.Handler) http.Handler {
return
}
- _, rCtx, err := ctx.Authorize(r, route)
- if err != nil {
+ if _, rCtx, err := ctx.Authorize(r, route); err != nil {
ctx.Respond(rw, r, route.Produces, route, err)
return
+ } else {
+ r = rCtx
}
- r = rCtx
next.ServeHTTP(rw, r)
})
diff --git a/vendor/github.com/go-openapi/runtime/middleware/spec.go b/vendor/github.com/go-openapi/runtime/middleware/spec.go
index 72bc5643a..8a09fb75f 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/spec.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/spec.go
@@ -33,7 +33,7 @@ func Spec(basePath string, b []byte, next http.Handler) http.Handler {
if r.URL.Path == pth {
rw.Header().Set("Content-Type", "application/json")
rw.WriteHeader(http.StatusOK)
- _, _ = rw.Write(b)
+ rw.Write(b)
return
}
diff --git a/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go b/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go
index 3b0cd4e28..3e7b37db8 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/untyped/api.go
@@ -57,7 +57,6 @@ type API struct {
consumers map[string]runtime.Consumer
producers map[string]runtime.Producer
authenticators map[string]runtime.Authenticator
- authorizer runtime.Authorizer
operations map[string]map[string]runtime.OperationHandler
ServeError func(http.ResponseWriter, *http.Request, error)
Models map[string]func() interface{}
@@ -106,11 +105,6 @@ func (d *API) RegisterAuth(scheme string, handler runtime.Authenticator) {
d.authenticators[scheme] = handler
}
-// RegisterAuthorizer registers an authorizer handler in this api
-func (d *API) RegisterAuthorizer(handler runtime.Authorizer) {
- d.authorizer = handler
-}
-
// RegisterConsumer registers a consumer for a media type.
func (d *API) RegisterConsumer(mediaType string, handler runtime.Consumer) {
if d.consumers == nil {
@@ -184,11 +178,6 @@ func (d *API) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[stri
return result
}
-// AuthorizersFor returns the registered authorizer
-func (d *API) Authorizer() runtime.Authorizer {
- return d.authorizer
-}
-
// Validate validates this API for any missing items
func (d *API) Validate() error {
return d.validate()
diff --git a/vendor/github.com/go-openapi/runtime/middleware/untyped/api_test.go b/vendor/github.com/go-openapi/runtime/middleware/untyped/api_test.go
index 551bec71f..580fb6215 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/untyped/api_test.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/untyped/api_test.go
@@ -16,7 +16,6 @@ package untyped
import (
"io"
- "net/http"
"sort"
"testing"
@@ -32,10 +31,6 @@ func stubAutenticator() runtime.Authenticator {
return runtime.AuthenticatorFunc(func(_ interface{}) (bool, interface{}, error) { return false, nil, nil })
}
-func stubAuthorizer() runtime.Authorizer {
- return runtime.AuthorizerFunc(func(_ *http.Request, _ interface{}) error { return nil })
-}
-
type stubConsumer struct {
}
@@ -68,9 +63,7 @@ func TestUntypedAPIRegistrations(t *testing.T) {
api.RegisterProducer("application/yada-2", new(stubProducer))
api.RegisterOperation("get", "/{someId}", new(stubOperationHandler))
api.RegisterAuth("basic", stubAutenticator())
- api.RegisterAuthorizer(stubAuthorizer())
- assert.NotNil(t, api.authorizer)
assert.NotEmpty(t, api.authenticators)
_, ok := api.authenticators["basic"]
@@ -86,9 +79,6 @@ func TestUntypedAPIRegistrations(t *testing.T) {
_, ok = api.operations["GET"]["/{someId}"]
assert.True(t, ok)
- authorizer := api.Authorizer()
- assert.NotNil(t, authorizer)
-
h, ok := api.OperationHandlerFor("get", "/{someId}")
assert.True(t, ok)
assert.NotNil(t, h)
diff --git a/vendor/github.com/go-openapi/runtime/middleware/untyped_request_test.go b/vendor/github.com/go-openapi/runtime/middleware/untyped_request_test.go
index 5c226f62e..bc2af1f95 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/untyped_request_test.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/untyped_request_test.go
@@ -59,8 +59,8 @@ func TestUntypedFileUpload(t *testing.T) {
part, err := writer.CreateFormFile("file", "plain-jane.txt")
assert.NoError(t, err)
- _, _ = part.Write([]byte("the file contents"))
- _ = writer.WriteField("name", "the-name")
+ part.Write([]byte("the file contents"))
+ writer.WriteField("name", "the-name")
assert.NoError(t, writer.Close())
urlStr := "http://localhost:8002/hello"
@@ -95,8 +95,8 @@ func TestUntypedFileUpload(t *testing.T) {
part, err = writer.CreateFormFile("bad-name", "plain-jane.txt")
assert.NoError(t, err)
- _, _ = part.Write([]byte("the file contents"))
- _ = writer.WriteField("name", "the-name")
+ part.Write([]byte("the file contents"))
+ writer.WriteField("name", "the-name")
assert.NoError(t, writer.Close())
req, _ = http.NewRequest("POST", urlStr, body)
req.Header.Set("Content-Type", writer.FormDataContentType())
@@ -106,7 +106,7 @@ func TestUntypedFileUpload(t *testing.T) {
req, _ = http.NewRequest("POST", urlStr, body)
req.Header.Set("Content-Type", writer.FormDataContentType())
- _, _ = req.MultipartReader()
+ req.MultipartReader()
data = make(map[string]interface{})
assert.Error(t, binder.Bind(req, nil, runtime.JSONConsumer(), &data))
diff --git a/vendor/github.com/go-openapi/runtime/middleware/validation.go b/vendor/github.com/go-openapi/runtime/middleware/validation.go
index bb8df3cb3..8d6686f5d 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/validation.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/validation.go
@@ -24,6 +24,30 @@ import (
"github.com/go-openapi/swag"
)
+// NewValidation starts a new validation middleware
+func newValidation(ctx *Context, next http.Handler) http.Handler {
+
+ return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+ matched, rCtx, _ := ctx.RouteInfo(r)
+ if rCtx != nil {
+ r = rCtx
+ }
+ if matched == nil {
+ ctx.NotFound(rw, r)
+ return
+ }
+ _, r, result := ctx.BindAndValidate(r, matched)
+
+ if result != nil {
+ ctx.Respond(rw, r, matched.Produces, matched, result)
+ return
+ }
+
+ debugLog("no result for %s %s", r.Method, r.URL.EscapedPath())
+ next.ServeHTTP(rw, r)
+ })
+}
+
type validation struct {
context *Context
result []error
@@ -32,6 +56,15 @@ type validation struct {
bound map[string]interface{}
}
+type untypedBinder map[string]interface{}
+
+func (ub untypedBinder) BindRequest(r *http.Request, route *MatchedRoute, consumer runtime.Consumer) error {
+ if err := route.Binder.Bind(r, route.Params, consumer, ub); err != nil {
+ return err
+ }
+ return nil
+}
+
// ContentType validates the content type of a request
func validateContentType(allowed []string, actual string) error {
debugLog("validating content type for %q against [%s]", actual, strings.Join(allowed, ", "))
diff --git a/vendor/github.com/go-openapi/runtime/middleware/validation_test.go b/vendor/github.com/go-openapi/runtime/middleware/validation_test.go
index 10ec57879..de9107e1d 100644
--- a/vendor/github.com/go-openapi/runtime/middleware/validation_test.go
+++ b/vendor/github.com/go-openapi/runtime/middleware/validation_test.go
@@ -26,33 +26,11 @@ import (
"github.com/stretchr/testify/assert"
)
-func newTestValidation(ctx *Context, next http.Handler) http.Handler {
-
- return http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
- matched, rCtx, _ := ctx.RouteInfo(r)
- if rCtx != nil {
- r = rCtx
- }
- if matched == nil {
- ctx.NotFound(rw, r)
- return
- }
- _, r, result := ctx.BindAndValidate(r, matched)
-
- if result != nil {
- ctx.Respond(rw, r, matched.Produces, matched, result)
- return
- }
-
- next.ServeHTTP(rw, r)
- })
-}
-
func TestContentTypeValidation(t *testing.T) {
spec, api := petstore.NewAPI(t)
context := NewContext(spec, api, nil)
context.router = DefaultRouter(spec, context.api)
- mw := newTestValidation(context, http.HandlerFunc(terminator))
+ mw := newValidation(context, http.HandlerFunc(terminator))
recorder := httptest.NewRecorder()
request, _ := http.NewRequest("GET", "/api/pets", nil)
@@ -104,7 +82,7 @@ func TestResponseFormatValidation(t *testing.T) {
spec, api := petstore.NewAPI(t)
context := NewContext(spec, api, nil)
context.router = DefaultRouter(spec, context.api)
- mw := newTestValidation(context, http.HandlerFunc(terminator))
+ mw := newValidation(context, http.HandlerFunc(terminator))
recorder := httptest.NewRecorder()
request, _ := http.NewRequest("POST", "/api/pets", bytes.NewBuffer([]byte(`name: Dog`)))
diff --git a/vendor/github.com/go-openapi/runtime/security/authorizer.go b/vendor/github.com/go-openapi/runtime/security/authorizer.go
deleted file mode 100644
index 00c1a4d6a..000000000
--- a/vendor/github.com/go-openapi/runtime/security/authorizer.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// 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 security
-
-import (
- "net/http"
-
- "github.com/go-openapi/runtime"
-)
-
-// Authorized provides a default implementation of the Authorizer interface where all
-// requests are authorized (successful)
-func Authorized() runtime.Authorizer {
- return runtime.AuthorizerFunc(func(_ *http.Request, _ interface{}) error { return nil })
-}
diff --git a/vendor/github.com/go-openapi/runtime/security/authorizer_test.go b/vendor/github.com/go-openapi/runtime/security/authorizer_test.go
deleted file mode 100644
index 7f1f9b053..000000000
--- a/vendor/github.com/go-openapi/runtime/security/authorizer_test.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright 2015 go-swagger maintainers
-//
-// 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 security
-
-import (
- "testing"
-
- "github.com/stretchr/testify/assert"
-)
-
-func TestAuthorized(t *testing.T) {
- authorizer := Authorized()
-
- err := authorizer.Authorize(nil, nil)
- assert.NoError(t, err)
-}
diff --git a/vendor/github.com/go-openapi/runtime/security/bearer_auth_test.go b/vendor/github.com/go-openapi/runtime/security/bearer_auth_test.go
index 899dc73d9..0e577175a 100644
--- a/vendor/github.com/go-openapi/runtime/security/bearer_auth_test.go
+++ b/vendor/github.com/go-openapi/runtime/security/bearer_auth_test.go
@@ -49,7 +49,7 @@ func TestValidBearerAuth(t *testing.T) {
mpbody := bytes.NewBuffer(nil)
writer := multipart.NewWriter(mpbody)
- _ = writer.WriteField("access_token", "token123")
+ writer.WriteField("access_token", "token123")
writer.Close()
req4, _ := http.NewRequest("POST", "/blah", mpbody)
req4.Header.Set("Content-Type", writer.FormDataContentType())
@@ -90,7 +90,7 @@ func TestInvalidBearerAuth(t *testing.T) {
mpbody := bytes.NewBuffer(nil)
writer := multipart.NewWriter(mpbody)
- _ = writer.WriteField("access_token", "token124")
+ writer.WriteField("access_token", "token124")
writer.Close()
req4, _ := http.NewRequest("POST", "/blah", mpbody)
req4.Header.Set("Content-Type", writer.FormDataContentType())
@@ -131,7 +131,7 @@ func TestMissingBearerAuth(t *testing.T) {
mpbody := bytes.NewBuffer(nil)
writer := multipart.NewWriter(mpbody)
- _ = writer.WriteField("access_toke", "token123")
+ writer.WriteField("access_toke", "token123")
writer.Close()
req4, _ := http.NewRequest("POST", "/blah", mpbody)
req4.Header.Set("Content-Type", writer.FormDataContentType())
diff --git a/vendor/github.com/go-sql-driver/mysql/connection.go b/vendor/github.com/go-sql-driver/mysql/connection.go
index b07528653..2630f5211 100644
--- a/vendor/github.com/go-sql-driver/mysql/connection.go
+++ b/vendor/github.com/go-sql-driver/mysql/connection.go
@@ -81,16 +81,6 @@ func (mc *mysqlConn) handleParams() (err error) {
return
}
-func (mc *mysqlConn) markBadConn(err error) error {
- if mc == nil {
- return err
- }
- if err != errBadConnNoWrite {
- return err
- }
- return driver.ErrBadConn
-}
-
func (mc *mysqlConn) Begin() (driver.Tx, error) {
if mc.closed.IsSet() {
errLog.Print(ErrInvalidConn)
@@ -100,7 +90,8 @@ func (mc *mysqlConn) Begin() (driver.Tx, error) {
if err == nil {
return &mysqlTx{mc}, err
}
- return nil, mc.markBadConn(err)
+
+ return nil, err
}
func (mc *mysqlConn) Close() (err error) {
@@ -151,7 +142,7 @@ func (mc *mysqlConn) Prepare(query string) (driver.Stmt, error) {
// Send command
err := mc.writeCommandPacketStr(comStmtPrepare, query)
if err != nil {
- return nil, mc.markBadConn(err)
+ return nil, err
}
stmt := &mysqlStmt{
@@ -185,7 +176,7 @@ func (mc *mysqlConn) interpolateParams(query string, args []driver.Value) (strin
if buf == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return "", ErrInvalidConn
+ return "", driver.ErrBadConn
}
buf = buf[:0]
argPos := 0
@@ -323,14 +314,14 @@ func (mc *mysqlConn) Exec(query string, args []driver.Value) (driver.Result, err
insertId: int64(mc.insertId),
}, err
}
- return nil, mc.markBadConn(err)
+ return nil, err
}
// Internal function to execute commands
func (mc *mysqlConn) exec(query string) error {
// Send command
if err := mc.writeCommandPacketStr(comQuery, query); err != nil {
- return mc.markBadConn(err)
+ return err
}
// Read Result
@@ -399,7 +390,7 @@ func (mc *mysqlConn) query(query string, args []driver.Value) (*textRows, error)
return rows, err
}
}
- return nil, mc.markBadConn(err)
+ return nil, err
}
// Gets the value of the given MySQL System Variable
diff --git a/vendor/github.com/go-sql-driver/mysql/errors.go b/vendor/github.com/go-sql-driver/mysql/errors.go
index d0d0d2e11..857854e14 100644
--- a/vendor/github.com/go-sql-driver/mysql/errors.go
+++ b/vendor/github.com/go-sql-driver/mysql/errors.go
@@ -31,12 +31,6 @@ var (
ErrPktSyncMul = errors.New("commands out of sync. Did you run multiple statements at once?")
ErrPktTooLarge = errors.New("packet for query is too large. Try adjusting the 'max_allowed_packet' variable on the server")
ErrBusyBuffer = errors.New("busy buffer")
-
- // errBadConnNoWrite is used for connection errors where nothing was sent to the database yet.
- // If this happens first in a function starting a database interaction, it should be replaced by driver.ErrBadConn
- // to trigger a resend.
- // See https://github.com/go-sql-driver/mysql/pull/302
- errBadConnNoWrite = errors.New("bad connection")
)
var errLog = Logger(log.New(os.Stderr, "[mysql] ", log.Ldate|log.Ltime|log.Lshortfile))
diff --git a/vendor/github.com/go-sql-driver/mysql/packets.go b/vendor/github.com/go-sql-driver/mysql/packets.go
index 79648d572..461fbed9f 100644
--- a/vendor/github.com/go-sql-driver/mysql/packets.go
+++ b/vendor/github.com/go-sql-driver/mysql/packets.go
@@ -35,7 +35,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
}
errLog.Print(err)
mc.Close()
- return nil, ErrInvalidConn
+ return nil, driver.ErrBadConn
}
// packet length [24 bit]
@@ -57,7 +57,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
if prevData == nil {
errLog.Print(ErrMalformPkt)
mc.Close()
- return nil, ErrInvalidConn
+ return nil, driver.ErrBadConn
}
return prevData, nil
@@ -71,7 +71,7 @@ func (mc *mysqlConn) readPacket() ([]byte, error) {
}
errLog.Print(err)
mc.Close()
- return nil, ErrInvalidConn
+ return nil, driver.ErrBadConn
}
// return data if this was the last packet
@@ -137,14 +137,10 @@ func (mc *mysqlConn) writePacket(data []byte) error {
if cerr := mc.canceled.Value(); cerr != nil {
return cerr
}
- if n == 0 && pktLen == len(data)-4 {
- // only for the first loop iteration when nothing was written yet
- return errBadConnNoWrite
- }
mc.cleanup()
errLog.Print(err)
}
- return ErrInvalidConn
+ return driver.ErrBadConn
}
}
@@ -278,7 +274,7 @@ func (mc *mysqlConn) writeAuthPacket(cipher []byte) error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// ClientFlags [32 bit]
@@ -366,7 +362,7 @@ func (mc *mysqlConn) writeOldAuthPacket(cipher []byte) error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// Add the scrambled password [null terminated string]
@@ -385,7 +381,7 @@ func (mc *mysqlConn) writeClearAuthPacket() error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// Add the clear password [null terminated string]
@@ -408,7 +404,7 @@ func (mc *mysqlConn) writeNativeAuthPacket(cipher []byte) error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// Add the scramble
@@ -429,7 +425,7 @@ func (mc *mysqlConn) writeCommandPacket(command byte) error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// Add command byte
@@ -448,7 +444,7 @@ func (mc *mysqlConn) writeCommandPacketStr(command byte, arg string) error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// Add command byte
@@ -469,7 +465,7 @@ func (mc *mysqlConn) writeCommandPacketUint32(command byte, arg uint32) error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// Add command byte
@@ -935,7 +931,7 @@ func (stmt *mysqlStmt) writeExecutePacket(args []driver.Value) error {
if data == nil {
// can not take the buffer. Something must be wrong with the connection
errLog.Print(ErrBusyBuffer)
- return errBadConnNoWrite
+ return driver.ErrBadConn
}
// command [1 byte]
diff --git a/vendor/github.com/go-sql-driver/mysql/packets_test.go b/vendor/github.com/go-sql-driver/mysql/packets_test.go
index 2f8207511..31c892d85 100644
--- a/vendor/github.com/go-sql-driver/mysql/packets_test.go
+++ b/vendor/github.com/go-sql-driver/mysql/packets_test.go
@@ -9,6 +9,7 @@
package mysql
import (
+ "database/sql/driver"
"errors"
"net"
"testing"
@@ -251,8 +252,8 @@ func TestReadPacketFail(t *testing.T) {
conn.data = []byte{0x00, 0x00, 0x00, 0x00}
conn.maxReads = 1
_, err := mc.readPacket()
- if err != ErrInvalidConn {
- t.Errorf("expected ErrInvalidConn, got %v", err)
+ if err != driver.ErrBadConn {
+ t.Errorf("expected ErrBadConn, got %v", err)
}
// reset
@@ -263,8 +264,8 @@ func TestReadPacketFail(t *testing.T) {
// fail to read header
conn.closed = true
_, err = mc.readPacket()
- if err != ErrInvalidConn {
- t.Errorf("expected ErrInvalidConn, got %v", err)
+ if err != driver.ErrBadConn {
+ t.Errorf("expected ErrBadConn, got %v", err)
}
// reset
@@ -276,7 +277,7 @@ func TestReadPacketFail(t *testing.T) {
// fail to read body
conn.maxReads = 1
_, err = mc.readPacket()
- if err != ErrInvalidConn {
- t.Errorf("expected ErrInvalidConn, got %v", err)
+ if err != driver.ErrBadConn {
+ t.Errorf("expected ErrBadConn, got %v", err)
}
}
diff --git a/vendor/github.com/go-sql-driver/mysql/statement.go b/vendor/github.com/go-sql-driver/mysql/statement.go
index ae223507f..ae6d33b72 100644
--- a/vendor/github.com/go-sql-driver/mysql/statement.go
+++ b/vendor/github.com/go-sql-driver/mysql/statement.go
@@ -52,7 +52,7 @@ func (stmt *mysqlStmt) Exec(args []driver.Value) (driver.Result, error) {
// Send command
err := stmt.writeExecutePacket(args)
if err != nil {
- return nil, stmt.mc.markBadConn(err)
+ return nil, err
}
mc := stmt.mc
@@ -100,7 +100,7 @@ func (stmt *mysqlStmt) query(args []driver.Value) (*binaryRows, error) {
// Send command
err := stmt.writeExecutePacket(args)
if err != nil {
- return nil, stmt.mc.markBadConn(err)
+ return nil, err
}
mc := stmt.mc
diff --git a/vendor/github.com/hashicorp/hcl/decoder.go b/vendor/github.com/hashicorp/hcl/decoder.go
index 6e75ece8e..b88f322a8 100644
--- a/vendor/github.com/hashicorp/hcl/decoder.go
+++ b/vendor/github.com/hashicorp/hcl/decoder.go
@@ -137,7 +137,7 @@ func (d *decoder) decodeBool(name string, node ast.Node, result reflect.Value) e
func (d *decoder) decodeFloat(name string, node ast.Node, result reflect.Value) error {
switch n := node.(type) {
case *ast.LiteralType:
- if n.Token.Type == token.FLOAT {
+ if n.Token.Type == token.FLOAT || n.Token.Type == token.NUMBER {
v, err := strconv.ParseFloat(n.Token.Text, 64)
if err != nil {
return err
diff --git a/vendor/github.com/hashicorp/hcl/decoder_test.go b/vendor/github.com/hashicorp/hcl/decoder_test.go
index 38363ad1b..8682f470e 100644
--- a/vendor/github.com/hashicorp/hcl/decoder_test.go
+++ b/vendor/github.com/hashicorp/hcl/decoder_test.go
@@ -73,6 +73,7 @@ func TestDecode_interface(t *testing.T) {
false,
map[string]interface{}{
"a": 1.02,
+ "b": 2,
},
},
{
@@ -811,6 +812,7 @@ func TestDecode_intString(t *testing.T) {
func TestDecode_float32(t *testing.T) {
var value struct {
A float32 `hcl:"a"`
+ B float32 `hcl:"b"`
}
err := Decode(&value, testReadFile(t, "float.hcl"))
@@ -821,11 +823,15 @@ func TestDecode_float32(t *testing.T) {
if got, want := value.A, float32(1.02); got != want {
t.Fatalf("wrong result %#v; want %#v", got, want)
}
+ if got, want := value.B, float32(2); got != want {
+ t.Fatalf("wrong result %#v; want %#v", got, want)
+ }
}
func TestDecode_float64(t *testing.T) {
var value struct {
A float64 `hcl:"a"`
+ B float64 `hcl:"b"`
}
err := Decode(&value, testReadFile(t, "float.hcl"))
@@ -836,6 +842,9 @@ func TestDecode_float64(t *testing.T) {
if got, want := value.A, float64(1.02); got != want {
t.Fatalf("wrong result %#v; want %#v", got, want)
}
+ if got, want := value.B, float64(2); got != want {
+ t.Fatalf("wrong result %#v; want %#v", got, want)
+ }
}
func TestDecode_intStringAliased(t *testing.T) {
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl b/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl
index eed44e542..edf355e38 100644
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl
+++ b/vendor/github.com/hashicorp/hcl/test-fixtures/float.hcl
@@ -1 +1,2 @@
a = 1.02
+b = 2
diff --git a/vendor/github.com/hashicorp/hcl/test-fixtures/float.json b/vendor/github.com/hashicorp/hcl/test-fixtures/float.json
index a9d1ab4b0..580868043 100644
--- a/vendor/github.com/hashicorp/hcl/test-fixtures/float.json
+++ b/vendor/github.com/hashicorp/hcl/test-fixtures/float.json
@@ -1,3 +1,4 @@
{
- "a": 1.02
+ "a": 1.02,
+ "b": 2
}
diff --git a/vendor/github.com/iron-io/iron_go3/README.md b/vendor/github.com/iron-io/iron_go3/README.md
index d96897b9c..d683cf448 100644
--- a/vendor/github.com/iron-io/iron_go3/README.md
+++ b/vendor/github.com/iron-io/iron_go3/README.md
@@ -38,7 +38,7 @@ To start using iron_go, you need to sign up and get an oauth token.
import "github.com/iron-io/iron_go3/mq"
```
-2\. [Setup your Iron.io credentials](http://dev.iron.io/mq/reference/configuration/)
+2\. [Setup your Iron.io credentials](http://dev.iron.io/mq/3/reference/configuration/)
3\. Create an IronMQ client object:
diff --git a/vendor/github.com/json-iterator/go/.travis.yml b/vendor/github.com/json-iterator/go/.travis.yml
index 945b9c594..449e67cd0 100644
--- a/vendor/github.com/json-iterator/go/.travis.yml
+++ b/vendor/github.com/json-iterator/go/.travis.yml
@@ -2,6 +2,7 @@ language: go
go:
- 1.8.x
+ - 1.x
before_install:
- go get -t -v ./...
diff --git a/vendor/github.com/json-iterator/go/README.md b/vendor/github.com/json-iterator/go/README.md
index 23a4b57c8..bff7544ce 100644
--- a/vendor/github.com/json-iterator/go/README.md
+++ b/vendor/github.com/json-iterator/go/README.md
@@ -76,5 +76,7 @@ Contributors
* [thockin](https://github.com/thockin)
* [mattn](https://github.com/mattn)
* [cch123](https://github.com/cch123)
+* [Oleg Shaldybin](https://github.com/olegshaldybin)
+* [Jason Toffaletti](https://github.com/toffaletti)
Report issue or pull request, or email taowen@gmail.com, or [](https://gitter.im/json-iterator/Lobby)
diff --git a/vendor/github.com/json-iterator/go/extra/fuzzy_decoder.go b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder.go
index 2dae7af45..9b63c277f 100644
--- a/vendor/github.com/json-iterator/go/extra/fuzzy_decoder.go
+++ b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder.go
@@ -2,12 +2,13 @@ package extra
import (
"encoding/json"
- "github.com/json-iterator/go"
+ "io"
"math"
"reflect"
"strings"
"unsafe"
- "io"
+
+ "github.com/json-iterator/go"
)
const maxUint = ^uint(0)
@@ -200,6 +201,12 @@ func (decoder *fuzzyIntegerDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.It
str = string(number)
case jsoniter.StringValue:
str = iter.ReadString()
+ case jsoniter.BoolValue:
+ if iter.ReadBool() {
+ str = "1"
+ } else {
+ str = "0"
+ }
default:
iter.ReportError("fuzzyIntegerDecoder", "not number or string")
}
@@ -229,6 +236,13 @@ func (decoder *fuzzyFloat32Decoder) Decode(ptr unsafe.Pointer, iter *jsoniter.It
if newIter.Error != nil && newIter.Error != io.EOF {
iter.Error = newIter.Error
}
+ case jsoniter.BoolValue:
+ // support bool to float32
+ if iter.ReadBool() {
+ *((*float32)(ptr)) = 1
+ } else {
+ *((*float32)(ptr)) = 0
+ }
default:
iter.ReportError("fuzzyFloat32Decoder", "not number or string")
}
@@ -251,6 +265,13 @@ func (decoder *fuzzyFloat64Decoder) Decode(ptr unsafe.Pointer, iter *jsoniter.It
if newIter.Error != nil && newIter.Error != io.EOF {
iter.Error = newIter.Error
}
+ case jsoniter.BoolValue:
+ // support bool to float64
+ if iter.ReadBool() {
+ *((*float64)(ptr)) = 1
+ } else {
+ *((*float64)(ptr)) = 0
+ }
default:
iter.ReportError("fuzzyFloat32Decoder", "not number or string")
}
diff --git a/vendor/github.com/json-iterator/go/extra/fuzzy_decoder_test.go b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder_test.go
index a59bf7c51..b6a15596d 100644
--- a/vendor/github.com/json-iterator/go/extra/fuzzy_decoder_test.go
+++ b/vendor/github.com/json-iterator/go/extra/fuzzy_decoder_test.go
@@ -38,6 +38,12 @@ func Test_any_to_int64(t *testing.T) {
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(int64(10), val)
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(int64(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(int64(1), val)
+
should.Nil(jsoniter.UnmarshalFromString(`-10`, &val))
should.Equal(int64(-10), val)
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
@@ -57,6 +63,13 @@ func Test_any_to_int(t *testing.T) {
should.Equal(10, val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(10, val)
+
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(0, val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(1, val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
// large float to int
@@ -74,6 +87,13 @@ func Test_any_to_int16(t *testing.T) {
should.Equal(int16(10), val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(int16(10), val)
+
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(int16(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(int16(1), val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
// large float to int
@@ -91,6 +111,13 @@ func Test_any_to_int32(t *testing.T) {
should.Equal(int32(10), val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(int32(10), val)
+
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(int32(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(int32(1), val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
// large float to int
@@ -108,6 +135,13 @@ func Test_any_to_int8(t *testing.T) {
should.Equal(int8(10), val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(int8(10), val)
+
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(int8(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(int8(1), val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
// large float to int
@@ -125,6 +159,13 @@ func Test_any_to_uint8(t *testing.T) {
should.Equal(uint8(10), val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(uint8(10), val)
+
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(uint8(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(uint8(1), val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
// large float to int
@@ -144,6 +185,12 @@ func Test_any_to_uint64(t *testing.T) {
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(uint64(10), val)
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(uint64(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(uint64(1), val)
+
// TODO fix?
should.NotNil(jsoniter.UnmarshalFromString(`-10`, &val))
should.Equal(uint64(0), val)
@@ -165,6 +212,12 @@ func Test_any_to_uint32(t *testing.T) {
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(uint32(10), val)
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(uint32(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(uint32(1), val)
+
// TODO fix?
should.NotNil(jsoniter.UnmarshalFromString(`-10`, &val))
should.Equal(uint32(0), val)
@@ -186,6 +239,12 @@ func Test_any_to_uint16(t *testing.T) {
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(uint16(10), val)
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(uint16(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(uint16(1), val)
+
// TODO fix?
should.NotNil(jsoniter.UnmarshalFromString(`-10`, &val))
should.Equal(uint16(0), val)
@@ -205,6 +264,12 @@ func Test_any_to_uint(t *testing.T) {
should.Equal(uint(10), val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(uint(10), val)
+
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(uint(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(uint(1), val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
// large float to int
@@ -223,6 +288,13 @@ func Test_any_to_float32(t *testing.T) {
should.Equal(float32(10.1), val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(float32(10), val)
+
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(float32(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(float32(1), val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
}
@@ -240,6 +312,13 @@ func Test_any_to_float64(t *testing.T) {
should.Equal(float64(10.1), val)
should.Nil(jsoniter.UnmarshalFromString(`10`, &val))
should.Equal(float64(10), val)
+
+ // bool part
+ should.Nil(jsoniter.UnmarshalFromString(`false`, &val))
+ should.Equal(float64(0), val)
+ should.Nil(jsoniter.UnmarshalFromString(`true`, &val))
+ should.Equal(float64(1), val)
+
should.NotNil(jsoniter.UnmarshalFromString("{}", &val))
should.NotNil(jsoniter.UnmarshalFromString("[]", &val))
}
diff --git a/vendor/github.com/json-iterator/go/feature_config.go b/vendor/github.com/json-iterator/go/feature_config.go
index fc055d504..3201bcdcd 100644
--- a/vendor/github.com/json-iterator/go/feature_config.go
+++ b/vendor/github.com/json-iterator/go/feature_config.go
@@ -18,6 +18,7 @@ type Config struct {
SortMapKeys bool
UseNumber bool
TagKey string
+ ValidateJsonRawMessage bool
}
type frozenConfig struct {
@@ -53,8 +54,9 @@ var ConfigDefault = Config{
// ConfigCompatibleWithStandardLibrary tries to be 100% compatible with standard library behavior
var ConfigCompatibleWithStandardLibrary = Config{
- EscapeHTML: true,
- SortMapKeys: true,
+ EscapeHTML: true,
+ SortMapKeys: true,
+ ValidateJsonRawMessage: true,
}.Froze()
// ConfigFastest marshals float with only 6 digits precision
@@ -83,10 +85,31 @@ func (cfg Config) Froze() API {
if cfg.UseNumber {
frozenConfig.useNumber()
}
+ if cfg.ValidateJsonRawMessage {
+ frozenConfig.validateJsonRawMessage()
+ }
frozenConfig.configBeforeFrozen = cfg
return frozenConfig
}
+func (cfg *frozenConfig) validateJsonRawMessage() {
+ encoder := &funcEncoder{func(ptr unsafe.Pointer, stream *Stream) {
+ rawMessage := *(*json.RawMessage)(ptr)
+ iter := cfg.BorrowIterator([]byte(rawMessage))
+ iter.Read()
+ if iter.Error != nil {
+ stream.WriteRaw("null")
+ } else {
+ cfg.ReturnIterator(iter)
+ stream.WriteRaw(string(rawMessage))
+ }
+ }, func(ptr unsafe.Pointer) bool {
+ return false
+ }}
+ cfg.addEncoderToCache(reflect.TypeOf((*json.RawMessage)(nil)).Elem(), encoder)
+ cfg.addEncoderToCache(reflect.TypeOf((*RawMessage)(nil)).Elem(), encoder)
+}
+
func (cfg *frozenConfig) useNumber() {
cfg.addDecoderToCache(reflect.TypeOf((*interface{})(nil)).Elem(), &funcDecoder{func(ptr unsafe.Pointer, iter *Iterator) {
if iter.WhatIsNext() == NumberValue {
diff --git a/vendor/github.com/json-iterator/go/feature_reflect.go b/vendor/github.com/json-iterator/go/feature_reflect.go
index 7c3006ee8..4483e34b8 100644
--- a/vendor/github.com/json-iterator/go/feature_reflect.go
+++ b/vendor/github.com/json-iterator/go/feature_reflect.go
@@ -154,11 +154,11 @@ func (encoder *placeholderEncoder) IsEmpty(ptr unsafe.Pointer) bool {
}
func (encoder *placeholderEncoder) getRealEncoder() ValEncoder {
- for i := 0; i < 30; i++ {
+ for i := 0; i < 500; i++ {
realDecoder := encoder.cfg.getEncoderFromCache(encoder.cacheKey)
_, isPlaceholder := realDecoder.(*placeholderEncoder)
if isPlaceholder {
- time.Sleep(time.Second)
+ time.Sleep(10 * time.Millisecond)
} else {
return realDecoder
}
@@ -172,11 +172,11 @@ type placeholderDecoder struct {
}
func (decoder *placeholderDecoder) Decode(ptr unsafe.Pointer, iter *Iterator) {
- for i := 0; i < 30; i++ {
+ for i := 0; i < 500; i++ {
realDecoder := decoder.cfg.getDecoderFromCache(decoder.cacheKey)
_, isPlaceholder := realDecoder.(*placeholderDecoder)
if isPlaceholder {
- time.Sleep(time.Second)
+ time.Sleep(10 * time.Millisecond)
} else {
realDecoder.Decode(ptr, iter)
return
@@ -476,7 +476,6 @@ func createEncoderOfType(cfg *frozenConfig, typ reflect.Type) (ValEncoder, error
templateInterface: extractInterface(templateInterface),
checkIsEmpty: checkIsEmpty,
}
- encoder = &optionalEncoder{encoder}
return encoder, nil
}
if typ.Implements(textMarshalerType) {
diff --git a/vendor/github.com/json-iterator/go/feature_reflect_extension.go b/vendor/github.com/json-iterator/go/feature_reflect_extension.go
index 3dd38299d..74f4b8bab 100644
--- a/vendor/github.com/json-iterator/go/feature_reflect_extension.go
+++ b/vendor/github.com/json-iterator/go/feature_reflect_extension.go
@@ -269,7 +269,7 @@ func describeStruct(cfg *frozenConfig, typ reflect.Type) (*StructDescriptor, err
if decoder == nil {
var err error
decoder, err = decoderOfType(cfg, field.Type)
- if err != nil {
+ if len(fieldNames) > 0 && err != nil {
return nil, err
}
}
@@ -277,11 +277,11 @@ func describeStruct(cfg *frozenConfig, typ reflect.Type) (*StructDescriptor, err
if encoder == nil {
var err error
encoder, err = encoderOfType(cfg, field.Type)
- if err != nil {
+ if len(fieldNames) > 0 && err != nil {
return nil, err
}
// map is stored as pointer in the struct
- if field.Type.Kind() == reflect.Map {
+ if encoder != nil && field.Type.Kind() == reflect.Map {
encoder = &optionalEncoder{encoder}
}
}
diff --git a/vendor/github.com/json-iterator/go/feature_reflect_native.go b/vendor/github.com/json-iterator/go/feature_reflect_native.go
index 0832101f5..332b9e013 100644
--- a/vendor/github.com/json-iterator/go/feature_reflect_native.go
+++ b/vendor/github.com/json-iterator/go/feature_reflect_native.go
@@ -4,6 +4,7 @@ import (
"encoding"
"encoding/base64"
"encoding/json"
+ "reflect"
"unsafe"
)
@@ -31,11 +32,9 @@ type intCodec struct {
}
func (codec *intCodec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*int)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*int)(ptr)) = iter.ReadInt()
}
- *((*int)(ptr)) = iter.ReadInt()
}
func (codec *intCodec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -54,11 +53,9 @@ type uintptrCodec struct {
}
func (codec *uintptrCodec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*uintptr)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*uintptr)(ptr)) = uintptr(iter.ReadUint64())
}
- *((*uintptr)(ptr)) = uintptr(iter.ReadUint64())
}
func (codec *uintptrCodec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -77,11 +74,9 @@ type int8Codec struct {
}
func (codec *int8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*uint8)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*int8)(ptr)) = iter.ReadInt8()
}
- *((*int8)(ptr)) = iter.ReadInt8()
}
func (codec *int8Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -100,11 +95,9 @@ type int16Codec struct {
}
func (codec *int16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*int16)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*int16)(ptr)) = iter.ReadInt16()
}
- *((*int16)(ptr)) = iter.ReadInt16()
}
func (codec *int16Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -123,11 +116,9 @@ type int32Codec struct {
}
func (codec *int32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*int32)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*int32)(ptr)) = iter.ReadInt32()
}
- *((*int32)(ptr)) = iter.ReadInt32()
}
func (codec *int32Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -146,11 +137,9 @@ type int64Codec struct {
}
func (codec *int64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*int64)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*int64)(ptr)) = iter.ReadInt64()
}
- *((*int64)(ptr)) = iter.ReadInt64()
}
func (codec *int64Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -169,11 +158,10 @@ type uintCodec struct {
}
func (codec *uintCodec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*uint)(ptr)) = 0
+ if !iter.ReadNil() {
+ *((*uint)(ptr)) = iter.ReadUint()
return
}
- *((*uint)(ptr)) = iter.ReadUint()
}
func (codec *uintCodec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -192,11 +180,9 @@ type uint8Codec struct {
}
func (codec *uint8Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*uint8)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*uint8)(ptr)) = iter.ReadUint8()
}
- *((*uint8)(ptr)) = iter.ReadUint8()
}
func (codec *uint8Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -215,11 +201,9 @@ type uint16Codec struct {
}
func (codec *uint16Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*uint16)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*uint16)(ptr)) = iter.ReadUint16()
}
- *((*uint16)(ptr)) = iter.ReadUint16()
}
func (codec *uint16Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -238,11 +222,9 @@ type uint32Codec struct {
}
func (codec *uint32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*uint32)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*uint32)(ptr)) = iter.ReadUint32()
}
- *((*uint32)(ptr)) = iter.ReadUint32()
}
func (codec *uint32Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -261,11 +243,9 @@ type uint64Codec struct {
}
func (codec *uint64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*uint64)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*uint64)(ptr)) = iter.ReadUint64()
}
- *((*uint64)(ptr)) = iter.ReadUint64()
}
func (codec *uint64Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -284,11 +264,9 @@ type float32Codec struct {
}
func (codec *float32Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*float32)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*float32)(ptr)) = iter.ReadFloat32()
}
- *((*float32)(ptr)) = iter.ReadFloat32()
}
func (codec *float32Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -307,11 +285,9 @@ type float64Codec struct {
}
func (codec *float64Codec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- if iter.ReadNil() {
- *((*float64)(ptr)) = 0
- return
+ if !iter.ReadNil() {
+ *((*float64)(ptr)) = iter.ReadFloat64()
}
- *((*float64)(ptr)) = iter.ReadFloat64()
}
func (codec *float64Codec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -330,7 +306,9 @@ type boolCodec struct {
}
func (codec *boolCodec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- *((*bool)(ptr)) = iter.ReadBool()
+ if !iter.ReadNil() {
+ *((*bool)(ptr)) = iter.ReadBool()
+ }
}
func (codec *boolCodec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -349,7 +327,42 @@ type emptyInterfaceCodec struct {
}
func (codec *emptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator) {
- *((*interface{})(ptr)) = iter.Read()
+ existing := *((*interface{})(ptr))
+
+ // Checking for both typed and untyped nil pointers.
+ if existing != nil &&
+ reflect.TypeOf(existing).Kind() == reflect.Ptr &&
+ !reflect.ValueOf(existing).IsNil() {
+
+ var ptrToExisting interface{}
+ for {
+ elem := reflect.ValueOf(existing).Elem()
+ if elem.Kind() != reflect.Ptr || elem.IsNil() {
+ break
+ }
+ ptrToExisting = existing
+ existing = elem.Interface()
+ }
+
+ if iter.ReadNil() {
+ if ptrToExisting != nil {
+ nilPtr := reflect.Zero(reflect.TypeOf(ptrToExisting).Elem())
+ reflect.ValueOf(ptrToExisting).Elem().Set(nilPtr)
+ } else {
+ *((*interface{})(ptr)) = nil
+ }
+ } else {
+ iter.ReadVal(existing)
+ }
+
+ return
+ }
+
+ if iter.ReadNil() {
+ *((*interface{})(ptr)) = nil
+ } else {
+ *((*interface{})(ptr)) = iter.Read()
+ }
}
func (codec *emptyInterfaceCodec) Encode(ptr unsafe.Pointer, stream *Stream) {
@@ -361,7 +374,8 @@ func (codec *emptyInterfaceCodec) EncodeInterface(val interface{}, stream *Strea
}
func (codec *emptyInterfaceCodec) IsEmpty(ptr unsafe.Pointer) bool {
- return ptr == nil
+ emptyInterface := (*emptyInterface)(ptr)
+ return emptyInterface.typ == nil
}
type nonEmptyInterfaceCodec struct {
@@ -378,15 +392,20 @@ func (codec *nonEmptyInterfaceCodec) Decode(ptr unsafe.Pointer, iter *Iterator)
e.typ = nonEmptyInterface.itab.typ
e.word = nonEmptyInterface.word
iter.ReadVal(&i)
+ if e.word == nil {
+ nonEmptyInterface.itab = nil
+ }
nonEmptyInterface.word = e.word
}
func (codec *nonEmptyInterfaceCodec) Encode(ptr unsafe.Pointer, stream *Stream) {
nonEmptyInterface := (*nonEmptyInterface)(ptr)
var i interface{}
- e := (*emptyInterface)(unsafe.Pointer(&i))
- e.typ = nonEmptyInterface.itab.typ
- e.word = nonEmptyInterface.word
+ if nonEmptyInterface.itab != nil {
+ e := (*emptyInterface)(unsafe.Pointer(&i))
+ e.typ = nonEmptyInterface.itab.typ
+ e.word = nonEmptyInterface.word
+ }
stream.WriteVal(i)
}
@@ -647,7 +666,12 @@ func (encoder *marshalerEncoder) Encode(ptr unsafe.Pointer, stream *Stream) {
templateInterface := encoder.templateInterface
templateInterface.word = ptr
realInterface := (*interface{})(unsafe.Pointer(&templateInterface))
- marshaler := (*realInterface).(json.Marshaler)
+ marshaler, ok := (*realInterface).(json.Marshaler)
+ if !ok {
+ stream.WriteVal(nil)
+ return
+ }
+
bytes, err := marshaler.MarshalJSON()
if err != nil {
stream.Error = err
diff --git a/vendor/github.com/json-iterator/go/jsoniter_bool_test.go b/vendor/github.com/json-iterator/go/jsoniter_bool_test.go
index 5f6a824d1..461b88ba3 100644
--- a/vendor/github.com/json-iterator/go/jsoniter_bool_test.go
+++ b/vendor/github.com/json-iterator/go/jsoniter_bool_test.go
@@ -82,3 +82,32 @@ func Test_decode_string_bool(t *testing.T) {
err = Unmarshal([]byte(`{"Field":true}`), &obj)
should.NotNil(err)
}
+
+func Test_bool_can_be_null(t *testing.T) {
+ type TestData struct {
+ Field bool `json:"field"`
+ }
+ should := require.New(t)
+
+ obj := TestData{}
+ data1 := []byte(`{"field": true}`)
+ err := Unmarshal(data1, &obj)
+ should.NoError(err)
+ should.Equal(true, obj.Field)
+
+ data2 := []byte(`{"field": null}`)
+ err = Unmarshal(data2, &obj)
+ should.NoError(err)
+ // Same behavior as stdlib, not touching the existing value.
+ should.Equal(true, obj.Field)
+
+ // Checking stdlib behavior as well
+ obj2 := TestData{}
+ err = json.Unmarshal(data1, &obj2)
+ should.NoError(err)
+ should.Equal(true, obj2.Field)
+
+ err = json.Unmarshal(data2, &obj2)
+ should.NoError(err)
+ should.Equal(true, obj2.Field)
+}
diff --git a/vendor/github.com/json-iterator/go/jsoniter_customize_test.go b/vendor/github.com/json-iterator/go/jsoniter_customize_test.go
index b4bf5294b..628f89e45 100644
--- a/vendor/github.com/json-iterator/go/jsoniter_customize_test.go
+++ b/vendor/github.com/json-iterator/go/jsoniter_customize_test.go
@@ -2,11 +2,12 @@ package jsoniter
import (
"encoding/json"
- "github.com/stretchr/testify/require"
"strconv"
"testing"
"time"
"unsafe"
+
+ "github.com/stretchr/testify/require"
)
func Test_customize_type_decoder(t *testing.T) {
@@ -82,7 +83,7 @@ func Test_customize_field_decoder(t *testing.T) {
}
type TestObject1 struct {
- field1 string
+ Field1 string
}
type testExtension struct {
@@ -93,7 +94,7 @@ func (extension *testExtension) UpdateStructDescriptor(structDescriptor *StructD
if structDescriptor.Type.String() != "jsoniter.TestObject1" {
return
}
- binding := structDescriptor.GetField("field1")
+ binding := structDescriptor.GetField("Field1")
binding.Encoder = &funcEncoder{fun: func(ptr unsafe.Pointer, stream *Stream) {
str := *((*string)(ptr))
val, _ := strconv.Atoi(str)
@@ -112,7 +113,7 @@ func Test_customize_field_by_extension(t *testing.T) {
obj := TestObject1{}
err := UnmarshalFromString(`{"field-1": 100}`, &obj)
should.Nil(err)
- should.Equal("100", obj.field1)
+ should.Equal("100", obj.Field1)
str, err := MarshalToString(obj)
should.Nil(err)
should.Equal(`{"field-1":100}`, str)
diff --git a/vendor/github.com/json-iterator/go/jsoniter_enum_marshaler_test.go b/vendor/github.com/json-iterator/go/jsoniter_enum_marshaler_test.go
new file mode 100644
index 000000000..69e1e8cd3
--- /dev/null
+++ b/vendor/github.com/json-iterator/go/jsoniter_enum_marshaler_test.go
@@ -0,0 +1,50 @@
+package jsoniter
+
+import (
+ "fmt"
+ "testing"
+
+ "github.com/stretchr/testify/require"
+)
+
+type MyEnum int64
+
+const (
+ MyEnumA MyEnum = iota
+ MyEnumB
+)
+
+func (m *MyEnum) MarshalJSON() ([]byte, error) {
+ return []byte(fmt.Sprintf(`"foo-%d"`, int(*m))), nil
+}
+
+func (m *MyEnum) UnmarshalJSON(jb []byte) error {
+ switch string(jb) {
+ case `"foo-1"`:
+ *m = MyEnumB
+ default:
+ *m = MyEnumA
+ }
+ return nil
+}
+
+func Test_custom_marshaler_on_enum(t *testing.T) {
+ type Wrapper struct {
+ Payload interface{}
+ }
+ type Wrapper2 struct {
+ Payload MyEnum
+ }
+ should := require.New(t)
+
+ w := Wrapper{Payload: MyEnumB}
+
+ jb, err := Marshal(w)
+ should.NoError(err)
+ should.Equal(`{"Payload":"foo-1"}`, string(jb))
+
+ var w2 Wrapper2
+ err = Unmarshal(jb, &w2)
+ should.NoError(err)
+ should.Equal(MyEnumB, w2.Payload)
+}
diff --git a/vendor/github.com/json-iterator/go/jsoniter_interface_test.go b/vendor/github.com/json-iterator/go/jsoniter_interface_test.go
index c037049e7..5a0528865 100644
--- a/vendor/github.com/json-iterator/go/jsoniter_interface_test.go
+++ b/vendor/github.com/json-iterator/go/jsoniter_interface_test.go
@@ -2,9 +2,11 @@ package jsoniter
import (
"encoding/json"
- "github.com/stretchr/testify/require"
+ "fmt"
"testing"
"unsafe"
+
+ "github.com/stretchr/testify/require"
)
func Test_write_array_of_interface(t *testing.T) {
@@ -297,3 +299,262 @@ func Test_array_with_nothing(t *testing.T) {
should.Nil(err)
should.Equal(`[null,null]`, output)
}
+
+func Test_unmarshal_ptr_to_interface(t *testing.T) {
+ type TestData struct {
+ Name string `json:"name"`
+ }
+ should := require.New(t)
+ var obj interface{} = &TestData{}
+ err := json.Unmarshal([]byte(`{"name":"value"}`), &obj)
+ should.Nil(err)
+ should.Equal("&{value}", fmt.Sprintf("%v", obj))
+ obj = interface{}(&TestData{})
+ err = Unmarshal([]byte(`{"name":"value"}`), &obj)
+ should.Nil(err)
+ should.Equal("&{value}", fmt.Sprintf("%v", obj))
+}
+
+func Test_nil_out_null_interface(t *testing.T) {
+ type TestData struct {
+ Field interface{} `json:"field"`
+ }
+ should := require.New(t)
+
+ var boolVar bool
+ obj := TestData{
+ Field: &boolVar,
+ }
+
+ data1 := []byte(`{"field": true}`)
+
+ err := Unmarshal(data1, &obj)
+ should.NoError(err)
+ should.Equal(true, *(obj.Field.(*bool)))
+
+ data2 := []byte(`{"field": null}`)
+
+ err = Unmarshal(data2, &obj)
+ should.NoError(err)
+ should.Equal(nil, obj.Field)
+
+ // Checking stdlib behavior matches.
+ obj2 := TestData{
+ Field: &boolVar,
+ }
+
+ err = json.Unmarshal(data1, &obj2)
+ should.NoError(err)
+ should.Equal(true, *(obj2.Field.(*bool)))
+
+ err = json.Unmarshal(data2, &obj2)
+ should.NoError(err)
+ should.Equal(nil, obj2.Field)
+}
+
+func Test_omitempty_nil_interface(t *testing.T) {
+ type TestData struct {
+ Field interface{} `json:"field,omitempty"`
+ }
+ should := require.New(t)
+
+ obj := TestData{
+ Field: nil,
+ }
+
+ js, err := json.Marshal(obj)
+ should.NoError(err)
+ should.Equal("{}", string(js))
+
+ str, err := MarshalToString(obj)
+ should.NoError(err)
+ should.Equal(string(js), str)
+}
+
+func Test_omitempty_nil_nonempty_interface(t *testing.T) {
+ type TestData struct {
+ Field MyInterface `json:"field,omitempty"`
+ }
+ should := require.New(t)
+
+ obj := TestData{
+ Field: nil,
+ }
+
+ js, err := json.Marshal(obj)
+ should.NoError(err)
+ should.Equal("{}", string(js))
+
+ str, err := MarshalToString(obj)
+ should.NoError(err)
+ should.Equal(string(js), str)
+
+ obj.Field = MyString("hello")
+ err = UnmarshalFromString(`{"field":null}`, &obj)
+ should.NoError(err)
+ should.Equal(nil, obj.Field)
+}
+
+func Test_marshal_nil_marshaler_interface(t *testing.T) {
+ type TestData struct {
+ Field json.Marshaler `json:"field"`
+ }
+ should := require.New(t)
+
+ obj := TestData{
+ Field: nil,
+ }
+
+ js, err := json.Marshal(obj)
+ should.NoError(err)
+ should.Equal(`{"field":null}`, string(js))
+
+ str, err := MarshalToString(obj)
+ should.NoError(err)
+ should.Equal(string(js), str)
+}
+
+func Test_marshal_nil_nonempty_interface(t *testing.T) {
+ type TestData struct {
+ Field MyInterface `json:"field"`
+ }
+ should := require.New(t)
+
+ obj := TestData{
+ Field: nil,
+ }
+
+ js, err := json.Marshal(obj)
+ should.NoError(err)
+ should.Equal(`{"field":null}`, string(js))
+
+ str, err := MarshalToString(obj)
+ should.NoError(err)
+ should.Equal(string(js), str)
+
+ obj.Field = MyString("hello")
+ err = Unmarshal(js, &obj)
+ should.NoError(err)
+ should.Equal(nil, obj.Field)
+}
+
+func Test_overwrite_interface_ptr_value_with_nil(t *testing.T) {
+ type Wrapper struct {
+ Payload interface{} `json:"payload,omitempty"`
+ }
+ type Payload struct {
+ Value int `json:"val,omitempty"`
+ }
+
+ should := require.New(t)
+
+ payload := &Payload{}
+ wrapper := &Wrapper{
+ Payload: &payload,
+ }
+
+ err := json.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(&payload, wrapper.Payload)
+ should.Equal(42, (*(wrapper.Payload.(**Payload))).Value)
+
+ err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(&payload, wrapper.Payload)
+ should.Equal((*Payload)(nil), payload)
+
+ payload = &Payload{}
+ wrapper = &Wrapper{
+ Payload: &payload,
+ }
+
+ err = Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(&payload, wrapper.Payload)
+ should.Equal(42, (*(wrapper.Payload.(**Payload))).Value)
+
+ err = Unmarshal([]byte(`{"payload": null}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(&payload, wrapper.Payload)
+ should.Equal((*Payload)(nil), payload)
+}
+
+func Test_overwrite_interface_value_with_nil(t *testing.T) {
+ type Wrapper struct {
+ Payload interface{} `json:"payload,omitempty"`
+ }
+ type Payload struct {
+ Value int `json:"val,omitempty"`
+ }
+
+ should := require.New(t)
+
+ payload := &Payload{}
+ wrapper := &Wrapper{
+ Payload: payload,
+ }
+
+ err := json.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(42, (*(wrapper.Payload.(*Payload))).Value)
+
+ err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(nil, wrapper.Payload)
+ should.Equal(42, payload.Value)
+
+ payload = &Payload{}
+ wrapper = &Wrapper{
+ Payload: payload,
+ }
+
+ err = Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(42, (*(wrapper.Payload.(*Payload))).Value)
+
+ err = Unmarshal([]byte(`{"payload": null}`), &wrapper)
+ should.Equal(nil, err)
+ should.Equal(nil, wrapper.Payload)
+ should.Equal(42, payload.Value)
+}
+
+func Test_unmarshal_into_nil(t *testing.T) {
+ type Payload struct {
+ Value int `json:"val,omitempty"`
+ }
+ type Wrapper struct {
+ Payload interface{} `json:"payload,omitempty"`
+ }
+
+ should := require.New(t)
+
+ var payload *Payload
+ wrapper := &Wrapper{
+ Payload: payload,
+ }
+
+ err := json.Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper)
+ should.Nil(err)
+ should.NotNil(wrapper.Payload)
+ should.Nil(payload)
+
+ err = json.Unmarshal([]byte(`{"payload": null}`), &wrapper)
+ should.Nil(err)
+ should.Nil(wrapper.Payload)
+ should.Nil(payload)
+
+ payload = nil
+ wrapper = &Wrapper{
+ Payload: payload,
+ }
+
+ err = Unmarshal([]byte(`{"payload": {"val": 42}}`), &wrapper)
+ should.Nil(err)
+ should.NotNil(wrapper.Payload)
+ should.Nil(payload)
+
+ err = Unmarshal([]byte(`{"payload": null}`), &wrapper)
+ should.Nil(err)
+ should.Nil(wrapper.Payload)
+ should.Nil(payload)
+}
diff --git a/vendor/github.com/json-iterator/go/jsoniter_null_test.go b/vendor/github.com/json-iterator/go/jsoniter_null_test.go
index df71bf2f1..8c891470f 100644
--- a/vendor/github.com/json-iterator/go/jsoniter_null_test.go
+++ b/vendor/github.com/json-iterator/go/jsoniter_null_test.go
@@ -3,9 +3,10 @@ package jsoniter
import (
"bytes"
"encoding/json"
- "github.com/stretchr/testify/require"
"io"
"testing"
+
+ "github.com/stretchr/testify/require"
)
func Test_read_null(t *testing.T) {
@@ -135,3 +136,33 @@ func Test_encode_nil_array(t *testing.T) {
should.Nil(err)
should.Equal("null", string(output))
}
+
+func Test_decode_nil_num(t *testing.T) {
+ type TestData struct {
+ Field int `json:"field"`
+ }
+ should := require.New(t)
+
+ data1 := []byte(`{"field": 42}`)
+ data2 := []byte(`{"field": null}`)
+
+ // Checking stdlib behavior as well
+ obj2 := TestData{}
+ err := json.Unmarshal(data1, &obj2)
+ should.Equal(nil, err)
+ should.Equal(42, obj2.Field)
+
+ err = json.Unmarshal(data2, &obj2)
+ should.Equal(nil, err)
+ should.Equal(42, obj2.Field)
+
+ obj := TestData{}
+
+ err = Unmarshal(data1, &obj)
+ should.Equal(nil, err)
+ should.Equal(42, obj.Field)
+
+ err = Unmarshal(data2, &obj)
+ should.Equal(nil, err)
+ should.Equal(42, obj.Field)
+}
diff --git a/vendor/github.com/json-iterator/go/jsoniter_raw_message_test.go b/vendor/github.com/json-iterator/go/jsoniter_raw_message_test.go
index d7b65b2c7..a3c67d001 100644
--- a/vendor/github.com/json-iterator/go/jsoniter_raw_message_test.go
+++ b/vendor/github.com/json-iterator/go/jsoniter_raw_message_test.go
@@ -72,3 +72,17 @@ func Test_encode_map_of_jsoniter_raw_message(t *testing.T) {
should.Nil(err)
should.Equal(`{"hello":[]}`, output)
}
+
+func Test_marshal_invalid_json_raw_message(t *testing.T) {
+ type A struct {
+ Raw json.RawMessage `json:"raw"`
+ }
+ message := []byte(`{}`)
+
+ a := A{}
+ should := require.New(t)
+ should.Nil(ConfigCompatibleWithStandardLibrary.Unmarshal(message, &a))
+ aout, aouterr := ConfigCompatibleWithStandardLibrary.Marshal(&a)
+ should.Equal(`{"raw":null}`, string(aout))
+ should.Nil(aouterr)
+}
diff --git a/vendor/github.com/json-iterator/go/jsoniter_struct_encoder_test.go b/vendor/github.com/json-iterator/go/jsoniter_struct_encoder_test.go
new file mode 100644
index 000000000..0e3e54188
--- /dev/null
+++ b/vendor/github.com/json-iterator/go/jsoniter_struct_encoder_test.go
@@ -0,0 +1,52 @@
+package jsoniter
+
+import (
+ "encoding/json"
+ "testing"
+ "time"
+
+ "github.com/stretchr/testify/require"
+)
+
+func Test_encode_unexported_field(t *testing.T) {
+ type TestData struct {
+ a int
+ b <-chan int
+ C int
+ d *time.Timer
+ }
+
+ should := require.New(t)
+
+ testChan := make(<-chan int, 10)
+ testTimer := time.NewTimer(10 * time.Second)
+
+ obj := &TestData{
+ a: 42,
+ b: testChan,
+ C: 21,
+ d: testTimer,
+ }
+
+ jb, err := json.Marshal(obj)
+ should.NoError(err)
+ should.Equal([]byte(`{"C":21}`), jb)
+
+ err = json.Unmarshal([]byte(`{"a": 444, "b":"bad", "C":55, "d":{"not": "a timer"}}`), obj)
+ should.NoError(err)
+ should.Equal(42, obj.a)
+ should.Equal(testChan, obj.b)
+ should.Equal(55, obj.C)
+ should.Equal(testTimer, obj.d)
+
+ jb, err = Marshal(obj)
+ should.NoError(err)
+ should.Equal(jb, []byte(`{"C":55}`))
+
+ err = Unmarshal([]byte(`{"a": 444, "b":"bad", "C":256, "d":{"not":"a timer"}}`), obj)
+ should.NoError(err)
+ should.Equal(42, obj.a)
+ should.Equal(testChan, obj.b)
+ should.Equal(256, obj.C)
+ should.Equal(testTimer, obj.d)
+}
diff --git a/vendor/github.com/lib/pq/.travis.yml b/vendor/github.com/lib/pq/.travis.yml
index 1a4656c53..452515c66 100644
--- a/vendor/github.com/lib/pq/.travis.yml
+++ b/vendor/github.com/lib/pq/.travis.yml
@@ -5,6 +5,7 @@ go:
- 1.6.x
- 1.7.x
- 1.8.x
+ - 1.9.x
- master
sudo: true
diff --git a/vendor/github.com/lib/pq/conn.go b/vendor/github.com/lib/pq/conn.go
index 1725ab0d3..338a0bc18 100644
--- a/vendor/github.com/lib/pq/conn.go
+++ b/vendor/github.com/lib/pq/conn.go
@@ -706,7 +706,7 @@ func (noRows) RowsAffected() (int64, error) {
// Decides which column formats to use for a prepared statement. The input is
// an array of type oids, one element per result column.
-func decideColumnFormats(colTyps []oid.Oid, forceText bool) (colFmts []format, colFmtData []byte) {
+func decideColumnFormats(colTyps []fieldDesc, forceText bool) (colFmts []format, colFmtData []byte) {
if len(colTyps) == 0 {
return nil, colFmtDataAllText
}
@@ -718,8 +718,8 @@ func decideColumnFormats(colTyps []oid.Oid, forceText bool) (colFmts []format, c
allBinary := true
allText := true
- for i, o := range colTyps {
- switch o {
+ for i, t := range colTyps {
+ switch t.OID {
// This is the list of types to use binary mode for when receiving them
// through a prepared statement. If a type appears in this list, it
// must also be implemented in binaryDecode in encode.go.
@@ -1155,7 +1155,7 @@ type stmt struct {
colNames []string
colFmts []format
colFmtData []byte
- colTyps []oid.Oid
+ colTyps []fieldDesc
paramTyps []oid.Oid
closed bool
}
@@ -1318,7 +1318,7 @@ type rows struct {
cn *conn
finish func()
colNames []string
- colTyps []oid.Oid
+ colTyps []fieldDesc
colFmts []format
done bool
rb readBuf
@@ -1406,7 +1406,7 @@ func (rs *rows) Next(dest []driver.Value) (err error) {
dest[i] = nil
continue
}
- dest[i] = decode(&conn.parameterStatus, rs.rb.next(l), rs.colTyps[i], rs.colFmts[i])
+ dest[i] = decode(&conn.parameterStatus, rs.rb.next(l), rs.colTyps[i].OID, rs.colFmts[i])
}
return
case 'T':
@@ -1573,7 +1573,7 @@ func (cn *conn) readParseResponse() {
}
}
-func (cn *conn) readStatementDescribeResponse() (paramTyps []oid.Oid, colNames []string, colTyps []oid.Oid) {
+func (cn *conn) readStatementDescribeResponse() (paramTyps []oid.Oid, colNames []string, colTyps []fieldDesc) {
for {
t, r := cn.recv1()
switch t {
@@ -1599,7 +1599,7 @@ func (cn *conn) readStatementDescribeResponse() (paramTyps []oid.Oid, colNames [
}
}
-func (cn *conn) readPortalDescribeResponse() (colNames []string, colFmts []format, colTyps []oid.Oid) {
+func (cn *conn) readPortalDescribeResponse() (colNames []string, colFmts []format, colTyps []fieldDesc) {
t, r := cn.recv1()
switch t {
case 'T':
@@ -1695,31 +1695,33 @@ func (cn *conn) readExecuteResponse(protocolState string) (res driver.Result, co
}
}
-func parseStatementRowDescribe(r *readBuf) (colNames []string, colTyps []oid.Oid) {
+func parseStatementRowDescribe(r *readBuf) (colNames []string, colTyps []fieldDesc) {
n := r.int16()
colNames = make([]string, n)
- colTyps = make([]oid.Oid, n)
+ colTyps = make([]fieldDesc, n)
for i := range colNames {
colNames[i] = r.string()
r.next(6)
- colTyps[i] = r.oid()
- r.next(6)
+ colTyps[i].OID = r.oid()
+ colTyps[i].Len = r.int16()
+ colTyps[i].Mod = r.int32()
// format code not known when describing a statement; always 0
r.next(2)
}
return
}
-func parsePortalRowDescribe(r *readBuf) (colNames []string, colFmts []format, colTyps []oid.Oid) {
+func parsePortalRowDescribe(r *readBuf) (colNames []string, colFmts []format, colTyps []fieldDesc) {
n := r.int16()
colNames = make([]string, n)
colFmts = make([]format, n)
- colTyps = make([]oid.Oid, n)
+ colTyps = make([]fieldDesc, n)
for i := range colNames {
colNames[i] = r.string()
r.next(6)
- colTyps[i] = r.oid()
- r.next(6)
+ colTyps[i].OID = r.oid()
+ colTyps[i].Len = r.int16()
+ colTyps[i].Mod = r.int32()
colFmts[i] = format(r.int16())
}
return
diff --git a/vendor/github.com/lib/pq/oid/gen.go b/vendor/github.com/lib/pq/oid/gen.go
index cd4aea808..7c634cdc5 100644
--- a/vendor/github.com/lib/pq/oid/gen.go
+++ b/vendor/github.com/lib/pq/oid/gen.go
@@ -10,10 +10,22 @@ import (
"log"
"os"
"os/exec"
+ "strings"
_ "github.com/lib/pq"
)
+// OID represent a postgres Object Identifier Type.
+type OID struct {
+ ID int
+ Type string
+}
+
+// Name returns an upper case version of the oid type.
+func (o OID) Name() string {
+ return strings.ToUpper(o.Type)
+}
+
func main() {
datname := os.Getenv("PGDATABASE")
sslmode := os.Getenv("PGSSLMODE")
@@ -30,6 +42,25 @@ func main() {
if err != nil {
log.Fatal(err)
}
+ rows, err := db.Query(`
+ SELECT typname, oid
+ FROM pg_type WHERE oid < 10000
+ ORDER BY oid;
+ `)
+ if err != nil {
+ log.Fatal(err)
+ }
+ oids := make([]*OID, 0)
+ for rows.Next() {
+ var oid OID
+ if err = rows.Scan(&oid.Type, &oid.ID); err != nil {
+ log.Fatal(err)
+ }
+ oids = append(oids, &oid)
+ }
+ if err = rows.Err(); err != nil {
+ log.Fatal(err)
+ }
cmd := exec.Command("gofmt")
cmd.Stderr = os.Stderr
w, err := cmd.StdinPipe()
@@ -45,30 +76,18 @@ func main() {
if err != nil {
log.Fatal(err)
}
- fmt.Fprintln(w, "// generated by 'go run gen.go'; do not edit")
+ fmt.Fprintln(w, "// Code generated by gen.go. DO NOT EDIT.")
fmt.Fprintln(w, "\npackage oid")
fmt.Fprintln(w, "const (")
- rows, err := db.Query(`
- SELECT typname, oid
- FROM pg_type WHERE oid < 10000
- ORDER BY oid;
- `)
- if err != nil {
- log.Fatal(err)
- }
- var name string
- var oid int
- for rows.Next() {
- err = rows.Scan(&name, &oid)
- if err != nil {
- log.Fatal(err)
- }
- fmt.Fprintf(w, "T_%s Oid = %d\n", name, oid)
- }
- if err = rows.Err(); err != nil {
- log.Fatal(err)
+ for _, oid := range oids {
+ fmt.Fprintf(w, "T_%s Oid = %d\n", oid.Type, oid.ID)
}
fmt.Fprintln(w, ")")
+ fmt.Fprintln(w, "var TypeName = map[Oid]string{")
+ for _, oid := range oids {
+ fmt.Fprintf(w, "T_%s: \"%s\",\n", oid.Type, oid.Name())
+ }
+ fmt.Fprintln(w, "}")
w.Close()
cmd.Wait()
}
diff --git a/vendor/github.com/lib/pq/oid/types.go b/vendor/github.com/lib/pq/oid/types.go
index a3390c23a..ecc84c2c8 100644
--- a/vendor/github.com/lib/pq/oid/types.go
+++ b/vendor/github.com/lib/pq/oid/types.go
@@ -1,4 +1,4 @@
-// generated by 'go run gen.go'; do not edit
+// Code generated by gen.go. DO NOT EDIT.
package oid
@@ -171,3 +171,173 @@ const (
T_regrole Oid = 4096
T__regrole Oid = 4097
)
+
+var TypeName = map[Oid]string{
+ T_bool: "BOOL",
+ T_bytea: "BYTEA",
+ T_char: "CHAR",
+ T_name: "NAME",
+ T_int8: "INT8",
+ T_int2: "INT2",
+ T_int2vector: "INT2VECTOR",
+ T_int4: "INT4",
+ T_regproc: "REGPROC",
+ T_text: "TEXT",
+ T_oid: "OID",
+ T_tid: "TID",
+ T_xid: "XID",
+ T_cid: "CID",
+ T_oidvector: "OIDVECTOR",
+ T_pg_ddl_command: "PG_DDL_COMMAND",
+ T_pg_type: "PG_TYPE",
+ T_pg_attribute: "PG_ATTRIBUTE",
+ T_pg_proc: "PG_PROC",
+ T_pg_class: "PG_CLASS",
+ T_json: "JSON",
+ T_xml: "XML",
+ T__xml: "_XML",
+ T_pg_node_tree: "PG_NODE_TREE",
+ T__json: "_JSON",
+ T_smgr: "SMGR",
+ T_index_am_handler: "INDEX_AM_HANDLER",
+ T_point: "POINT",
+ T_lseg: "LSEG",
+ T_path: "PATH",
+ T_box: "BOX",
+ T_polygon: "POLYGON",
+ T_line: "LINE",
+ T__line: "_LINE",
+ T_cidr: "CIDR",
+ T__cidr: "_CIDR",
+ T_float4: "FLOAT4",
+ T_float8: "FLOAT8",
+ T_abstime: "ABSTIME",
+ T_reltime: "RELTIME",
+ T_tinterval: "TINTERVAL",
+ T_unknown: "UNKNOWN",
+ T_circle: "CIRCLE",
+ T__circle: "_CIRCLE",
+ T_money: "MONEY",
+ T__money: "_MONEY",
+ T_macaddr: "MACADDR",
+ T_inet: "INET",
+ T__bool: "_BOOL",
+ T__bytea: "_BYTEA",
+ T__char: "_CHAR",
+ T__name: "_NAME",
+ T__int2: "_INT2",
+ T__int2vector: "_INT2VECTOR",
+ T__int4: "_INT4",
+ T__regproc: "_REGPROC",
+ T__text: "_TEXT",
+ T__tid: "_TID",
+ T__xid: "_XID",
+ T__cid: "_CID",
+ T__oidvector: "_OIDVECTOR",
+ T__bpchar: "_BPCHAR",
+ T__varchar: "_VARCHAR",
+ T__int8: "_INT8",
+ T__point: "_POINT",
+ T__lseg: "_LSEG",
+ T__path: "_PATH",
+ T__box: "_BOX",
+ T__float4: "_FLOAT4",
+ T__float8: "_FLOAT8",
+ T__abstime: "_ABSTIME",
+ T__reltime: "_RELTIME",
+ T__tinterval: "_TINTERVAL",
+ T__polygon: "_POLYGON",
+ T__oid: "_OID",
+ T_aclitem: "ACLITEM",
+ T__aclitem: "_ACLITEM",
+ T__macaddr: "_MACADDR",
+ T__inet: "_INET",
+ T_bpchar: "BPCHAR",
+ T_varchar: "VARCHAR",
+ T_date: "DATE",
+ T_time: "TIME",
+ T_timestamp: "TIMESTAMP",
+ T__timestamp: "_TIMESTAMP",
+ T__date: "_DATE",
+ T__time: "_TIME",
+ T_timestamptz: "TIMESTAMPTZ",
+ T__timestamptz: "_TIMESTAMPTZ",
+ T_interval: "INTERVAL",
+ T__interval: "_INTERVAL",
+ T__numeric: "_NUMERIC",
+ T_pg_database: "PG_DATABASE",
+ T__cstring: "_CSTRING",
+ T_timetz: "TIMETZ",
+ T__timetz: "_TIMETZ",
+ T_bit: "BIT",
+ T__bit: "_BIT",
+ T_varbit: "VARBIT",
+ T__varbit: "_VARBIT",
+ T_numeric: "NUMERIC",
+ T_refcursor: "REFCURSOR",
+ T__refcursor: "_REFCURSOR",
+ T_regprocedure: "REGPROCEDURE",
+ T_regoper: "REGOPER",
+ T_regoperator: "REGOPERATOR",
+ T_regclass: "REGCLASS",
+ T_regtype: "REGTYPE",
+ T__regprocedure: "_REGPROCEDURE",
+ T__regoper: "_REGOPER",
+ T__regoperator: "_REGOPERATOR",
+ T__regclass: "_REGCLASS",
+ T__regtype: "_REGTYPE",
+ T_record: "RECORD",
+ T_cstring: "CSTRING",
+ T_any: "ANY",
+ T_anyarray: "ANYARRAY",
+ T_void: "VOID",
+ T_trigger: "TRIGGER",
+ T_language_handler: "LANGUAGE_HANDLER",
+ T_internal: "INTERNAL",
+ T_opaque: "OPAQUE",
+ T_anyelement: "ANYELEMENT",
+ T__record: "_RECORD",
+ T_anynonarray: "ANYNONARRAY",
+ T_pg_authid: "PG_AUTHID",
+ T_pg_auth_members: "PG_AUTH_MEMBERS",
+ T__txid_snapshot: "_TXID_SNAPSHOT",
+ T_uuid: "UUID",
+ T__uuid: "_UUID",
+ T_txid_snapshot: "TXID_SNAPSHOT",
+ T_fdw_handler: "FDW_HANDLER",
+ T_pg_lsn: "PG_LSN",
+ T__pg_lsn: "_PG_LSN",
+ T_tsm_handler: "TSM_HANDLER",
+ T_anyenum: "ANYENUM",
+ T_tsvector: "TSVECTOR",
+ T_tsquery: "TSQUERY",
+ T_gtsvector: "GTSVECTOR",
+ T__tsvector: "_TSVECTOR",
+ T__gtsvector: "_GTSVECTOR",
+ T__tsquery: "_TSQUERY",
+ T_regconfig: "REGCONFIG",
+ T__regconfig: "_REGCONFIG",
+ T_regdictionary: "REGDICTIONARY",
+ T__regdictionary: "_REGDICTIONARY",
+ T_jsonb: "JSONB",
+ T__jsonb: "_JSONB",
+ T_anyrange: "ANYRANGE",
+ T_event_trigger: "EVENT_TRIGGER",
+ T_int4range: "INT4RANGE",
+ T__int4range: "_INT4RANGE",
+ T_numrange: "NUMRANGE",
+ T__numrange: "_NUMRANGE",
+ T_tsrange: "TSRANGE",
+ T__tsrange: "_TSRANGE",
+ T_tstzrange: "TSTZRANGE",
+ T__tstzrange: "_TSTZRANGE",
+ T_daterange: "DATERANGE",
+ T__daterange: "_DATERANGE",
+ T_int8range: "INT8RANGE",
+ T__int8range: "_INT8RANGE",
+ T_pg_shseclabel: "PG_SHSECLABEL",
+ T_regnamespace: "REGNAMESPACE",
+ T__regnamespace: "_REGNAMESPACE",
+ T_regrole: "REGROLE",
+ T__regrole: "_REGROLE",
+}
diff --git a/vendor/github.com/lib/pq/rows.go b/vendor/github.com/lib/pq/rows.go
new file mode 100644
index 000000000..c6aa5b9a3
--- /dev/null
+++ b/vendor/github.com/lib/pq/rows.go
@@ -0,0 +1,93 @@
+package pq
+
+import (
+ "math"
+ "reflect"
+ "time"
+
+ "github.com/lib/pq/oid"
+)
+
+const headerSize = 4
+
+type fieldDesc struct {
+ // The object ID of the data type.
+ OID oid.Oid
+ // The data type size (see pg_type.typlen).
+ // Note that negative values denote variable-width types.
+ Len int
+ // The type modifier (see pg_attribute.atttypmod).
+ // The meaning of the modifier is type-specific.
+ Mod int
+}
+
+func (fd fieldDesc) Type() reflect.Type {
+ switch fd.OID {
+ case oid.T_int8:
+ return reflect.TypeOf(int64(0))
+ case oid.T_int4:
+ return reflect.TypeOf(int32(0))
+ case oid.T_int2:
+ return reflect.TypeOf(int16(0))
+ case oid.T_varchar, oid.T_text:
+ return reflect.TypeOf("")
+ case oid.T_bool:
+ return reflect.TypeOf(false)
+ case oid.T_date, oid.T_time, oid.T_timetz, oid.T_timestamp, oid.T_timestamptz:
+ return reflect.TypeOf(time.Time{})
+ case oid.T_bytea:
+ return reflect.TypeOf([]byte(nil))
+ default:
+ return reflect.TypeOf(new(interface{})).Elem()
+ }
+}
+
+func (fd fieldDesc) Name() string {
+ return oid.TypeName[fd.OID]
+}
+
+func (fd fieldDesc) Length() (length int64, ok bool) {
+ switch fd.OID {
+ case oid.T_text, oid.T_bytea:
+ return math.MaxInt64, true
+ case oid.T_varchar, oid.T_bpchar:
+ return int64(fd.Mod - headerSize), true
+ default:
+ return 0, false
+ }
+}
+
+func (fd fieldDesc) PrecisionScale() (precision, scale int64, ok bool) {
+ switch fd.OID {
+ case oid.T_numeric, oid.T__numeric:
+ mod := fd.Mod - headerSize
+ precision = int64((mod >> 16) & 0xffff)
+ scale = int64(mod & 0xffff)
+ return precision, scale, true
+ default:
+ return 0, 0, false
+ }
+}
+
+// ColumnTypeScanType returns the value type that can be used to scan types into.
+func (rs *rows) ColumnTypeScanType(index int) reflect.Type {
+ return rs.colTyps[index].Type()
+}
+
+// ColumnTypeDatabaseTypeName return the database system type name.
+func (rs *rows) ColumnTypeDatabaseTypeName(index int) string {
+ return rs.colTyps[index].Name()
+}
+
+// ColumnTypeLength returns the length of the column type if the column is a
+// variable length type. If the column is not a variable length type ok
+// should return false.
+func (rs *rows) ColumnTypeLength(index int) (length int64, ok bool) {
+ return rs.colTyps[index].Length()
+}
+
+// ColumnTypePrecisionScale should return the precision and scale for decimal
+// types. If not applicable, ok should be false.
+func (rs *rows) ColumnTypePrecisionScale(index int) (precision, scale int64, ok bool) {
+ return rs.colTyps[index].PrecisionScale()
+}
diff --git a/vendor/github.com/lib/pq/rows_test.go b/vendor/github.com/lib/pq/rows_test.go
new file mode 100644
index 000000000..3033bc01b
--- /dev/null
+++ b/vendor/github.com/lib/pq/rows_test.go
@@ -0,0 +1,220 @@
+// +build go1.8
+
+package pq
+
+import (
+ "math"
+ "reflect"
+ "testing"
+
+ "github.com/lib/pq/oid"
+)
+
+func TestDataTypeName(t *testing.T) {
+ tts := []struct {
+ typ oid.Oid
+ name string
+ }{
+ {oid.T_int8, "INT8"},
+ {oid.T_int4, "INT4"},
+ {oid.T_int2, "INT2"},
+ {oid.T_varchar, "VARCHAR"},
+ {oid.T_text, "TEXT"},
+ {oid.T_bool, "BOOL"},
+ {oid.T_numeric, "NUMERIC"},
+ {oid.T_date, "DATE"},
+ {oid.T_time, "TIME"},
+ {oid.T_timetz, "TIMETZ"},
+ {oid.T_timestamp, "TIMESTAMP"},
+ {oid.T_timestamptz, "TIMESTAMPTZ"},
+ {oid.T_bytea, "BYTEA"},
+ }
+
+ for i, tt := range tts {
+ dt := fieldDesc{OID: tt.typ}
+ if name := dt.Name(); name != tt.name {
+ t.Errorf("(%d) got: %s want: %s", i, name, tt.name)
+ }
+ }
+}
+
+func TestDataType(t *testing.T) {
+ tts := []struct {
+ typ oid.Oid
+ kind reflect.Kind
+ }{
+ {oid.T_int8, reflect.Int64},
+ {oid.T_int4, reflect.Int32},
+ {oid.T_int2, reflect.Int16},
+ {oid.T_varchar, reflect.String},
+ {oid.T_text, reflect.String},
+ {oid.T_bool, reflect.Bool},
+ {oid.T_date, reflect.Struct},
+ {oid.T_time, reflect.Struct},
+ {oid.T_timetz, reflect.Struct},
+ {oid.T_timestamp, reflect.Struct},
+ {oid.T_timestamptz, reflect.Struct},
+ {oid.T_bytea, reflect.Slice},
+ }
+
+ for i, tt := range tts {
+ dt := fieldDesc{OID: tt.typ}
+ if kind := dt.Type().Kind(); kind != tt.kind {
+ t.Errorf("(%d) got: %s want: %s", i, kind, tt.kind)
+ }
+ }
+}
+
+func TestDataTypeLength(t *testing.T) {
+ tts := []struct {
+ typ oid.Oid
+ len int
+ mod int
+ length int64
+ ok bool
+ }{
+ {oid.T_int4, 0, -1, 0, false},
+ {oid.T_varchar, 65535, 9, 5, true},
+ {oid.T_text, 65535, -1, math.MaxInt64, true},
+ {oid.T_bytea, 65535, -1, math.MaxInt64, true},
+ }
+
+ for i, tt := range tts {
+ dt := fieldDesc{OID: tt.typ, Len: tt.len, Mod: tt.mod}
+ if l, k := dt.Length(); k != tt.ok || l != tt.length {
+ t.Errorf("(%d) got: %d, %t want: %d, %t", i, l, k, tt.length, tt.ok)
+ }
+ }
+}
+
+func TestDataTypePrecisionScale(t *testing.T) {
+ tts := []struct {
+ typ oid.Oid
+ mod int
+ precision, scale int64
+ ok bool
+ }{
+ {oid.T_int4, -1, 0, 0, false},
+ {oid.T_numeric, 589830, 9, 2, true},
+ {oid.T_text, -1, 0, 0, false},
+ }
+
+ for i, tt := range tts {
+ dt := fieldDesc{OID: tt.typ, Mod: tt.mod}
+ p, s, k := dt.PrecisionScale()
+ if k != tt.ok {
+ t.Errorf("(%d) got: %t want: %t", i, k, tt.ok)
+ }
+ if p != tt.precision {
+ t.Errorf("(%d) wrong precision got: %d want: %d", i, p, tt.precision)
+ }
+ if s != tt.scale {
+ t.Errorf("(%d) wrong scale got: %d want: %d", i, s, tt.scale)
+ }
+ }
+}
+
+func TestRowsColumnTypes(t *testing.T) {
+ columnTypesTests := []struct {
+ Name string
+ TypeName string
+ Length struct {
+ Len int64
+ OK bool
+ }
+ DecimalSize struct {
+ Precision int64
+ Scale int64
+ OK bool
+ }
+ ScanType reflect.Type
+ }{
+ {
+ Name: "a",
+ TypeName: "INT4",
+ Length: struct {
+ Len int64
+ OK bool
+ }{
+ Len: 0,
+ OK: false,
+ },
+ DecimalSize: struct {
+ Precision int64
+ Scale int64
+ OK bool
+ }{
+ Precision: 0,
+ Scale: 0,
+ OK: false,
+ },
+ ScanType: reflect.TypeOf(int32(0)),
+ }, {
+ Name: "bar",
+ TypeName: "TEXT",
+ Length: struct {
+ Len int64
+ OK bool
+ }{
+ Len: math.MaxInt64,
+ OK: true,
+ },
+ DecimalSize: struct {
+ Precision int64
+ Scale int64
+ OK bool
+ }{
+ Precision: 0,
+ Scale: 0,
+ OK: false,
+ },
+ ScanType: reflect.TypeOf(""),
+ },
+ }
+
+ db := openTestConn(t)
+ defer db.Close()
+
+ rows, err := db.Query("SELECT 1 AS a, text 'bar' AS bar, 1.28::numeric(9, 2) AS dec")
+ if err != nil {
+ t.Fatal(err)
+ }
+
+ columns, err := rows.ColumnTypes()
+ if err != nil {
+ t.Fatal(err)
+ }
+ if len(columns) != 3 {
+ t.Errorf("expected 3 columns found %d", len(columns))
+ }
+
+ for i, tt := range columnTypesTests {
+ c := columns[i]
+ if c.Name() != tt.Name {
+ t.Errorf("(%d) got: %s, want: %s", i, c.Name(), tt.Name)
+ }
+ if c.DatabaseTypeName() != tt.TypeName {
+ t.Errorf("(%d) got: %s, want: %s", i, c.DatabaseTypeName(), tt.TypeName)
+ }
+ l, ok := c.Length()
+ if l != tt.Length.Len {
+ t.Errorf("(%d) got: %d, want: %d", i, l, tt.Length.Len)
+ }
+ if ok != tt.Length.OK {
+ t.Errorf("(%d) got: %t, want: %t", i, ok, tt.Length.OK)
+ }
+ p, s, ok := c.DecimalSize()
+ if p != tt.DecimalSize.Precision {
+ t.Errorf("(%d) got: %d, want: %d", i, p, tt.DecimalSize.Precision)
+ }
+ if s != tt.DecimalSize.Scale {
+ t.Errorf("(%d) got: %d, want: %d", i, s, tt.DecimalSize.Scale)
+ }
+ if ok != tt.DecimalSize.OK {
+ t.Errorf("(%d) got: %t, want: %t", i, ok, tt.DecimalSize.OK)
+ }
+ if c.ScanType() != tt.ScanType {
+ t.Errorf("(%d) got: %v, want: %v", i, c.ScanType(), tt.ScanType)
+ }
+ }
+}
diff --git a/vendor/github.com/mailru/easyjson/.travis.yml b/vendor/github.com/mailru/easyjson/.travis.yml
index 884f8bbdf..3e5ac1320 100644
--- a/vendor/github.com/mailru/easyjson/.travis.yml
+++ b/vendor/github.com/mailru/easyjson/.travis.yml
@@ -1,9 +1,8 @@
language: go
go:
- - tip
+ - tip
install:
- - go get github.com/ugorji/go/codec
- - go get github.com/pquerna/ffjson/fflib/v1
- - go get github.com/json-iterator/go
- - go get github.com/golang/lint/golint
+ - go get github.com/ugorji/go/codec
+ - go get github.com/pquerna/ffjson/fflib/v1
+ - go get github.com/golang/lint/golint
diff --git a/vendor/github.com/mailru/easyjson/Makefile b/vendor/github.com/mailru/easyjson/Makefile
index ea591b0c0..8e720a084 100644
--- a/vendor/github.com/mailru/easyjson/Makefile
+++ b/vendor/github.com/mailru/easyjson/Makefile
@@ -4,7 +4,7 @@ export GOPATH
all: test
-.root/src/$(PKG):
+.root/src/$(PKG):
mkdir -p $@
for i in $$PWD/* ; do ln -s $$i $@/`basename $$i` ; done
@@ -45,7 +45,6 @@ test: generate root
bench-other: generate root
@go test -benchmem -bench . $(PKG)/benchmark
@go test -benchmem -tags use_ffjson -bench . $(PKG)/benchmark
- @go test -benchmem -tags use_jsoniter -bench . $(PKG)/benchmark
@go test -benchmem -tags use_codec -bench . $(PKG)/benchmark
bench-python:
diff --git a/vendor/github.com/mailru/easyjson/README.md b/vendor/github.com/mailru/easyjson/README.md
index 9366e3f71..d19751e0e 100644
--- a/vendor/github.com/mailru/easyjson/README.md
+++ b/vendor/github.com/mailru/easyjson/README.md
@@ -56,7 +56,7 @@ Usage of easyjson:
```
Using `-all` will generate marshalers/unmarshalers for all Go structs in the
-file. If `-all` is not provided, then only those structs whose preceding
+file. If `-all` is not provided, then only those structs whose preceeding
comment starts with `easyjson:json` will have marshalers/unmarshalers
generated. For example:
diff --git a/vendor/github.com/mailru/easyjson/benchmark/default_test.go b/vendor/github.com/mailru/easyjson/benchmark/default_test.go
index 68b37910d..b647bef23 100644
--- a/vendor/github.com/mailru/easyjson/benchmark/default_test.go
+++ b/vendor/github.com/mailru/easyjson/benchmark/default_test.go
@@ -1,4 +1,4 @@
-// +build !use_easyjson,!use_ffjson,!use_codec,!use_jsoniter
+// +build !use_easyjson,!use_ffjson,!use_codec
package benchmark
diff --git a/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go b/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go
deleted file mode 100644
index 004f891da..000000000
--- a/vendor/github.com/mailru/easyjson/benchmark/jsoniter_test.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// +build use_jsoniter
-
-package benchmark
-
-import (
- "testing"
-
- jsoniter "github.com/json-iterator/go"
-)
-
-func BenchmarkJI_Unmarshal_M(b *testing.B) {
- b.SetBytes(int64(len(largeStructText)))
- for i := 0; i < b.N; i++ {
- var s LargeStruct
- err := jsoniter.Unmarshal(largeStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
-}
-
-func BenchmarkJI_Unmarshal_S(b *testing.B) {
- for i := 0; i < b.N; i++ {
- var s Entities
- err := jsoniter.Unmarshal(smallStructText, &s)
- if err != nil {
- b.Error(err)
- }
- }
- b.SetBytes(int64(len(smallStructText)))
-}
-
-func BenchmarkJI_Marshal_M(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_L(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_M_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_L_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&xlStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_S(b *testing.B) {
- var l int64
- for i := 0; i < b.N; i++ {
- data, err := jsoniter.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_S_Parallel(b *testing.B) {
- var l int64
- b.RunParallel(func(pb *testing.PB) {
- for pb.Next() {
- data, err := jsoniter.Marshal(&smallStructData)
- if err != nil {
- b.Error(err)
- }
- l = int64(len(data))
- }
- })
- b.SetBytes(l)
-}
-
-func BenchmarkJI_Marshal_M_ToWriter(b *testing.B) {
- enc := jsoniter.NewEncoder(&DummyWriter{})
- for i := 0; i < b.N; i++ {
- err := enc.Encode(&largeStructData)
- if err != nil {
- b.Error(err)
- }
- }
-}
diff --git a/vendor/github.com/mailru/easyjson/easyjson/main.go b/vendor/github.com/mailru/easyjson/easyjson/main.go
index 1cd30bb36..1c3949757 100644
--- a/vendor/github.com/mailru/easyjson/easyjson/main.go
+++ b/vendor/github.com/mailru/easyjson/easyjson/main.go
@@ -54,13 +54,8 @@ func generate(fname string) (err error) {
outName = *specifiedName
}
- var trimmedBuildTags string
- if *buildTags != "" {
- trimmedBuildTags = strings.TrimSpace(*buildTags)
- }
-
g := bootstrap.Generator{
- BuildTags: trimmedBuildTags,
+ BuildTags: *buildTags,
PkgPath: p.PkgPath,
PkgName: p.PkgName,
Types: p.StructNames,
diff --git a/vendor/github.com/mailru/easyjson/gen/generator.go b/vendor/github.com/mailru/easyjson/gen/generator.go
index eb0d70ba2..f4312f64e 100644
--- a/vendor/github.com/mailru/easyjson/gen/generator.go
+++ b/vendor/github.com/mailru/easyjson/gen/generator.go
@@ -224,10 +224,6 @@ func fixAliasName(alias string) string {
"_",
-1,
)
-
- if alias[0] == 'v' { // to void conflicting with var names, say v1
- alias = "_" + alias
- }
return alias
}
@@ -384,7 +380,7 @@ func (DefaultFieldNamer) GetJSONFieldName(t reflect.Type, f reflect.StructField)
}
// LowerCamelCaseFieldNamer
-type LowerCamelCaseFieldNamer struct{}
+type LowerCamelCaseFieldNamer struct {}
func isLower(b byte) bool {
return b <= 122 && b >= 97
@@ -411,7 +407,7 @@ func lowerFirst(s string) string {
If the following char is upper OR numeric, LOWER it
If is the end of string, LEAVE it
Else lowercase
- */
+ */
foundLower := false
for i := range s {
diff --git a/vendor/github.com/mailru/easyjson/parser/parser_windows.go b/vendor/github.com/mailru/easyjson/parser/parser_windows.go
index a0b261195..64974aa97 100644
--- a/vendor/github.com/mailru/easyjson/parser/parser_windows.go
+++ b/vendor/github.com/mailru/easyjson/parser/parser_windows.go
@@ -4,18 +4,15 @@ import (
"fmt"
"os"
"path"
- "path/filepath"
"strings"
)
func normalizePath(path string) string {
- // use lower case, as Windows file systems will almost always be case insensitive
- return strings.ToLower(strings.Replace(path, "\\", "/", -1))
+ return strings.Replace(path, "\\", "/", -1)
}
func getPkgPath(fname string, isDir bool) (string, error) {
- // path.IsAbs doesn't work properly on Windows; use filepath.IsAbs instead
- if !filepath.IsAbs(fname) {
+ if !path.IsAbs(fname) {
pwd, err := os.Getwd()
if err != nil {
return "", err
diff --git a/vendor/github.com/opencontainers/image-spec/MAINTAINERS b/vendor/github.com/opencontainers/image-spec/MAINTAINERS
index 9c9d60b8a..63de32938 100644
--- a/vendor/github.com/opencontainers/image-spec/MAINTAINERS
+++ b/vendor/github.com/opencontainers/image-spec/MAINTAINERS
@@ -5,4 +5,5 @@ John Starks (@jstarks)
Jonathan Boulle (@jonboulle)
Stephen Day (@stevvooe)
Vincent Batts (@vbatts)
-Aleksa Sarai (@cyphar)
\ No newline at end of file
+Aleksa Sarai (@cyphar)
+Keyang Xie (@xiekeyang)
diff --git a/vendor/github.com/opencontainers/image-spec/descriptor.md b/vendor/github.com/opencontainers/image-spec/descriptor.md
index 8a9ff0626..570985c52 100644
--- a/vendor/github.com/opencontainers/image-spec/descriptor.md
+++ b/vendor/github.com/opencontainers/image-spec/descriptor.md
@@ -24,7 +24,7 @@ The following fields contain the primary properties that constitute a Descriptor
- **`digest`** *string*
- This REQUIRED property is the _digest_ of the targeted content, conforming to the requirements outlined in [Digests and Verification](#digests-and-verification).
+ This REQUIRED property is the _digest_ of the targeted content, conforming to the requirements outlined in [Digests](#digests).
Retrieved content SHOULD be verified against this digest when consumed via untrusted sources.
- **`size`** *int64*
diff --git a/vendor/github.com/opencontainers/image-spec/image-index.md b/vendor/github.com/opencontainers/image-spec/image-index.md
index 115d300a2..c0a2ca4d3 100644
--- a/vendor/github.com/opencontainers/image-spec/image-index.md
+++ b/vendor/github.com/opencontainers/image-spec/image-index.md
@@ -63,7 +63,9 @@ For the media type(s) that this document is compatible with, see the [matrix][ma
This OPTIONAL property specifies an array of strings, each specifying a mandatory OS feature.
When `os` is `windows`, image indexes SHOULD use, and implementations SHOULD understand the following values:
- - `win32k`: image requires `win32k.sys` on the host (Note: `win32k.sys` is missing on Nano Server)
+
+ - `win32k`: image requires `win32k.sys` on the host (Note: `win32k.sys` is missing on Nano Server)
+
When `os` is not `windows`, values are implementation-defined and SHOULD be submitted to this specification for standardization.
- **`variant`** *string*
diff --git a/vendor/github.com/opencontainers/image-spec/image-layout.md b/vendor/github.com/opencontainers/image-spec/image-layout.md
index 92f7a9ff8..f9a1b18ef 100644
--- a/vendor/github.com/opencontainers/image-spec/image-layout.md
+++ b/vendor/github.com/opencontainers/image-spec/image-layout.md
@@ -53,8 +53,8 @@ afff3924849e458c5ef237db5f89539274d5e609db5db935ed3959c90f1f2d51 ./blobs/sha256/
## Blobs
* Object names in the `blobs` subdirectories are composed of a directory for each hash algorithm, the children of which will contain the actual content.
-* The content of `blobs//` MUST match the digest `:` (referenced per [descriptor](descriptor.md#digests-and-verification)). For example, the content of `blobs/sha256/da39a3ee5e6b4b0d3255bfef95601890afd80709` MUST match the digest `sha256:da39a3ee5e6b4b0d3255bfef95601890afd80709`.
-* The character set of the entry name for `` and `` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests-and-verification).
+* The content of `blobs//` MUST match the digest `:` (referenced per [descriptor](descriptor.md#digests)). For example, the content of `blobs/sha256/da39a3ee5e6b4b0d3255bfef95601890afd80709` MUST match the digest `sha256:da39a3ee5e6b4b0d3255bfef95601890afd80709`.
+* The character set of the entry name for `` and `` MUST match the respective grammar elements described in [descriptor](descriptor.md#digests).
* The blobs directory MAY contain blobs which are not referenced by any of the [refs](#indexjson-file).
* The blobs directory MAY be missing referenced blobs, in which case the missing blobs SHOULD be fulfilled by an external blob store.
diff --git a/vendor/github.com/opencontainers/image-spec/implementations.md b/vendor/github.com/opencontainers/image-spec/implementations.md
index be26efdcc..31d8279e1 100644
--- a/vendor/github.com/opencontainers/image-spec/implementations.md
+++ b/vendor/github.com/opencontainers/image-spec/implementations.md
@@ -16,6 +16,6 @@ Projects or Companies currently adopting the OCI Image Specification
- [containers/image](https://github.com/containers/image)
* [coreos/rkt](https://github.com/coreos/rkt)
* [box-builder/box](https://github.com/box-builder/box)
-
+* [coolljt0725/docker2oci](https://github.com/coolljt0725/docker2oci)
_(to add your project please open a [pull-request](https://github.com/opencontainers/image-spec/pulls))_
diff --git a/vendor/github.com/opencontainers/image-spec/schema/validator.go b/vendor/github.com/opencontainers/image-spec/schema/validator.go
index f7043518f..b859934aa 100644
--- a/vendor/github.com/opencontainers/image-spec/schema/validator.go
+++ b/vendor/github.com/opencontainers/image-spec/schema/validator.go
@@ -157,7 +157,7 @@ func validateIndex(r io.Reader) error {
err = json.Unmarshal(buf, &header)
if err != nil {
- return errors.Wrap(err, "manifestlist format mismatch")
+ return errors.Wrap(err, "index format mismatch")
}
for _, manifest := range header.Manifests {
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/examples/cli_with_2_services/svc2/implementation.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/examples/cli_with_2_services/svc2/implementation.go
index b2b7c56a3..6b5b9a5f5 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/examples/cli_with_2_services/svc2/implementation.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/examples/cli_with_2_services/svc2/implementation.go
@@ -28,8 +28,9 @@ func (s *svc2) Sum(ctx context.Context, a int64, b int64) (int64, error) {
// Example binary annotations.
span.SetTag("service", "svc2")
- span.SetTag("key1", "value1")
- span.SetTag("key2", 2)
+ span.SetTag("string", "some value")
+ span.SetTag("int", 123)
+ span.SetTag("bool", true)
// Example annotation
span.LogEvent("MyEventAnnotation")
@@ -63,7 +64,7 @@ func (s *svc2) fakeDBCall(span opentracing.Span) {
// hostname of the resource
ext.PeerHostname.Set(resourceSpan, "localhost")
// port of the resource
- ext.PeerPort.Set(resourceSpan, 5432)
+ ext.PeerPort.Set(resourceSpan, 3306)
// let's binary annotate the query we run
resourceSpan.SetTag(
"query", "SELECT recipes FROM cookbook WHERE topic = 'world domination'",
diff --git a/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go b/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go
index 2aee71ec3..4b293c823 100644
--- a/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go
+++ b/vendor/github.com/openzipkin/zipkin-go-opentracing/zipkin-recorder.go
@@ -3,7 +3,6 @@ package zipkintracer
import (
"encoding/binary"
"fmt"
- "math"
"net"
"strconv"
"time"
@@ -202,86 +201,17 @@ func annotate(span *zipkincore.Span, timestamp time.Time, value string, host *zi
// annotateBinary annotates the span with a key and a value that will be []byte
// encoded.
func annotateBinary(span *zipkincore.Span, key string, value interface{}, host *zipkincore.Endpoint) {
- var a zipkincore.AnnotationType
- var b []byte
- // We are not using zipkincore.AnnotationType_I16 for types that could fit
- // as reporting on it seems to be broken on the zipkin web interface
- // (however, we can properly extract the number from zipkin storage
- // directly). int64 has issues with negative numbers but seems ok for
- // positive numbers needing more than 32 bit.
- switch v := value.(type) {
- case bool:
- a = zipkincore.AnnotationType_BOOL
- b = []byte("\x00")
- if v {
- b = []byte("\x01")
+ if b, ok := value.(bool); ok {
+ if b {
+ value = "true"
+ } else {
+ value = "false"
}
- case []byte:
- a = zipkincore.AnnotationType_BYTES
- b = v
- case byte:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case int8:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case int16:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint16:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case int32:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint32:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 4)
- binary.BigEndian.PutUint32(b, v)
- case int64:
- a = zipkincore.AnnotationType_I64
- b = make([]byte, 8)
- binary.BigEndian.PutUint64(b, uint64(v))
- case int:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 8)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint:
- a = zipkincore.AnnotationType_I32
- b = make([]byte, 8)
- binary.BigEndian.PutUint32(b, uint32(v))
- case uint64:
- a = zipkincore.AnnotationType_I64
- b = make([]byte, 8)
- binary.BigEndian.PutUint64(b, v)
- case float32:
- a = zipkincore.AnnotationType_DOUBLE
- b = make([]byte, 8)
- bits := math.Float64bits(float64(v))
- binary.BigEndian.PutUint64(b, bits)
- case float64:
- a = zipkincore.AnnotationType_DOUBLE
- b = make([]byte, 8)
- bits := math.Float64bits(v)
- binary.BigEndian.PutUint64(b, bits)
- case string:
- a = zipkincore.AnnotationType_STRING
- b = []byte(v)
- default:
- // we have no handler for type's value, but let's get a string
- // representation of it.
- a = zipkincore.AnnotationType_STRING
- b = []byte(fmt.Sprintf("%+v", value))
}
span.BinaryAnnotations = append(span.BinaryAnnotations, &zipkincore.BinaryAnnotation{
Key: key,
- Value: b,
- AnnotationType: a,
+ Value: []byte(fmt.Sprintf("%+v", value)),
+ AnnotationType: zipkincore.AnnotationType_STRING,
Host: host,
})
}
diff --git a/vendor/github.com/pkg/errors/.travis.yml b/vendor/github.com/pkg/errors/.travis.yml
index bf3eed6f5..7ca408d1b 100644
--- a/vendor/github.com/pkg/errors/.travis.yml
+++ b/vendor/github.com/pkg/errors/.travis.yml
@@ -6,6 +6,7 @@ go:
- 1.6.x
- 1.7.x
- 1.8.x
+ - 1.9.x
- tip
script:
diff --git a/vendor/github.com/prometheus/common/.travis.yml b/vendor/github.com/prometheus/common/.travis.yml
index 69b2431c8..2fe8e9ad7 100644
--- a/vendor/github.com/prometheus/common/.travis.yml
+++ b/vendor/github.com/prometheus/common/.travis.yml
@@ -2,6 +2,5 @@ sudo: false
language: go
go:
- - 1.5.4
- - 1.6.2
+ - 1.7.5
- tip
diff --git a/vendor/github.com/prometheus/common/README.md b/vendor/github.com/prometheus/common/README.md
index 98f6ce24b..11a584945 100644
--- a/vendor/github.com/prometheus/common/README.md
+++ b/vendor/github.com/prometheus/common/README.md
@@ -6,7 +6,7 @@ components and libraries.
* **config**: Common configuration structures
* **expfmt**: Decoding and encoding for the exposition format
-* **log**: A logging wrapper around [logrus](https://github.com/Sirupsen/logrus)
+* **log**: A logging wrapper around [logrus](https://github.com/sirupsen/logrus)
* **model**: Shared data structures
* **route**: A routing wrapper around [httprouter](https://github.com/julienschmidt/httprouter) using `context.Context`
* **version**: Version informations and metric
diff --git a/vendor/github.com/prometheus/common/config/config.go b/vendor/github.com/prometheus/common/config/config.go
index 33eb922ce..9195c34bf 100644
--- a/vendor/github.com/prometheus/common/config/config.go
+++ b/vendor/github.com/prometheus/common/config/config.go
@@ -28,3 +28,20 @@ func checkOverflow(m map[string]interface{}, ctx string) error {
}
return nil
}
+
+// Secret special type for storing secrets.
+type Secret string
+
+// MarshalYAML implements the yaml.Marshaler interface for Secrets.
+func (s Secret) MarshalYAML() (interface{}, error) {
+ if s != "" {
+ return "", nil
+ }
+ return nil, nil
+}
+
+//UnmarshalYAML implements the yaml.Unmarshaler interface for Secrets.
+func (s *Secret) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ type plain Secret
+ return unmarshal((*plain)(s))
+}
diff --git a/vendor/github.com/prometheus/common/config/http_config.go b/vendor/github.com/prometheus/common/config/http_config.go
new file mode 100644
index 000000000..ff5837fa5
--- /dev/null
+++ b/vendor/github.com/prometheus/common/config/http_config.go
@@ -0,0 +1,279 @@
+// Copyright 2016 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 config
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "fmt"
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+
+ yaml "gopkg.in/yaml.v2"
+)
+
+// BasicAuth contains basic HTTP authentication credentials.
+type BasicAuth struct {
+ Username string `yaml:"username"`
+ Password Secret `yaml:"password"`
+
+ // Catches all undefined fields and must be empty after parsing.
+ XXX map[string]interface{} `yaml:",inline"`
+}
+
+// URL is a custom URL type that allows validation at configuration load time.
+type URL struct {
+ *url.URL
+}
+
+// UnmarshalYAML implements the yaml.Unmarshaler interface for URLs.
+func (u *URL) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ var s string
+ if err := unmarshal(&s); err != nil {
+ return err
+ }
+
+ urlp, err := url.Parse(s)
+ if err != nil {
+ return err
+ }
+ u.URL = urlp
+ return nil
+}
+
+// MarshalYAML implements the yaml.Marshaler interface for URLs.
+func (u URL) MarshalYAML() (interface{}, error) {
+ if u.URL != nil {
+ return u.String(), nil
+ }
+ return nil, nil
+}
+
+// HTTPClientConfig configures an HTTP client.
+type HTTPClientConfig struct {
+ // The HTTP basic authentication credentials for the targets.
+ BasicAuth *BasicAuth `yaml:"basic_auth,omitempty"`
+ // The bearer token for the targets.
+ BearerToken Secret `yaml:"bearer_token,omitempty"`
+ // The bearer token file for the targets.
+ BearerTokenFile string `yaml:"bearer_token_file,omitempty"`
+ // HTTP proxy server to use to connect to the targets.
+ ProxyURL URL `yaml:"proxy_url,omitempty"`
+ // TLSConfig to use to connect to the targets.
+ TLSConfig TLSConfig `yaml:"tls_config,omitempty"`
+
+ // Catches all undefined fields and must be empty after parsing.
+ XXX map[string]interface{} `yaml:",inline"`
+}
+
+func (c *HTTPClientConfig) validate() error {
+ if len(c.BearerToken) > 0 && len(c.BearerTokenFile) > 0 {
+ return fmt.Errorf("at most one of bearer_token & bearer_token_file must be configured")
+ }
+ if c.BasicAuth != nil && (len(c.BearerToken) > 0 || len(c.BearerTokenFile) > 0) {
+ return fmt.Errorf("at most one of basic_auth, bearer_token & bearer_token_file must be configured")
+ }
+ return nil
+}
+
+// UnmarshalYAML implements the yaml.Unmarshaler interface
+func (c *HTTPClientConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ type plain HTTPClientConfig
+ err := unmarshal((*plain)(c))
+ if err != nil {
+ return err
+ }
+ err = c.validate()
+ if err != nil {
+ return c.validate()
+ }
+ return checkOverflow(c.XXX, "http_client_config")
+}
+
+// UnmarshalYAML implements the yaml.Unmarshaler interface.
+func (a *BasicAuth) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ type plain BasicAuth
+ err := unmarshal((*plain)(a))
+ if err != nil {
+ return err
+ }
+ return checkOverflow(a.XXX, "basic_auth")
+}
+
+// NewHTTPClientFromConfig returns a new HTTP client configured for the
+// given config.HTTPClientConfig.
+func NewHTTPClientFromConfig(cfg *HTTPClientConfig) (*http.Client, error) {
+ tlsConfig, err := NewTLSConfig(&cfg.TLSConfig)
+ if err != nil {
+ return nil, err
+ }
+
+ // It's the caller's job to handle timeouts
+ var rt http.RoundTripper = &http.Transport{
+ Proxy: http.ProxyURL(cfg.ProxyURL.URL),
+ DisableKeepAlives: true,
+ TLSClientConfig: tlsConfig,
+ }
+
+ // If a bearer token is provided, create a round tripper that will set the
+ // Authorization header correctly on each request.
+ bearerToken := cfg.BearerToken
+ if len(bearerToken) == 0 && len(cfg.BearerTokenFile) > 0 {
+ b, err := ioutil.ReadFile(cfg.BearerTokenFile)
+ if err != nil {
+ return nil, fmt.Errorf("unable to read bearer token file %s: %s", cfg.BearerTokenFile, err)
+ }
+ bearerToken = Secret(strings.TrimSpace(string(b)))
+ }
+
+ if len(bearerToken) > 0 {
+ rt = NewBearerAuthRoundTripper(bearerToken, rt)
+ }
+
+ if cfg.BasicAuth != nil {
+ rt = NewBasicAuthRoundTripper(cfg.BasicAuth.Username, Secret(cfg.BasicAuth.Password), rt)
+ }
+
+ // Return a new client with the configured round tripper.
+ return &http.Client{Transport: rt}, nil
+}
+
+type bearerAuthRoundTripper struct {
+ bearerToken Secret
+ rt http.RoundTripper
+}
+
+type basicAuthRoundTripper struct {
+ username string
+ password Secret
+ rt http.RoundTripper
+}
+
+// NewBasicAuthRoundTripper will apply a BASIC auth authorization header to a request unless it has
+// already been set.
+func NewBasicAuthRoundTripper(username string, password Secret, rt http.RoundTripper) http.RoundTripper {
+ return &basicAuthRoundTripper{username, password, rt}
+}
+
+func (rt *bearerAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ if len(req.Header.Get("Authorization")) == 0 {
+ req = cloneRequest(req)
+ req.Header.Set("Authorization", "Bearer "+string(rt.bearerToken))
+ }
+
+ return rt.rt.RoundTrip(req)
+}
+
+// NewBearerAuthRoundTripper adds the provided bearer token to a request unless the authorization
+// header has already been set.
+func NewBearerAuthRoundTripper(bearer Secret, rt http.RoundTripper) http.RoundTripper {
+ return &bearerAuthRoundTripper{bearer, rt}
+}
+
+func (rt *basicAuthRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ if len(req.Header.Get("Authorization")) != 0 {
+ return rt.RoundTrip(req)
+ }
+ req = cloneRequest(req)
+ req.SetBasicAuth(rt.username, string(rt.password))
+ return rt.rt.RoundTrip(req)
+}
+
+// cloneRequest returns a clone of the provided *http.Request.
+// The clone is a shallow copy of the struct and its Header map.
+func cloneRequest(r *http.Request) *http.Request {
+ // Shallow copy of the struct.
+ r2 := new(http.Request)
+ *r2 = *r
+ // Deep copy of the Header.
+ r2.Header = make(http.Header)
+ for k, s := range r.Header {
+ r2.Header[k] = s
+ }
+ return r2
+}
+
+// NewTLSConfig creates a new tls.Config from the given config.TLSConfig.
+func NewTLSConfig(cfg *TLSConfig) (*tls.Config, error) {
+ tlsConfig := &tls.Config{InsecureSkipVerify: cfg.InsecureSkipVerify}
+
+ // If a CA cert is provided then let's read it in so we can validate the
+ // scrape target's certificate properly.
+ if len(cfg.CAFile) > 0 {
+ caCertPool := x509.NewCertPool()
+ // Load CA cert.
+ caCert, err := ioutil.ReadFile(cfg.CAFile)
+ if err != nil {
+ return nil, fmt.Errorf("unable to use specified CA cert %s: %s", cfg.CAFile, err)
+ }
+ caCertPool.AppendCertsFromPEM(caCert)
+ tlsConfig.RootCAs = caCertPool
+ }
+
+ if len(cfg.ServerName) > 0 {
+ tlsConfig.ServerName = cfg.ServerName
+ }
+
+ // If a client cert & key is provided then configure TLS config accordingly.
+ if len(cfg.CertFile) > 0 && len(cfg.KeyFile) == 0 {
+ return nil, fmt.Errorf("client cert file %q specified without client key file", cfg.CertFile)
+ } else if len(cfg.KeyFile) > 0 && len(cfg.CertFile) == 0 {
+ return nil, fmt.Errorf("client key file %q specified without client cert file", cfg.KeyFile)
+ } else if len(cfg.CertFile) > 0 && len(cfg.KeyFile) > 0 {
+ cert, err := tls.LoadX509KeyPair(cfg.CertFile, cfg.KeyFile)
+ if err != nil {
+ return nil, fmt.Errorf("unable to use specified client cert (%s) & key (%s): %s", cfg.CertFile, cfg.KeyFile, err)
+ }
+ tlsConfig.Certificates = []tls.Certificate{cert}
+ }
+ tlsConfig.BuildNameToCertificate()
+
+ return tlsConfig, nil
+}
+
+// TLSConfig configures the options for TLS connections.
+type TLSConfig struct {
+ // The CA cert to use for the targets.
+ CAFile string `yaml:"ca_file,omitempty"`
+ // The client cert file for the targets.
+ CertFile string `yaml:"cert_file,omitempty"`
+ // The client key file for the targets.
+ KeyFile string `yaml:"key_file,omitempty"`
+ // Used to verify the hostname for the targets.
+ ServerName string `yaml:"server_name,omitempty"`
+ // Disable target certificate validation.
+ InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
+
+ // Catches all undefined fields and must be empty after parsing.
+ XXX map[string]interface{} `yaml:",inline"`
+}
+
+// UnmarshalYAML implements the yaml.Unmarshaler interface.
+func (c *TLSConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ type plain TLSConfig
+ if err := unmarshal((*plain)(c)); err != nil {
+ return err
+ }
+ return checkOverflow(c.XXX, "TLS config")
+}
+
+func (c HTTPClientConfig) String() string {
+ b, err := yaml.Marshal(c)
+ if err != nil {
+ return fmt.Sprintf("", err)
+ }
+ return string(b)
+}
diff --git a/vendor/github.com/prometheus/common/config/http_config_test.go b/vendor/github.com/prometheus/common/config/http_config_test.go
new file mode 100644
index 000000000..1e2490bbb
--- /dev/null
+++ b/vendor/github.com/prometheus/common/config/http_config_test.go
@@ -0,0 +1,157 @@
+// 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 config
+
+import (
+ "io/ioutil"
+ "net/http"
+ "net/url"
+ "strings"
+ "testing"
+
+ yaml "gopkg.in/yaml.v2"
+)
+
+var invalidHTTPClientConfigs = []struct {
+ httpClientConfigFile string
+ errMsg string
+}{
+ {
+ httpClientConfigFile: "testdata/http.conf.bearer-token-and-file-set.bad.yml",
+ errMsg: "at most one of bearer_token & bearer_token_file must be configured",
+ },
+ {
+ httpClientConfigFile: "testdata/http.conf.empty.bad.yml",
+ errMsg: "at most one of basic_auth, bearer_token & bearer_token_file must be configured",
+ },
+}
+
+func TestAuthRoundTrippers(t *testing.T) {
+
+ cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
+ if err != nil {
+ t.Errorf("Error loading HTTP client config: %v", err)
+ }
+
+ tlsConfig, err := NewTLSConfig(&cfg.TLSConfig)
+ if err != nil {
+ t.Errorf("Error creating new TLS config: %v", err)
+ }
+
+ rt := &http.Transport{
+ Proxy: http.ProxyURL(cfg.ProxyURL.URL),
+ DisableKeepAlives: true,
+ TLSClientConfig: tlsConfig,
+ }
+ req := new(http.Request)
+
+ bearerAuthRoundTripper := NewBearerAuthRoundTripper("mysecret", rt)
+ bearerAuthRoundTripper.RoundTrip(req)
+
+ basicAuthRoundTripper := NewBasicAuthRoundTripper("username", "password", rt)
+ basicAuthRoundTripper.RoundTrip(req)
+}
+
+func TestHideHTTPClientConfigSecrets(t *testing.T) {
+ c, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
+ if err != nil {
+ t.Errorf("Error parsing %s: %s", "testdata/http.conf.good.yml", err)
+ }
+
+ // String method must not reveal authentication credentials.
+ s := c.String()
+ if strings.Contains(s, "mysecret") {
+ t.Fatal("http client config's String method reveals authentication credentials.")
+ }
+}
+
+func mustParseURL(u string) *URL {
+ parsed, err := url.Parse(u)
+ if err != nil {
+ panic(err)
+ }
+ return &URL{URL: parsed}
+}
+
+func TestNewClientFromConfig(t *testing.T) {
+ cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
+ if err != nil {
+ t.Errorf("Error loading HTTP client config: %v", err)
+ }
+ _, err = NewHTTPClientFromConfig(cfg)
+ if err != nil {
+ t.Errorf("Error creating new client from config: %v", err)
+ }
+}
+
+func TestNewClientFromInvalidConfig(t *testing.T) {
+ cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.invalid-bearer-token-file.bad.yml")
+ if err != nil {
+ t.Errorf("Error loading HTTP client config: %v", err)
+ }
+ _, err = NewHTTPClientFromConfig(cfg)
+ if err == nil {
+ t.Error("Expected error creating new client from invalid config but got none")
+ }
+ if !strings.Contains(err.Error(), "unable to read bearer token file file: open file: no such file or directory") {
+ t.Errorf("Expected error with config but got: %s", err.Error())
+ }
+}
+
+func TestValidateHTTPConfig(t *testing.T) {
+ cfg, _, err := LoadHTTPConfigFile("testdata/http.conf.good.yml")
+ if err != nil {
+ t.Errorf("Error loading HTTP client config: %v", err)
+ }
+ err = cfg.validate()
+ if err != nil {
+ t.Fatalf("Error validating %s: %s", "testdata/http.conf.good.yml", err)
+ }
+}
+
+func TestInvalidHTTPConfigs(t *testing.T) {
+ for _, ee := range invalidHTTPClientConfigs {
+ _, _, err := LoadHTTPConfigFile(ee.httpClientConfigFile)
+ if err == nil {
+ t.Error("Expected error with config but got none")
+ continue
+ }
+ if !strings.Contains(err.Error(), ee.errMsg) {
+ t.Errorf("Expected error for invalid HTTP client configuration to contain %q but got: %s", ee.errMsg, err)
+ }
+ }
+}
+
+// LoadHTTPConfig parses the YAML input s into a HTTPClientConfig.
+func LoadHTTPConfig(s string) (*HTTPClientConfig, error) {
+ cfg := &HTTPClientConfig{}
+ err := yaml.Unmarshal([]byte(s), cfg)
+ if err != nil {
+ return nil, err
+ }
+ return cfg, nil
+}
+
+// LoadHTTPConfigFile parses the given YAML file into a HTTPClientConfig.
+func LoadHTTPConfigFile(filename string) (*HTTPClientConfig, []byte, error) {
+ content, err := ioutil.ReadFile(filename)
+ if err != nil {
+ return nil, nil, err
+ }
+ cfg, err := LoadHTTPConfig(string(content))
+ if err != nil {
+ return nil, nil, err
+ }
+ return cfg, content, nil
+}
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml
new file mode 100644
index 000000000..c613bacb0
--- /dev/null
+++ b/vendor/github.com/prometheus/common/config/testdata/http.conf.bearer-token-and-file-set.bad.yml
@@ -0,0 +1,5 @@
+basic_auth:
+ username: username
+ password: "mysecret"
+bearer_token: mysecret
+bearer_token_file: file
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml
new file mode 100644
index 000000000..ea2811f7c
--- /dev/null
+++ b/vendor/github.com/prometheus/common/config/testdata/http.conf.empty.bad.yml
@@ -0,0 +1,4 @@
+basic_auth:
+ username: username
+ password: mysecret
+bearer_token_file: file
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml
new file mode 100644
index 000000000..46ca63908
--- /dev/null
+++ b/vendor/github.com/prometheus/common/config/testdata/http.conf.good.yml
@@ -0,0 +1,4 @@
+basic_auth:
+ username: username
+ password: "mysecret"
+proxy_url: "http://remote.host"
diff --git a/vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml b/vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml
new file mode 100644
index 000000000..4b1349bf4
--- /dev/null
+++ b/vendor/github.com/prometheus/common/config/testdata/http.conf.invalid-bearer-token-file.bad.yml
@@ -0,0 +1 @@
+bearer_token_file: file
diff --git a/vendor/github.com/prometheus/common/config/tls_config.go b/vendor/github.com/prometheus/common/config/tls_config.go
deleted file mode 100644
index 7c7e7cb02..000000000
--- a/vendor/github.com/prometheus/common/config/tls_config.go
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright 2016 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 config
-
-import (
- "crypto/tls"
- "crypto/x509"
- "fmt"
- "io/ioutil"
-)
-
-// TLSConfig configures the options for TLS connections.
-type TLSConfig struct {
- // The CA cert to use for the targets.
- CAFile string `yaml:"ca_file,omitempty"`
- // The client cert file for the targets.
- CertFile string `yaml:"cert_file,omitempty"`
- // The client key file for the targets.
- KeyFile string `yaml:"key_file,omitempty"`
- // Disable target certificate validation.
- InsecureSkipVerify bool `yaml:"insecure_skip_verify"`
-
- // Catches all undefined fields and must be empty after parsing.
- XXX map[string]interface{} `yaml:",inline"`
-}
-
-// UnmarshalYAML implements the yaml.Unmarshaler interface.
-func (c *TLSConfig) UnmarshalYAML(unmarshal func(interface{}) error) error {
- type plain TLSConfig
- if err := unmarshal((*plain)(c)); err != nil {
- return err
- }
- return checkOverflow(c.XXX, "TLS config")
-}
-
-// GenerateConfig produces a tls.Config based on TLS connection options.
-// It loads certificate files from disk if they are defined.
-func (c *TLSConfig) GenerateConfig() (*tls.Config, error) {
- tlsConfig := &tls.Config{InsecureSkipVerify: c.InsecureSkipVerify}
-
- // If a CA cert is provided then let's read it in so we can validate the
- // scrape target's certificate properly.
- if len(c.CAFile) > 0 {
- caCertPool := x509.NewCertPool()
- // Load CA cert.
- caCert, err := ioutil.ReadFile(c.CAFile)
- if err != nil {
- return nil, fmt.Errorf("unable to use specified CA cert %s: %s", c.CAFile, err)
- }
- caCertPool.AppendCertsFromPEM(caCert)
- tlsConfig.RootCAs = caCertPool
- }
-
- if len(c.CertFile) > 0 && len(c.KeyFile) == 0 {
- return nil, fmt.Errorf("client cert file %q specified without client key file", c.CertFile)
- } else if len(c.KeyFile) > 0 && len(c.CertFile) == 0 {
- return nil, fmt.Errorf("client key file %q specified without client cert file", c.KeyFile)
- } else if len(c.CertFile) > 0 && len(c.KeyFile) > 0 {
- cert, err := tls.LoadX509KeyPair(c.CertFile, c.KeyFile)
- if err != nil {
- return nil, fmt.Errorf("unable to use specified client cert (%s) & key (%s): %s", c.CertFile, c.KeyFile, err)
- }
- tlsConfig.Certificates = []tls.Certificate{cert}
- }
- tlsConfig.BuildNameToCertificate()
-
- return tlsConfig, nil
-}
diff --git a/vendor/github.com/prometheus/common/config/tls_config_test.go b/vendor/github.com/prometheus/common/config/tls_config_test.go
index 444303532..e2bd68edb 100644
--- a/vendor/github.com/prometheus/common/config/tls_config_test.go
+++ b/vendor/github.com/prometheus/common/config/tls_config_test.go
@@ -33,7 +33,7 @@ func LoadTLSConfig(filename string) (*tls.Config, error) {
if err = yaml.Unmarshal(content, cfg); err != nil {
return nil, err
}
- return cfg.GenerateConfig()
+ return NewTLSConfig(cfg)
}
var expectedTLSConfigs = []struct {
@@ -57,7 +57,7 @@ func TestValidTLSConfig(t *testing.T) {
t.Errorf("Error parsing %s: %s", cfg.filename, err)
}
if !reflect.DeepEqual(*got, *cfg.config) {
- t.Fatalf("%s: unexpected config result: \n\n%s\n expected\n\n%s", cfg.filename, got, cfg.config)
+ t.Fatalf("%v: unexpected config result: \n\n%v\n expected\n\n%v", cfg.filename, got, cfg.config)
}
}
}
diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse.go b/vendor/github.com/prometheus/common/expfmt/text_parse.go
index ef9a15077..54bcfde29 100644
--- a/vendor/github.com/prometheus/common/expfmt/text_parse.go
+++ b/vendor/github.com/prometheus/common/expfmt/text_parse.go
@@ -315,6 +315,10 @@ func (p *TextParser) startLabelValue() stateFn {
if p.readTokenAsLabelValue(); p.err != nil {
return nil
}
+ if !model.LabelValue(p.currentToken.String()).IsValid() {
+ p.parseError(fmt.Sprintf("invalid label value %q", p.currentToken.String()))
+ return nil
+ }
p.currentLabelPair.Value = proto.String(p.currentToken.String())
// Special treatment of summaries:
// - Quantile labels are special, will result in dto.Quantile later.
diff --git a/vendor/github.com/prometheus/common/expfmt/text_parse_test.go b/vendor/github.com/prometheus/common/expfmt/text_parse_test.go
index 7e7388ce9..76c951185 100644
--- a/vendor/github.com/prometheus/common/expfmt/text_parse_test.go
+++ b/vendor/github.com/prometheus/common/expfmt/text_parse_test.go
@@ -559,6 +559,11 @@ metric_bucket{le="bla"} 3.14
`,
err: "text format parsing error in line 3: expected float as value for 'le' label",
},
+ // 19: Invalid UTF-8 in label value.
+ {
+ in: "metric{l=\"\xbd\"} 3.14\n",
+ err: "text format parsing error in line 1: invalid label value \"\\xbd\"",
+ },
}
for i, scenario := range scenarios {
diff --git a/vendor/github.com/prometheus/common/log/eventlog_formatter.go b/vendor/github.com/prometheus/common/log/eventlog_formatter.go
index 6d41284ce..bcf68e6f2 100644
--- a/vendor/github.com/prometheus/common/log/eventlog_formatter.go
+++ b/vendor/github.com/prometheus/common/log/eventlog_formatter.go
@@ -21,22 +21,22 @@ import (
"golang.org/x/sys/windows/svc/eventlog"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
func init() {
- setEventlogFormatter = func(name string, debugAsInfo bool) error {
+ setEventlogFormatter = func(l logger, name string, debugAsInfo bool) error {
if name == "" {
return fmt.Errorf("missing name parameter")
}
- fmter, err := newEventlogger(name, debugAsInfo, origLogger.Formatter)
+ fmter, err := newEventlogger(name, debugAsInfo, l.entry.Logger.Formatter)
if err != nil {
fmt.Fprintf(os.Stderr, "error creating eventlog formatter: %v\n", err)
- origLogger.Errorf("can't connect logger to eventlog: %v", err)
+ l.Errorf("can't connect logger to eventlog: %v", err)
return err
}
- origLogger.Formatter = fmter
+ l.entry.Logger.Formatter = fmter
return nil
}
}
diff --git a/vendor/github.com/prometheus/common/log/log.go b/vendor/github.com/prometheus/common/log/log.go
index efad4842f..04e906c07 100644
--- a/vendor/github.com/prometheus/common/log/log.go
+++ b/vendor/github.com/prometheus/common/log/log.go
@@ -14,7 +14,6 @@
package log
import (
- "flag"
"fmt"
"io"
"io/ioutil"
@@ -25,106 +24,46 @@ import (
"strconv"
"strings"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
+ "gopkg.in/alecthomas/kingpin.v2"
)
-type levelFlag string
-
-// String implements flag.Value.
-func (f levelFlag) String() string {
- return fmt.Sprintf("%q", string(f))
-}
-
-// Set implements flag.Value.
-func (f levelFlag) Set(level string) error {
- l, err := logrus.ParseLevel(level)
- if err != nil {
- return err
- }
- origLogger.Level = l
- return nil
-}
-
// setSyslogFormatter is nil if the target architecture does not support syslog.
-var setSyslogFormatter func(string, string) error
+var setSyslogFormatter func(logger, string, string) error
// setEventlogFormatter is nil if the target OS does not support Eventlog (i.e., is not Windows).
-var setEventlogFormatter func(string, bool) error
+var setEventlogFormatter func(logger, string, bool) error
func setJSONFormatter() {
origLogger.Formatter = &logrus.JSONFormatter{}
}
-type logFormatFlag url.URL
-
-// String implements flag.Value.
-func (f logFormatFlag) String() string {
- u := url.URL(f)
- return fmt.Sprintf("%q", u.String())
+type loggerSettings struct {
+ level string
+ format string
}
-// Set implements flag.Value.
-func (f logFormatFlag) Set(format string) error {
- u, err := url.Parse(format)
+func (s *loggerSettings) apply(ctx *kingpin.ParseContext) error {
+ err := baseLogger.SetLevel(s.level)
if err != nil {
return err
}
- if u.Scheme != "logger" {
- return fmt.Errorf("invalid scheme %s", u.Scheme)
- }
- jsonq := u.Query().Get("json")
- if jsonq == "true" {
- setJSONFormatter()
- }
-
- switch u.Opaque {
- case "syslog":
- if setSyslogFormatter == nil {
- return fmt.Errorf("system does not support syslog")
- }
- appname := u.Query().Get("appname")
- facility := u.Query().Get("local")
- return setSyslogFormatter(appname, facility)
- case "eventlog":
- if setEventlogFormatter == nil {
- return fmt.Errorf("system does not support eventlog")
- }
- name := u.Query().Get("name")
- debugAsInfo := false
- debugAsInfoRaw := u.Query().Get("debugAsInfo")
- if parsedDebugAsInfo, err := strconv.ParseBool(debugAsInfoRaw); err == nil {
- debugAsInfo = parsedDebugAsInfo
- }
- return setEventlogFormatter(name, debugAsInfo)
- case "stdout":
- origLogger.Out = os.Stdout
- case "stderr":
- origLogger.Out = os.Stderr
- default:
- return fmt.Errorf("unsupported logger %q", u.Opaque)
- }
- return nil
+ err = baseLogger.SetFormat(s.format)
+ return err
}
-func init() {
- AddFlags(flag.CommandLine)
-}
-
-// AddFlags adds the flags used by this package to the given FlagSet. That's
-// useful if working with a custom FlagSet. The init function of this package
-// adds the flags to flag.CommandLine anyway. Thus, it's usually enough to call
-// flag.Parse() to make the logging flags take effect.
-func AddFlags(fs *flag.FlagSet) {
- fs.Var(
- levelFlag(origLogger.Level.String()),
- "log.level",
- "Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]",
- )
- fs.Var(
- logFormatFlag(url.URL{Scheme: "logger", Opaque: "stderr"}),
- "log.format",
- `Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true"`,
- )
+// AddFlags adds the flags used by this package to the Kingpin application.
+// To use the default Kingpin application, call AddFlags(kingpin.CommandLine)
+func AddFlags(a *kingpin.Application) {
+ s := loggerSettings{}
+ kingpin.Flag("log.level", "Only log messages with the given severity or above. Valid levels: [debug, info, warn, error, fatal]").
+ Default(origLogger.Level.String()).
+ StringVar(&s.level)
+ defaultFormat := url.URL{Scheme: "logger", Opaque: "stderr"}
+ kingpin.Flag("log.format", `Set the log target and format. Example: "logger:syslog?appname=bob&local=7" or "logger:stdout?json=true"`).
+ Default(defaultFormat.String()).
+ StringVar(&s.format)
+ a.Action(s.apply)
}
// Logger is the interface for loggers used in the Prometheus components.
@@ -150,6 +89,9 @@ type Logger interface {
Fatalf(string, ...interface{})
With(key string, value interface{}) Logger
+
+ SetFormat(string) error
+ SetLevel(string) error
}
type logger struct {
@@ -235,6 +177,58 @@ func (l logger) Fatalf(format string, args ...interface{}) {
l.sourced().Fatalf(format, args...)
}
+func (l logger) SetLevel(level string) error {
+ lvl, err := logrus.ParseLevel(level)
+ if err != nil {
+ return err
+ }
+
+ l.entry.Logger.Level = lvl
+ return nil
+}
+
+func (l logger) SetFormat(format string) error {
+ u, err := url.Parse(format)
+ if err != nil {
+ return err
+ }
+ if u.Scheme != "logger" {
+ return fmt.Errorf("invalid scheme %s", u.Scheme)
+ }
+ jsonq := u.Query().Get("json")
+ if jsonq == "true" {
+ setJSONFormatter()
+ }
+
+ switch u.Opaque {
+ case "syslog":
+ if setSyslogFormatter == nil {
+ return fmt.Errorf("system does not support syslog")
+ }
+ appname := u.Query().Get("appname")
+ facility := u.Query().Get("local")
+ return setSyslogFormatter(l, appname, facility)
+ case "eventlog":
+ if setEventlogFormatter == nil {
+ return fmt.Errorf("system does not support eventlog")
+ }
+ name := u.Query().Get("name")
+ debugAsInfo := false
+ debugAsInfoRaw := u.Query().Get("debugAsInfo")
+ if parsedDebugAsInfo, err := strconv.ParseBool(debugAsInfoRaw); err == nil {
+ debugAsInfo = parsedDebugAsInfo
+ }
+ return setEventlogFormatter(l, name, debugAsInfo)
+ case "stdout":
+ l.entry.Logger.Out = os.Stdout
+ case "stderr":
+ l.entry.Logger.Out = os.Stderr
+ default:
+ return fmt.Errorf("unsupported logger %q", u.Opaque)
+ }
+ return nil
+}
+
// sourced adds a source field to the logger that contains
// the file name and line where the logging happened.
func (l logger) sourced() *logrus.Entry {
diff --git a/vendor/github.com/prometheus/common/log/log_test.go b/vendor/github.com/prometheus/common/log/log_test.go
index 953adb79c..f63b4417f 100644
--- a/vendor/github.com/prometheus/common/log/log_test.go
+++ b/vendor/github.com/prometheus/common/log/log_test.go
@@ -18,7 +18,7 @@ import (
"regexp"
"testing"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
func TestFileLineLogging(t *testing.T) {
@@ -32,7 +32,7 @@ func TestFileLineLogging(t *testing.T) {
Debug("This debug-level line should not show up in the output.")
Infof("This %s-level line should show up in the output.", "info")
- re := `^time=".*" level=info msg="This info-level line should show up in the output." source="log_test.go:33" \n$`
+ re := `^time=".*" level=info msg="This info-level line should show up in the output." source="log_test.go:33"\n$`
if !regexp.MustCompile(re).Match(buf.Bytes()) {
t.Fatalf("%q did not match expected regex %q", buf.String(), re)
}
diff --git a/vendor/github.com/prometheus/common/log/syslog_formatter.go b/vendor/github.com/prometheus/common/log/syslog_formatter.go
index 64f5fdac9..f882f2f84 100644
--- a/vendor/github.com/prometheus/common/log/syslog_formatter.go
+++ b/vendor/github.com/prometheus/common/log/syslog_formatter.go
@@ -20,13 +20,13 @@ import (
"log/syslog"
"os"
- "github.com/Sirupsen/logrus"
+ "github.com/sirupsen/logrus"
)
var _ logrus.Formatter = (*syslogger)(nil)
func init() {
- setSyslogFormatter = func(appname, local string) error {
+ setSyslogFormatter = func(l logger, appname, local string) error {
if appname == "" {
return fmt.Errorf("missing appname parameter")
}
@@ -34,13 +34,13 @@ func init() {
return fmt.Errorf("missing local parameter")
}
- fmter, err := newSyslogger(appname, local, origLogger.Formatter)
+ fmter, err := newSyslogger(appname, local, l.entry.Logger.Formatter)
if err != nil {
fmt.Fprintf(os.Stderr, "error creating syslog formatter: %v\n", err)
- origLogger.Errorf("can't connect logger to syslog: %v", err)
+ l.entry.Errorf("can't connect logger to syslog: %v", err)
return err
}
- origLogger.Formatter = fmter
+ l.entry.Logger.Formatter = fmter
return nil
}
}
diff --git a/vendor/github.com/prometheus/common/model/time.go b/vendor/github.com/prometheus/common/model/time.go
index 548968aeb..7e87f1ac6 100644
--- a/vendor/github.com/prometheus/common/model/time.go
+++ b/vendor/github.com/prometheus/common/model/time.go
@@ -163,9 +163,21 @@ func (t *Time) UnmarshalJSON(b []byte) error {
// This type should not propagate beyond the scope of input/output processing.
type Duration time.Duration
+// Set implements pflag/flag.Value
+func (d *Duration) Set(s string) error {
+ var err error
+ *d, err = ParseDuration(s)
+ return err
+}
+
+// Type implements pflag.Value
+func (d *Duration) Type() string {
+ return "duration"
+}
+
var durationRE = regexp.MustCompile("^([0-9]+)(y|w|d|h|m|s|ms)$")
-// StringToDuration parses a string into a time.Duration, assuming that a year
+// ParseDuration parses a string into a time.Duration, assuming that a year
// always has 365d, a week always has 7d, and a day always has 24h.
func ParseDuration(durationStr string) (Duration, error) {
matches := durationRE.FindStringSubmatch(durationStr)
diff --git a/vendor/github.com/prometheus/common/promlog/flag/flag.go b/vendor/github.com/prometheus/common/promlog/flag/flag.go
new file mode 100644
index 000000000..b9d361e43
--- /dev/null
+++ b/vendor/github.com/prometheus/common/promlog/flag/flag.go
@@ -0,0 +1,33 @@
+// Copyright 2017 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 flag
+
+import (
+ "github.com/prometheus/common/promlog"
+ kingpin "gopkg.in/alecthomas/kingpin.v2"
+)
+
+// LevelFlagName is the canonical flag name to configure the allowed log level
+// within Prometheus projects.
+const LevelFlagName = "log.level"
+
+// LevelFlagHelp is the help description for the log.level flag.
+const LevelFlagHelp = "Only log messages with the given severity or above. One of: [debug, info, warn, error]"
+
+// AddFlags adds the flags used by this package to the Kingpin application.
+// To use the default Kingpin application, call AddFlags(kingpin.CommandLine)
+func AddFlags(a *kingpin.Application, logLevel *promlog.AllowedLevel) {
+ a.Flag(LevelFlagName, LevelFlagHelp).
+ Default("info").SetValue(logLevel)
+}
diff --git a/vendor/github.com/prometheus/common/promlog/log.go b/vendor/github.com/prometheus/common/promlog/log.go
new file mode 100644
index 000000000..cf8307ad2
--- /dev/null
+++ b/vendor/github.com/prometheus/common/promlog/log.go
@@ -0,0 +1,63 @@
+// Copyright 2017 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 promlog defines standardised ways to initialize Go kit loggers
+// across Prometheus components.
+// It should typically only ever be imported by main packages.
+package promlog
+
+import (
+ "os"
+
+ "github.com/go-kit/kit/log"
+ "github.com/go-kit/kit/log/level"
+ "github.com/pkg/errors"
+)
+
+// AllowedLevel is a settable identifier for the minimum level a log entry
+// must be have.
+type AllowedLevel struct {
+ s string
+ o level.Option
+}
+
+func (l *AllowedLevel) String() string {
+ return l.s
+}
+
+// Set updates the value of the allowed level.
+func (l *AllowedLevel) Set(s string) error {
+ switch s {
+ case "debug":
+ l.o = level.AllowDebug()
+ case "info":
+ l.o = level.AllowInfo()
+ case "warn":
+ l.o = level.AllowWarn()
+ case "error":
+ l.o = level.AllowError()
+ default:
+ return errors.Errorf("unrecognized log level %q", s)
+ }
+ l.s = s
+ return nil
+}
+
+// New returns a new leveled oklog logger in the logfmt format. Each logged line will be annotated
+// with a timestamp. The output always goes to stderr.
+func New(al AllowedLevel) log.Logger {
+ l := log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr))
+ l = level.NewFilter(l, al.o)
+ l = log.With(l, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller)
+ return l
+}
diff --git a/vendor/github.com/prometheus/common/route/route.go b/vendor/github.com/prometheus/common/route/route.go
index 1e5638ed9..bb4688173 100644
--- a/vendor/github.com/prometheus/common/route/route.go
+++ b/vendor/github.com/prometheus/common/route/route.go
@@ -1,26 +1,12 @@
package route
import (
- "fmt"
"net/http"
- "sync"
"github.com/julienschmidt/httprouter"
"golang.org/x/net/context"
)
-var (
- mtx = sync.RWMutex{}
- ctxts = map[*http.Request]context.Context{}
-)
-
-// Context returns the context for the request.
-func Context(r *http.Request) context.Context {
- mtx.RLock()
- defer mtx.RUnlock()
- return ctxts[r]
-}
-
type param string
// Param returns param p for the context.
@@ -33,59 +19,35 @@ func WithParam(ctx context.Context, p, v string) context.Context {
return context.WithValue(ctx, param(p), v)
}
-// ContextFunc returns a new context for a request.
-type ContextFunc func(r *http.Request) (context.Context, error)
-
// Router wraps httprouter.Router and adds support for prefixed sub-routers
// and per-request context injections.
type Router struct {
rtr *httprouter.Router
prefix string
- ctxFn ContextFunc
}
// New returns a new Router.
-func New(ctxFn ContextFunc) *Router {
- if ctxFn == nil {
- ctxFn = func(r *http.Request) (context.Context, error) {
- return context.Background(), nil
- }
- }
+func New() *Router {
return &Router{
- rtr: httprouter.New(),
- ctxFn: ctxFn,
+ rtr: httprouter.New(),
}
}
// WithPrefix returns a router that prefixes all registered routes with prefix.
func (r *Router) WithPrefix(prefix string) *Router {
- return &Router{rtr: r.rtr, prefix: r.prefix + prefix, ctxFn: r.ctxFn}
+ return &Router{rtr: r.rtr, prefix: r.prefix + prefix}
}
// handle turns a HandlerFunc into an httprouter.Handle.
func (r *Router) handle(h http.HandlerFunc) httprouter.Handle {
return func(w http.ResponseWriter, req *http.Request, params httprouter.Params) {
- reqCtx, err := r.ctxFn(req)
- if err != nil {
- http.Error(w, fmt.Sprintf("Error creating request context: %v", err), http.StatusBadRequest)
- return
- }
- ctx, cancel := context.WithCancel(reqCtx)
+ ctx, cancel := context.WithCancel(req.Context())
defer cancel()
for _, p := range params {
ctx = context.WithValue(ctx, param(p.Key), p.Value)
}
-
- mtx.Lock()
- ctxts[req] = ctx
- mtx.Unlock()
-
- h(w, req)
-
- mtx.Lock()
- delete(ctxts, req)
- mtx.Unlock()
+ h(w, req.WithContext(ctx))
}
}
@@ -132,7 +94,7 @@ func FileServe(dir string) http.HandlerFunc {
fs := http.FileServer(http.Dir(dir))
return func(w http.ResponseWriter, r *http.Request) {
- r.URL.Path = Param(Context(r), "filepath")
+ r.URL.Path = Param(r.Context(), "filepath")
fs.ServeHTTP(w, r)
}
}
diff --git a/vendor/github.com/prometheus/common/route/route_test.go b/vendor/github.com/prometheus/common/route/route_test.go
index e7b1cba33..a9bb20996 100644
--- a/vendor/github.com/prometheus/common/route/route_test.go
+++ b/vendor/github.com/prometheus/common/route/route_test.go
@@ -1,16 +1,13 @@
package route
import (
- "fmt"
"net/http"
"net/http/httptest"
"testing"
-
- "golang.org/x/net/context"
)
func TestRedirect(t *testing.T) {
- router := New(nil).WithPrefix("/test/prefix")
+ router := New().WithPrefix("/test/prefix")
w := httptest.NewRecorder()
r, err := http.NewRequest("GET", "http://localhost:9090/foo", nil)
if err != nil {
@@ -29,47 +26,19 @@ func TestRedirect(t *testing.T) {
}
}
-func TestContextFunc(t *testing.T) {
- router := New(func(r *http.Request) (context.Context, error) {
- return context.WithValue(context.Background(), "testkey", "testvalue"), nil
- })
-
- router.Get("/test", func(w http.ResponseWriter, r *http.Request) {
- want := "testvalue"
- got := Context(r).Value("testkey")
+func TestContext(t *testing.T) {
+ router := New()
+ router.Get("/test/:foo/", func(w http.ResponseWriter, r *http.Request) {
+ want := "bar"
+ got := Param(r.Context(), "foo")
if want != got {
t.Fatalf("Unexpected context value: want %q, got %q", want, got)
}
})
- r, err := http.NewRequest("GET", "http://localhost:9090/test", nil)
+ r, err := http.NewRequest("GET", "http://localhost:9090/test/bar/", nil)
if err != nil {
t.Fatalf("Error building test request: %s", err)
}
router.ServeHTTP(nil, r)
}
-
-func TestContextFnError(t *testing.T) {
- router := New(func(r *http.Request) (context.Context, error) {
- return context.Background(), fmt.Errorf("test error")
- })
-
- router.Get("/test", func(w http.ResponseWriter, r *http.Request) {})
-
- r, err := http.NewRequest("GET", "http://localhost:9090/test", nil)
- if err != nil {
- t.Fatalf("Error building test request: %s", err)
- }
- w := httptest.NewRecorder()
- router.ServeHTTP(w, r)
-
- if w.Code != http.StatusBadRequest {
- t.Fatalf("Unexpected response status: got %q, want %q", w.Code, http.StatusBadRequest)
- }
-
- want := "Error creating request context: test error\n"
- got := w.Body.String()
- if want != got {
- t.Fatalf("Unexpected response body: got %q, want %q", got, want)
- }
-}
diff --git a/vendor/github.com/ugorji/go/codec/0doc.go b/vendor/github.com/ugorji/go/codec/0doc.go
index 209f9ebad..11a9753a2 100644
--- a/vendor/github.com/ugorji/go/codec/0doc.go
+++ b/vendor/github.com/ugorji/go/codec/0doc.go
@@ -2,8 +2,8 @@
// 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.
+High Performance, Feature-Rich Idiomatic Go 1.4+ codec/encoding library for
+binc, msgpack, cbor, json
Supported Serialization formats are:
@@ -11,21 +11,17 @@ Supported Serialization formats are:
- 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:
+ - 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
+This package will carefully use 'unsafe' for performance reasons in specific places.
+You can build without unsafe use by passing the safe or appengine tag
+i.e. 'go install -tags=safe ...'. Note that unsafe is only supported for the last 3
+go sdk versions e.g. current go release is go 1.9, so we support unsafe use only from
+go 1.7+ . This is because supporting unsafe requires knowledge of implementation details.
For detailed usage information, read the primer at http://ugorji.net/blog/go-codec-primer .
@@ -38,9 +34,9 @@ Rich Feature Set includes:
- Very High Performance.
Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X.
- Multiple conversions:
- Package coerces types where appropriate
+ Package coerces types where appropriate
e.g. decode an int in the stream into a float, etc.
- - Corner Cases:
+ - 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
@@ -56,7 +52,7 @@ Rich Feature Set includes:
- 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
+ - 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.
@@ -68,12 +64,12 @@ Rich Feature Set includes:
- 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 idiosyncrasies of codecs e.g.
- - For messagepack, configure how ambiguities in handling raw bytes are resolved
- - For messagepack, provide rpc server/client codec to support
+ - Handle unique idiosyncrasies 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
diff --git a/vendor/github.com/ugorji/go/codec/README.md b/vendor/github.com/ugorji/go/codec/README.md
index 91cb3a27b..cadc41b4c 100644
--- a/vendor/github.com/ugorji/go/codec/README.md
+++ b/vendor/github.com/ugorji/go/codec/README.md
@@ -15,17 +15,11 @@ 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 use it, you must pass the `unsafe` tag during install:
-
-```
-go install -tags=unsafe github.com/ugorji/go/codec
-```
+This package will carefully use 'unsafe' for performance reasons in specific places.
+You can build without unsafe use by passing the safe or appengine tag
+i.e. 'go install -tags=safe ...'. Note that unsafe is only supported for the last 3
+go sdk versions e.g. current go release is go 1.9, so we support unsafe use only from
+go 1.7+ . This is because supporting unsafe requires knowledge of implementation details.
Online documentation: http://godoc.org/github.com/ugorji/go/codec
Detailed Usage/How-to Primer: http://ugorji.net/blog/go-codec-primer
@@ -36,8 +30,13 @@ the standard library (ie json, xml, gob, etc).
Rich Feature Set includes:
- Simple but extremely powerful and feature-rich API
+ - Support for go1.4 and above, while selectively using newer APIs for later releases
+ - Good code coverage ( > 70% )
- Very High Performance.
Our extensive benchmarks show us outperforming Gob, Json, Bson, etc by 2-4X.
+ - Careful selected use of 'unsafe' for targeted performance gains.
+ 100% mode exists where 'unsafe' is not used at all.
+ - Lock-free (sans mutex) concurrency for scaling to 100's of cores
- Multiple conversions:
Package coerces types where appropriate
e.g. decode an int in the stream into a float, etc.
@@ -146,3 +145,22 @@ Typical usage model:
//OR rpcCodec := codec.MsgpackSpecRpc.ClientCodec(conn, h)
client := rpc.NewClientWithCodec(rpcCodec)
+## Running Tests
+
+To run tests, use the following:
+
+ go test
+
+To run the full suite of tests, use the following:
+
+ go test -tags alltests -run Suite
+
+You can run the tag 'safe' to run tests or build in safe mode. e.g.
+
+ go test -tags safe -run Json
+ go test -tags "alltests safe" -run Suite
+
+## Running Benchmarks
+
+Please see http://github.com/ugorji/go-codec-bench .
+
diff --git a/vendor/github.com/ugorji/go/codec/binc.go b/vendor/github.com/ugorji/go/codec/binc.go
index 618c51505..a5b114345 100644
--- a/vendor/github.com/ugorji/go/codec/binc.go
+++ b/vendor/github.com/ugorji/go/codec/binc.go
@@ -728,11 +728,12 @@ func (d *bincDecDriver) DecodeString() (s string) {
return
}
-func (d *bincDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
- if isstring {
- bsOut, _ = d.decStringAndBytes(bs, false, zerocopy)
- return
- }
+func (d *bincDecDriver) DecodeStringAsBytes() (s []byte) {
+ s, _ = d.decStringAndBytes(d.b[:], false, true)
+ return
+}
+
+func (d *bincDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) {
if !d.bdRead {
d.readNextBd()
}
@@ -789,7 +790,7 @@ func (d *bincDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs []b
}
xbs = d.r.readx(l)
} else if d.vd == bincVdByteArray {
- xbs = d.DecodeBytes(nil, false, true)
+ xbs = d.DecodeBytes(nil, true)
} else {
d.d.errorf("Invalid d.vd for extensions (Expecting extensions or byte array). Got: 0x%x", d.vd)
return
@@ -858,7 +859,7 @@ func (d *bincDecDriver) DecodeNaked() {
n.s = d.DecodeString()
case bincVdByteArray:
n.v = valueTypeBytes
- n.l = d.DecodeBytes(nil, false, false)
+ n.l = d.DecodeBytes(nil, false)
case bincVdTimestamp:
n.v = valueTypeTimestamp
tt, err := decodeTime(d.r.readx(int(d.vs)))
diff --git a/vendor/github.com/ugorji/go/codec/cbor.go b/vendor/github.com/ugorji/go/codec/cbor.go
index 4c72caffb..054dbd2f1 100644
--- a/vendor/github.com/ugorji/go/codec/cbor.go
+++ b/vendor/github.com/ugorji/go/codec/cbor.go
@@ -407,7 +407,7 @@ func (d *cborDecDriver) decAppendIndefiniteBytes(bs []byte) []byte {
return bs
}
-func (d *cborDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
+func (d *cborDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) {
if !d.bdRead {
d.readNextBd()
}
@@ -434,7 +434,11 @@ func (d *cborDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut [
}
func (d *cborDecDriver) DecodeString() (s string) {
- return string(d.DecodeBytes(d.b[:], true, true))
+ return string(d.DecodeBytes(d.b[:], true))
+}
+
+func (d *cborDecDriver) DecodeStringAsBytes() (s []byte) {
+ return d.DecodeBytes(d.b[:], true)
}
func (d *cborDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxtag uint64) {
@@ -485,7 +489,7 @@ func (d *cborDecDriver) DecodeNaked() {
n.f = d.DecodeFloat(false)
case cborBdIndefiniteBytes:
n.v = valueTypeBytes
- n.l = d.DecodeBytes(nil, false, false)
+ n.l = d.DecodeBytes(nil, false)
case cborBdIndefiniteString:
n.v = valueTypeString
n.s = d.DecodeString()
@@ -510,7 +514,7 @@ func (d *cborDecDriver) DecodeNaked() {
n.i = d.DecodeInt(64)
case d.bd >= cborBaseBytes && d.bd < cborBaseString:
n.v = valueTypeBytes
- n.l = d.DecodeBytes(nil, false, false)
+ n.l = d.DecodeBytes(nil, false)
case d.bd >= cborBaseString && d.bd < cborBaseArray:
n.v = valueTypeString
n.s = d.DecodeString()
diff --git a/vendor/github.com/ugorji/go/codec/codec_test.go b/vendor/github.com/ugorji/go/codec/codec_test.go
index b05d19463..eb8830ba1 100644
--- a/vendor/github.com/ugorji/go/codec/codec_test.go
+++ b/vendor/github.com/ugorji/go/codec/codec_test.go
@@ -134,6 +134,14 @@ func (x *TestABC2) UnmarshalText(data []byte) (err error) {
// _, err = fmt.Sscanf(string(data), "%s %s %s", &x.A, &x.B, &x.C)
}
+type TestSimplish struct {
+ Ii int
+ Ss string
+ Ar [2]*TestSimplish
+ Sl []*TestSimplish
+ Mm map[string]*TestSimplish
+}
+
type TestRpcABC struct {
A, B, C string
}
@@ -339,6 +347,8 @@ func testInit() {
testJsonH.Indent = int8(testJsonIndent)
testJsonH.HTMLCharsAsIs = testJsonHTMLCharsAsIs
+ testJsonH.PreferFloat = testJsonPreferFloat
+
testMsgpackH.RawToString = true
// testMsgpackH.AddExt(byteSliceTyp, 0, testMsgpackH.BinaryEncodeExt, testMsgpackH.BinaryDecodeExt)
@@ -348,7 +358,20 @@ func testInit() {
// use different flavors of XXXExt calls, including deprecated ones.
// NOTE:
// DO NOT set extensions for JsonH, so we can test json(M|Unm)arshal support.
+ var (
+ timeExtEncFn = func(rv reflect.Value) (bs []byte, err error) {
+ defer panicToErr(&err)
+ bs = timeExt{}.WriteExt(rv.Interface())
+ return
+ }
+ timeExtDecFn = func(rv reflect.Value, bs []byte) (err error) {
+ defer panicToErr(&err)
+ timeExt{}.ReadExt(rv.Interface(), bs)
+ return
+ }
+ )
testSimpleH.AddExt(timeTyp, 1, timeExtEncFn, timeExtDecFn)
+
testMsgpackH.SetBytesExt(timeTyp, 1, timeExt{})
testCborH.SetInterfaceExt(timeTyp, 1, &testUnixNanoTimeExt{})
// testJsonH.SetInterfaceExt(timeTyp, 1, &testUnixNanoTimeExt{})
@@ -407,9 +430,22 @@ func testInit() {
},
[]interface{}{true, false},
},
- "int32": int32(32323232),
- "bool": true,
- "LONG STRING": "123456789012345678901234567890123456789012345678901234567890",
+ "int32": int32(32323232),
+ "bool": true,
+ "LONG STRING": `
+1234567890 1234567890
+1234567890 1234567890
+1234567890 1234567890
+ABCDEDFGHIJKLMNOPQRSTUVWXYZ
+abcdedfghijklmnopqrstuvwxyz
+ABCDEDFGHIJKLMNOPQRSTUVWXYZ
+abcdedfghijklmnopqrstuvwxyz
+"ABCDEDFGHIJKLMNOPQRSTUVWXYZ"
+' a tab '
+\a\b\c\d\e
+\b\f\n\r\t all literally
+ugorji
+`,
"SHORT STRING": "1234567890",
},
map[interface{}]interface{}{
@@ -489,7 +525,7 @@ func testMarshal(v interface{}, h Handle) (bs []byte, err error) {
func testMarshalErr(v interface{}, h Handle, t *testing.T, name string) (bs []byte, err error) {
if bs, err = testMarshal(v, h); err != nil {
logT(t, "Error encoding %s: %v, Err: %v", name, v, err)
- t.FailNow()
+ failT(t)
}
return
}
@@ -497,7 +533,17 @@ func testMarshalErr(v interface{}, h Handle, t *testing.T, name string) (bs []by
func testUnmarshalErr(v interface{}, data []byte, h Handle, t *testing.T, name string) (err error) {
if err = testUnmarshal(v, data, h); err != nil {
logT(t, "Error Decoding into %s: %v, Err: %v", name, v, err)
- t.FailNow()
+ failT(t)
+ }
+ return
+}
+
+func testDeepEqualErr(v1, v2 interface{}, t *testing.T, name string) (err error) {
+ if err = deepEqual(v1, v2); err == nil {
+ logT(t, "%s: values equal", name)
+ } else {
+ logT(t, "%s: values not equal: %v. 1: %v, 2: %v", name, err, v1, v2)
+ failT(t)
}
return
}
@@ -621,13 +667,13 @@ func testCodecMiscOne(t *testing.T, h Handle) {
// var i *int32
// if err = testUnmarshal(b, i, nil); err == nil {
// logT(t, "------- Expecting error because we cannot unmarshal to int32 nil ptr")
- // t.FailNow()
+ // failT(t)
// }
var i2 int32 = 0
err = testUnmarshalErr(&i2, b, h, t, "int32-ptr")
if i2 != int32(32) {
logT(t, "------- didn't unmarshal to 32: Received: %d", i2)
- t.FailNow()
+ failT(t)
}
// func TestMsgpackDecodePtr(t *testing.T) {
@@ -635,7 +681,7 @@ func testCodecMiscOne(t *testing.T, h Handle) {
b, err = testMarshalErr(ts, h, t, "pointer-to-struct")
if len(b) < 40 {
logT(t, "------- Size must be > 40. Size: %d", len(b))
- t.FailNow()
+ failT(t)
}
if h.isBinary() {
logT(t, "------- b: %v", b)
@@ -646,7 +692,7 @@ func testCodecMiscOne(t *testing.T, h Handle) {
err = testUnmarshalErr(ts2, b, h, t, "pointer-to-struct")
if ts2.I64 != math.MaxInt64*2/3 {
logT(t, "------- Unmarshal wrong. Expect I64 = 64. Got: %v", ts2.I64)
- t.FailNow()
+ failT(t)
}
// func TestMsgpackIntfDecode(t *testing.T) {
@@ -660,7 +706,7 @@ func testCodecMiscOne(t *testing.T, h Handle) {
if m2["A"] != 2 || m2["B"] != 3 {
logT(t, "m2 not as expected: expecting: %v, got: %v", m, m2)
- t.FailNow()
+ failT(t)
}
// log("m: %v, m2: %v, p: %v, p2: %v", m, m2, p, p2)
checkEqualT(t, p, p2, "p=p2")
@@ -669,13 +715,13 @@ func testCodecMiscOne(t *testing.T, h Handle) {
logT(t, "p and p2 match")
} else {
logT(t, "Not Equal: %v. p: %v, p2: %v", err, p, p2)
- t.FailNow()
+ failT(t)
}
if err = deepEqual(m, m2); err == nil {
logT(t, "m and m2 match")
} else {
logT(t, "Not Equal: %v. m: %v, m2: %v", err, m, m2)
- t.FailNow()
+ failT(t)
}
// func TestMsgpackDecodeStructSubset(t *testing.T) {
@@ -705,7 +751,7 @@ func testCodecMiscOne(t *testing.T, h Handle) {
bs, err = testMarshalErr(tarr1, h, t, "tarr1")
if err != nil {
logT(t, "Error marshalling: %v", err)
- t.FailNow()
+ failT(t)
}
if _, ok := h.(*JsonHandle); ok {
logT(t, "Marshal as: %s", bs)
@@ -815,7 +861,7 @@ func testCodecRpcOne(t *testing.T, rr Rpc, h Handle, doRequest bool, exitSleepMs
// rpc needs EOF, which is sent via a panic, and so must be recovered.
if !recoverPanicToErr {
logT(t, "EXPECTED. set recoverPanicToErr=true, since rpc needs EOF")
- t.FailNow()
+ failT(t)
}
srv := rpc.NewServer()
srv.Register(testRpcInt)
@@ -958,7 +1004,7 @@ func doTestMapEncodeForCanonical(t *testing.T, name string, h Handle) {
e2.MustEncode(v2)
if !bytes.Equal(b1, b2) {
logT(t, "Unequal bytes: %v VS %v", b1, b2)
- t.FailNow()
+ failT(t)
}
}
@@ -1012,13 +1058,13 @@ func doTestEncCircularRef(t *testing.T, name string, h Handle) {
err = NewEncoderBytes(&bs, h).Encode(&t3)
if err == nil {
logT(t, "expecting error due to circular reference. found none")
- t.FailNow()
+ failT(t)
}
if x := err.Error(); strings.Contains(x, "circular") || strings.Contains(x, "cyclic") {
logT(t, "error detected as expected: %v", x)
} else {
logT(t, "error detected was not as expected: %v", x)
- t.FailNow()
+ failT(t)
}
}
@@ -1046,7 +1092,7 @@ func doTestAnonCycle(t *testing.T, name string, h Handle) {
// just check that you can get typeInfo for T1
rt := reflect.TypeOf((*TestAnonCycleT1)(nil)).Elem()
- rtid := reflect.ValueOf(rt).Pointer()
+ rtid := rt2id(rt)
pti := h.getBasicHandle().getTypeInfo(rtid, rt)
logT(t, "pti: %v", pti)
}
@@ -1153,7 +1199,7 @@ func doTestRawValue(t *testing.T, name string, h Handle) {
// logT(t, "Encoded %v, decoded %v", i, i2)
if i != i2 {
logT(t, "Error: encoded %v, decoded %v", i, i2)
- t.FailNow()
+ failT(t)
}
}
@@ -1166,7 +1212,7 @@ func doTestPythonGenStreams(t *testing.T, name string, h Handle) {
tmpdir, err := ioutil.TempDir("", "golang-"+name+"-test")
if err != nil {
logT(t, "-------- Unable to create temp directory\n")
- t.FailNow()
+ failT(t)
}
defer os.RemoveAll(tmpdir)
logT(t, "tmpdir: %v", tmpdir)
@@ -1177,7 +1223,7 @@ func doTestPythonGenStreams(t *testing.T, name string, h Handle) {
if cmdout, err = cmd.CombinedOutput(); err != nil {
logT(t, "-------- Error running test.py testdata. Err: %v", err)
logT(t, " %v", string(cmdout))
- t.FailNow()
+ failT(t)
}
bh := h.getBasicHandle()
@@ -1298,12 +1344,96 @@ func doTestMsgpackRpcSpecPythonClientToGoSvc(t *testing.T) {
if cmdout, err = cmd.CombinedOutput(); err != nil {
logT(t, "-------- Error running test.py rpc-client-go-service. Err: %v", err)
logT(t, " %v", string(cmdout))
- t.FailNow()
+ failT(t)
}
checkEqualT(t, string(cmdout),
fmt.Sprintf("%#v\n%#v\n", []string{"A1", "B2", "C3"}, TestRpcABC{"Aa", "Bb", "Cc"}), "cmdout=")
}
+func testRandomFillRV(v reflect.Value) {
+ fneg := func() int64 {
+ i := rand.Intn(1)
+ if i == 1 {
+ return 1
+ }
+ return -1
+ }
+
+ switch v.Kind() {
+ case reflect.Invalid:
+ case reflect.Ptr:
+ if v.IsNil() {
+ v.Set(reflect.New(v.Type().Elem()))
+ }
+ testRandomFillRV(v.Elem())
+ case reflect.Interface:
+ if v.IsNil() {
+ v.Set(reflect.ValueOf("nothing"))
+ } else {
+ testRandomFillRV(v.Elem())
+ }
+ case reflect.Struct:
+ for i, n := 0, v.NumField(); i < n; i++ {
+ testRandomFillRV(v.Field(i))
+ }
+ case reflect.Slice:
+ if v.IsNil() {
+ v.Set(reflect.MakeSlice(v.Type(), 4, 4))
+ }
+ fallthrough
+ case reflect.Array:
+ for i, n := 0, v.Len(); i < n; i++ {
+ testRandomFillRV(v.Index(i))
+ }
+ case reflect.Map:
+ if v.IsNil() {
+ v.Set(reflect.MakeMap(v.Type()))
+ }
+ if v.Len() == 0 {
+ kt, vt := v.Type().Key(), v.Type().Elem()
+ for i := 0; i < 4; i++ {
+ k0 := reflect.New(kt).Elem()
+ v0 := reflect.New(vt).Elem()
+ testRandomFillRV(k0)
+ testRandomFillRV(v0)
+ v.SetMapIndex(k0, v0)
+ }
+ } else {
+ for _, k := range v.MapKeys() {
+ testRandomFillRV(v.MapIndex(k))
+ }
+ }
+ case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
+ v.SetInt(fneg() * rand.Int63n(127))
+ case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr:
+ v.SetUint(uint64(rand.Int63n(255)))
+ case reflect.Bool:
+ if fneg() == 1 {
+ v.SetBool(true)
+ } else {
+ v.SetBool(false)
+ }
+ case reflect.Float32, reflect.Float64:
+ v.SetFloat(float64(fneg()) * float64(rand.Float32()))
+ case reflect.String:
+ v.SetString(strings.Repeat(strconv.FormatInt(rand.Int63n(99), 10), rand.Intn(8)))
+ default:
+ panic(fmt.Errorf("testRandomFillRV: unsupported type: %v", v.Kind()))
+ }
+}
+
+func testMammoth(t *testing.T, name string, h Handle) {
+ testOnce.Do(testInitAll)
+ var m, m2 TestMammoth
+ testRandomFillRV(reflect.ValueOf(&m).Elem())
+ b, _ := testMarshalErr(&m, h, t, "mammoth-"+name)
+ testUnmarshalErr(&m2, b, h, t, "mammoth-"+name)
+ // fmt.Printf("m2: %v", &m2)
+ testDeepEqualErr(&m, &m2, t, "mammoth-"+name)
+}
+
+// -----------------
+
func TestBincCodecsTable(t *testing.T) {
testCodecTableOne(t, testBincH)
}
@@ -1320,6 +1450,10 @@ func TestBincStdEncIntf(t *testing.T) {
doTestStdEncIntf(t, "binc", testBincH)
}
+func TestBincMammoth(t *testing.T) {
+ testMammoth(t, "binc", testBincH)
+}
+
func TestSimpleCodecsTable(t *testing.T) {
testCodecTableOne(t, testSimpleH)
}
@@ -1336,6 +1470,10 @@ func TestSimpleStdEncIntf(t *testing.T) {
doTestStdEncIntf(t, "simple", testSimpleH)
}
+func TestSimpleMammoth(t *testing.T) {
+ testMammoth(t, "simple", testSimpleH)
+}
+
func TestMsgpackCodecsTable(t *testing.T) {
testCodecTableOne(t, testMsgpackH)
}
@@ -1352,6 +1490,10 @@ func TestMsgpackStdEncIntf(t *testing.T) {
doTestStdEncIntf(t, "msgpack", testMsgpackH)
}
+func TestMsgpackMammoth(t *testing.T) {
+ testMammoth(t, "msgpack", testMsgpackH)
+}
+
func TestCborCodecsTable(t *testing.T) {
testCodecTableOne(t, testCborH)
}
@@ -1376,6 +1518,10 @@ func TestCborStdEncIntf(t *testing.T) {
doTestStdEncIntf(t, "cbor", testCborH)
}
+func TestCborMammoth(t *testing.T) {
+ testMammoth(t, "cbor", testCborH)
+}
+
func TestJsonCodecsTable(t *testing.T) {
testCodecTableOne(t, testJsonH)
}
@@ -1396,6 +1542,10 @@ func TestJsonStdEncIntf(t *testing.T) {
doTestStdEncIntf(t, "json", testJsonH)
}
+func TestJsonMammoth(t *testing.T) {
+ testMammoth(t, "json", testJsonH)
+}
+
// ----- Raw ---------
func TestJsonRaw(t *testing.T) {
doTestRawValue(t, "json", testJsonH)
@@ -1485,6 +1635,119 @@ func TestJsonDecodeNonStringScalarInStringContext(t *testing.T) {
}
}
+func TestJsonEncodeIndent(t *testing.T) {
+ v := TestSimplish{
+ Ii: -794,
+ Ss: `A Man is
+after the new line
+ after new line and tab
+`,
+ }
+ v2 := v
+ v.Mm = make(map[string]*TestSimplish)
+ for i := 0; i < len(v.Ar); i++ {
+ v3 := v2
+ v3.Ii += (i * 4)
+ v3.Ss = fmt.Sprintf("%d - %s", v3.Ii, v3.Ss)
+ if i%2 == 0 {
+ v.Ar[i] = &v3
+ }
+ // v3 = v2
+ v.Sl = append(v.Sl, &v3)
+ v.Mm[strconv.FormatInt(int64(i), 10)] = &v3
+ }
+ oldcan := testJsonH.Canonical
+ oldIndent := testJsonH.Indent
+ oldS2A := testJsonH.StructToArray
+ defer func() {
+ testJsonH.Canonical = oldcan
+ testJsonH.Indent = oldIndent
+ testJsonH.StructToArray = oldS2A
+ }()
+ testJsonH.Canonical = true
+ testJsonH.Indent = -1
+ testJsonH.StructToArray = false
+ var bs []byte
+ NewEncoderBytes(&bs, testJsonH).MustEncode(&v)
+ txt1Tab := string(bs)
+ bs = nil
+ testJsonH.Indent = 120
+ NewEncoderBytes(&bs, testJsonH).MustEncode(&v)
+ txtSpaces := string(bs)
+ // fmt.Printf("\n-----------\n%s\n------------\n%s\n-------------\n", txt1Tab, txtSpaces)
+
+ goldenResultTab := `{
+ "Ar": [
+ {
+ "Ar": [
+ null,
+ null
+ ],
+ "Ii": -794,
+ "Mm": null,
+ "Sl": null,
+ "Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
+ },
+ null
+ ],
+ "Ii": -794,
+ "Mm": {
+ "0": {
+ "Ar": [
+ null,
+ null
+ ],
+ "Ii": -794,
+ "Mm": null,
+ "Sl": null,
+ "Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
+ },
+ "1": {
+ "Ar": [
+ null,
+ null
+ ],
+ "Ii": -790,
+ "Mm": null,
+ "Sl": null,
+ "Ss": "-790 - A Man is\nafter the new line\n\tafter new line and tab\n"
+ }
+ },
+ "Sl": [
+ {
+ "Ar": [
+ null,
+ null
+ ],
+ "Ii": -794,
+ "Mm": null,
+ "Sl": null,
+ "Ss": "-794 - A Man is\nafter the new line\n\tafter new line and tab\n"
+ },
+ {
+ "Ar": [
+ null,
+ null
+ ],
+ "Ii": -790,
+ "Mm": null,
+ "Sl": null,
+ "Ss": "-790 - A Man is\nafter the new line\n\tafter new line and tab\n"
+ }
+ ],
+ "Ss": "A Man is\nafter the new line\n\tafter new line and tab\n"
+}`
+
+ if txt1Tab != goldenResultTab {
+ logT(t, "decoded indented with tabs != expected: \nexpected: %s\nencoded: %s", goldenResultTab, txt1Tab)
+ failT(t)
+ }
+ if txtSpaces != strings.Replace(goldenResultTab, "\t", strings.Repeat(" ", 120), -1) {
+ logT(t, "decoded indented with spaces != expected: \nexpected: %s\nencoded: %s", goldenResultTab, txtSpaces)
+ failT(t)
+ }
+}
+
// TODO:
// Add Tests for:
// - decoding empty list/map in stream into a nil slice/map
@@ -1499,7 +1762,6 @@ func TestJsonDecodeNonStringScalarInStringContext(t *testing.T) {
// - struct tags:
// on anonymous fields, _struct (all fields), etc
// - codecgen of struct containing channels.
-// - bad input with large array length prefix
//
-// Cleanup tests:
-// - The are brittle in their handling of validation and skipping
+// Add negative tests for failure conditions:
+// - bad input with large array length prefix
diff --git a/vendor/github.com/ugorji/go/codec/codecgen/gen.go b/vendor/github.com/ugorji/go/codec/codecgen/gen.go
index 346d780ee..dbde8c3a4 100644
--- a/vendor/github.com/ugorji/go/codec/codecgen/gen.go
+++ b/vendor/github.com/ugorji/go/codec/codecgen/gen.go
@@ -62,7 +62,7 @@ func CodecGenTempWrite{{ .RandString }}() {
var t{{ $index }} {{ . }}
typs = append(typs, reflect.TypeOf(t{{ $index }}))
{{ end }}
- {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ .UseUnsafe }}, {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), typs...)
+ {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}Gen(&out, "{{ .BuildTag }}", "{{ .PackageName }}", "{{ .RandString }}", {{ if not .CodecPkgFiles }}{{ .CodecPkgName }}.{{ end }}NewTypeInfos(strings.Split("{{ .StructTags }}", ",")), typs...)
bout, err := format.Source(out.Bytes())
if err != nil {
fout.Write(out.Bytes())
@@ -82,7 +82,7 @@ func CodecGenTempWrite{{ .RandString }}() {
// Tool then executes: "go run __frun__" which creates fout.
// fout contains Codec(En|De)codeSelf implementations for every type T.
//
-func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool, goRunTag string,
+func Generate(outfile, buildTag, codecPkgPath string, uid int64, goRunTag string,
st string, regexName *regexp.Regexp, notRegexName *regexp.Regexp, deleteTempFile bool, infiles ...string) (err error) {
// For each file, grab AST, find each type, and write a call to it.
if len(infiles) == 0 {
@@ -121,14 +121,12 @@ func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool,
StructTags string
Types []string
CodecPkgFiles bool
- UseUnsafe bool
}
tv := tmplT{
CodecPkgName: genCodecPkg,
OutFile: outfile,
CodecImportPath: codecPkgPath,
BuildTag: buildTag,
- UseUnsafe: useUnsafe,
RandString: strconv.FormatInt(uid, 10),
StructTags: st,
}
@@ -256,7 +254,7 @@ func Generate(outfile, buildTag, codecPkgPath string, uid int64, useUnsafe bool,
os.Remove(outfile)
// execute go run frun
- cmd := exec.Command("go", "run", "-tags="+goRunTag, frunMainName) //, frunPkg.Name())
+ cmd := exec.Command("go", "run", "-tags", "codecgen.exec safe "+goRunTag, frunMainName) //, frunPkg.Name())
var buf bytes.Buffer
cmd.Stdout = &buf
cmd.Stderr = &buf
@@ -313,10 +311,10 @@ func main() {
rt := flag.String("rt", "", "tags for go run")
st := flag.String("st", "codec,json", "struct tag keys to introspect")
x := flag.Bool("x", false, "keep temp file")
- u := flag.Bool("u", false, "Use unsafe, e.g. to avoid unnecessary allocation on []byte->string")
+ _ = flag.Bool("u", false, "*IGNORED - kept for backwards compatibility*: Allow unsafe use")
d := flag.Int64("d", 0, "random identifier for use in generated code")
flag.Parse()
- if err := Generate(*o, *t, *c, *d, *u, *rt, *st,
+ if err := Generate(*o, *t, *c, *d, *rt, *st,
regexp.MustCompile(*r), regexp.MustCompile(*nr), !*x, flag.Args()...); err != nil {
fmt.Fprintf(os.Stderr, "codecgen error: %v\n", err)
os.Exit(1)
diff --git a/vendor/github.com/ugorji/go/codec/decode.go b/vendor/github.com/ugorji/go/codec/decode.go
index 2563668ba..2cb0b4e3a 100644
--- a/vendor/github.com/ugorji/go/codec/decode.go
+++ b/vendor/github.com/ugorji/go/codec/decode.go
@@ -38,6 +38,13 @@ type decReader interface {
numread() int // number of bytes read
track()
stopTrack() []byte
+
+ // skip will skip any byte that matches, and return the first non-matching byte
+ skip(accept *[256]bool) (token byte)
+ // readTo will read any byte that matches, stopping once no-longer matching.
+ readTo(in []byte, accept *[256]bool) (out []byte)
+ // readUntil will read, only stopping once it matches the 'stop' byte.
+ readUntil(in []byte, stop byte) (out []byte)
}
type decReaderByteScanner interface {
@@ -48,6 +55,10 @@ type decReaderByteScanner interface {
type decDriver interface {
// this will check if the next token is a break.
CheckBreak() bool
+ // Note: TryDecodeAsNil should be careful not to share any temporary []byte with
+ // the rest of the decDriver. This is because sometimes, we optimize by holding onto
+ // a transient []byte, and ensuring the only other call we make to the decDriver
+ // during that time is maybe a TryDecodeAsNil() call.
TryDecodeAsNil() bool
// vt is one of: Bytes, String, Nil, Slice or Map. Return unSet if not known.
ContainerType() (vt valueType)
@@ -76,10 +87,12 @@ type decDriver interface {
// return a pre-stored string value, meaning that it can bypass
// the cost of []byte->string conversion.
DecodeString() (s string)
+ DecodeStringAsBytes() (v []byte)
// 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)
+ DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte)
+ // 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)
@@ -312,6 +325,50 @@ func (z *ioDecReader) readn1eof() (b uint8, eof bool) {
return
}
+func (z *ioDecReader) skip(accept *[256]bool) (token byte) {
+ for {
+ var eof bool
+ token, eof = z.readn1eof()
+ if eof {
+ return
+ }
+ if accept[token] {
+ continue
+ }
+ return
+ }
+}
+
+func (z *ioDecReader) readTo(in []byte, accept *[256]bool) (out []byte) {
+ out = in
+ for {
+ token, eof := z.readn1eof()
+ if eof {
+ return
+ }
+ if accept[token] {
+ out = append(out, token)
+ } else {
+ z.unreadn1()
+ return
+ }
+ }
+}
+
+func (z *ioDecReader) readUntil(in []byte, stop byte) (out []byte) {
+ out = in
+ for {
+ token, eof := z.readn1eof()
+ if eof {
+ panic(io.EOF)
+ }
+ out = append(out, token)
+ if token == stop {
+ return
+ }
+ }
+}
+
func (z *ioDecReader) unreadn1() {
err := z.br.UnreadByte()
if err != nil {
@@ -388,6 +445,10 @@ func (z *bytesDecReader) readx(n int) (bs []byte) {
return
}
+func (z *bytesDecReader) readb(bs []byte) {
+ copy(bs, z.readx(len(bs)))
+}
+
func (z *bytesDecReader) readn1() (v uint8) {
if z.a == 0 {
panic(io.EOF)
@@ -409,8 +470,62 @@ func (z *bytesDecReader) readn1eof() (v uint8, eof bool) {
return
}
-func (z *bytesDecReader) readb(bs []byte) {
- copy(bs, z.readx(len(bs)))
+func (z *bytesDecReader) skip(accept *[256]bool) (token byte) {
+ if z.a == 0 {
+ return
+ }
+ for i := z.c; i < len(z.b); i++ {
+ // fmt.Printf(">>>> skipWhitespace: checking: index: %d, %s\n", i, string(z.b[i]))
+ if accept[z.b[i]] {
+ continue
+ }
+ // fmt.Printf(">>>> skipWhitespace: returning\n")
+ token = z.b[i]
+ i++
+ z.a -= (i - z.c)
+ z.c = i
+ return
+ }
+ z.a, z.c = 0, len(z.b)
+ return
+}
+
+func (z *bytesDecReader) readTo(in []byte, accept *[256]bool) (out []byte) {
+ if z.a == 0 {
+ return
+ }
+ for i := z.c; i < len(z.b); i++ {
+ // fmt.Printf(">>>> readbUntilAny: checking: index: %d, %s\n", i, string(z.b[i]))
+ if !accept[z.b[i]] {
+ out = z.b[z.c:i]
+ // fmt.Printf(">>>> readbUntilAny: returning: %s\n", z.b[z.c:i])
+ z.a -= (i - z.c)
+ z.c = i
+ return
+ }
+ }
+ out = z.b[z.c:]
+ z.a, z.c = 0, len(z.b)
+ return
+}
+
+func (z *bytesDecReader) readUntil(in []byte, stop byte) (out []byte) {
+ if z.a == 0 {
+ panic(io.EOF)
+ }
+ for i := z.c; i < len(z.b); i++ {
+ // fmt.Printf(">>>> readbUntilDblQUote: checking: index: %d, %s\n", i, string(z.b[i]))
+ if z.b[i] == stop {
+ // fmt.Printf(">>>> readbUntilDblQUote: returning\n")
+ i++
+ out = z.b[z.c:i]
+ z.a -= (i - z.c)
+ z.c = i
+ return
+ }
+ }
+ z.a, z.c = 0, len(z.b)
+ panic(io.EOF)
}
func (z *bytesDecReader) track() {
@@ -439,26 +554,22 @@ type decFn struct {
}
func (f *decFnInfo) builtin(rv reflect.Value) {
- f.d.d.DecodeBuiltin(f.ti.rtid, rv.Addr().Interface())
+ f.d.d.DecodeBuiltin(f.ti.rtid, rv2i(rv.Addr()))
}
func (f *decFnInfo) rawExt(rv reflect.Value) {
- f.d.d.DecodeExt(rv.Addr().Interface(), 0, nil)
-}
-
-func (f *decFnInfo) raw(rv reflect.Value) {
- rv.SetBytes(f.d.raw())
+ f.d.d.DecodeExt(rv2i(rv.Addr()), 0, nil)
}
func (f *decFnInfo) ext(rv reflect.Value) {
- f.d.d.DecodeExt(rv.Addr().Interface(), f.xfTag, f.xfFn)
+ f.d.d.DecodeExt(rv2i(rv.Addr()), f.xfTag, f.xfFn)
}
func (f *decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8) (v interface{}) {
if indir == -1 {
- v = rv.Addr().Interface()
+ v = rv2i(rv.Addr())
} else if indir == 0 {
- v = rv.Interface()
+ v = rv2i(rv)
} else {
for j := int8(0); j < indir; j++ {
if rv.IsNil() {
@@ -466,7 +577,7 @@ func (f *decFnInfo) getValueForUnmarshalInterface(rv reflect.Value, indir int8)
}
rv = rv.Elem()
}
- v = rv.Interface()
+ v = rv2i(rv)
}
return
}
@@ -477,7 +588,7 @@ func (f *decFnInfo) selferUnmarshal(rv reflect.Value) {
func (f *decFnInfo) binaryUnmarshal(rv reflect.Value) {
bm := f.getValueForUnmarshalInterface(rv, f.ti.bunmIndir).(encoding.BinaryUnmarshaler)
- xbs := f.d.d.DecodeBytes(nil, false, true)
+ xbs := f.d.d.DecodeBytes(nil, true)
if fnerr := bm.UnmarshalBinary(xbs); fnerr != nil {
panic(fnerr)
}
@@ -485,7 +596,7 @@ func (f *decFnInfo) binaryUnmarshal(rv reflect.Value) {
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))
+ fnerr := tm.UnmarshalText(f.d.d.DecodeStringAsBytes())
if fnerr != nil {
panic(fnerr)
}
@@ -505,66 +616,6 @@ 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() {
@@ -602,14 +653,14 @@ func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) {
n.ms = append(n.ms, nil)
var v2 interface{} = &n.ms[l]
d.decode(v2)
- rvn = reflect.ValueOf(v2).Elem()
+ rvn = d.np.get(v2)
n.ms = n.ms[:l]
} else if d.mtid == mapStrIntfTypId { // for json performance
l := len(n.ns)
n.ns = append(n.ns, nil)
var v2 interface{} = &n.ns[l]
d.decode(v2)
- rvn = reflect.ValueOf(v2).Elem()
+ rvn = d.np.get(v2)
n.ns = n.ns[:l]
} else {
rvn = reflect.New(d.h.MapType).Elem()
@@ -623,9 +674,12 @@ func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) {
var v2 interface{} = &n.ss[l]
d.decode(v2)
n.ss = n.ss[:l]
- rvn = reflect.ValueOf(v2).Elem()
if reflectArrayOfSupported && d.stid == 0 && d.h.PreferArrayOverSlice {
- rvn = reflectArrayOf(rvn)
+ rvn00 := d.np.get(v2)
+ rvn = reflect.New(reflectArrayOf(rvn00.Len(), intfTyp)).Elem()
+ reflect.Copy(rvn, rvn00)
+ } else {
+ rvn = d.np.get(v2)
}
} else {
rvn = reflect.New(d.h.SliceType).Elem()
@@ -652,27 +706,27 @@ func (f *decFnInfo) kInterfaceNaked() (rvn reflect.Value) {
rvnA := reflect.New(bfn.rt)
rvn = rvnA.Elem()
if bytes != nil {
- bfn.ext.ReadExt(rvnA.Interface(), bytes)
+ bfn.ext.ReadExt(rv2i(rvnA), bytes)
} else {
- bfn.ext.UpdateExt(rvnA.Interface(), v)
+ bfn.ext.UpdateExt(rv2i(rvnA), v)
}
}
case valueTypeNil:
// no-op
case valueTypeInt:
- rvn = reflect.ValueOf(&n.i).Elem()
+ rvn = d.np.get(&n.i)
case valueTypeUint:
- rvn = reflect.ValueOf(&n.u).Elem()
+ rvn = d.np.get(&n.u)
case valueTypeFloat:
- rvn = reflect.ValueOf(&n.f).Elem()
+ rvn = d.np.get(&n.f)
case valueTypeBool:
- rvn = reflect.ValueOf(&n.b).Elem()
+ rvn = d.np.get(&n.b)
case valueTypeString, valueTypeSymbol:
- rvn = reflect.ValueOf(&n.s).Elem()
+ rvn = d.np.get(&n.s)
case valueTypeBytes:
- rvn = reflect.ValueOf(&n.l).Elem()
+ rvn = d.np.get(&n.l)
case valueTypeTimestamp:
- rvn = reflect.ValueOf(&n.t).Elem()
+ rvn = d.np.get(&n.t)
default:
panic(fmt.Errorf("kInterfaceNaked: unexpected valueType: %d", n.v))
}
@@ -736,54 +790,28 @@ func (f *decFnInfo) kStruct(rv reflect.Value) {
}
tisfi := fti.sfi
hasLen := containerLen >= 0
- if hasLen {
- for j := 0; j < containerLen; j++ {
- // rvkencname := dd.DecodeString()
- if cr != nil {
- cr.sendContainerState(containerMapKey)
- }
- rvkencnameB := dd.DecodeBytes(f.d.b[:], true, true)
- rvkencname := stringView(rvkencnameB)
- // 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)
- }
- keepAlive4StringView(rvkencnameB) // maintain ref 4 stringView
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ // rvkencname := dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } else {
- for j := 0; !dd.CheckBreak(); j++ {
- // rvkencname := dd.DecodeString()
- if cr != nil {
- cr.sendContainerState(containerMapKey)
- }
- rvkencnameB := dd.DecodeBytes(f.d.b[:], true, true)
- rvkencname := stringView(rvkencnameB)
- // 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)
- }
- keepAlive4StringView(rvkencnameB) // maintain ref 4 stringView
+ rvkencnameB := dd.DecodeStringAsBytes()
+ rvkencname := stringView(rvkencnameB)
+ // 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)
+ }
+ // keepAlive4StringView(rvkencnameB) // maintain ref 4 stringView // not needed, as reference is outside loop
}
if cr != nil {
cr.sendContainerState(containerMapEnd)
@@ -800,11 +828,7 @@ func (f *decFnInfo) kStruct(rv reflect.Value) {
// 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() {
+ if (hasLen && j == containerLen) || (!hasLen && dd.CheckBreak()) {
break
}
if cr != nil {
@@ -848,14 +872,14 @@ func (f *decFnInfo) kSlice(rv reflect.Value) {
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)
+ bs2 := dd.DecodeBytes(nil, true)
+ ch := rv2i(rv).(chan<- byte)
for _, b := range bs2 {
ch <- b
}
} else {
rvbs := rv.Bytes()
- bs2 := dd.DecodeBytes(rvbs, false, false)
+ bs2 := dd.DecodeBytes(rvbs, false)
if rvbs == nil && bs2 != nil || rvbs != nil && bs2 == nil || len(bs2) != len(rvbs) {
if rv.CanSet() {
rv.SetBytes(bs2)
@@ -873,21 +897,26 @@ func (f *decFnInfo) kSlice(rv reflect.Value) {
// // 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))
+ if rv.CanSet() {
+ 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
}
+ rtelem0Size := int(rtelem0.Size())
+ rtelem0Mut := !isImmutableKind(rtelem0.Kind())
+ // rtelem0Kind := rtelem0.Kind()
rtelem := rtelem0
for rtelem.Kind() == reflect.Ptr {
rtelem = rtelem.Elem()
@@ -899,127 +928,110 @@ func (f *decFnInfo) kSlice(rv reflect.Value) {
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)
+ rvlen := rv.Len()
+ rvcap := rv.Cap()
+ hasLen := containerLenS > 0
+ if hasLen && f.seq == seqTypeSlice {
+ if containerLenS > rvcap {
+ oldRvlenGtZero := rvlen > 0
+ rvlen = decInferLen(containerLenS, f.d.h.MaxInitLen, int(rtelem0.Size()))
+ if rvlen <= rvcap {
+ if rv.CanSet() {
+ rv.SetLen(rvlen)
} 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
+ rv = rv.Slice(0, rvlen)
+ rvChanged = true
}
- 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)
+ rv = reflect.MakeSlice(ti.rt, rvlen, rvlen)
+ rvcap = 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)
+ }
+ } else if containerLenS != rvlen {
+ rvlen = containerLenS
+ if rv.CanSet() {
+ rv.SetLen(rvlen)
+ } else {
+ rv = rv.Slice(0, rvlen)
+ rvChanged = true
+ }
+ }
+ }
+ // consider creating new element once, and just decoding into it.
+ var rtelem0Zero reflect.Value
+ var rtelem0ZeroValid bool
+ var j int
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && (f.seq == seqTypeSlice || f.seq == seqTypeChan) && rv.IsNil() {
+ if hasLen {
+ rvlen = decInferLen(containerLenS, f.d.h.MaxInitLen, rtelem0Size)
+ } else {
+ rvlen = 8
+ }
+ if f.seq == seqTypeSlice {
+ rv = reflect.MakeSlice(ti.rt, rvlen, rvlen)
+ rvChanged = true
+ } else if f.seq == seqTypeChan {
+ rv.Set(reflect.MakeChan(ti.rt, rvlen))
+ }
+ }
+ if f.seq == seqTypeChan {
+ slh.ElemContainerState(j)
+ if rtelem0Mut || !rv9.IsValid() {
+ 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
+ var rvcap2 int
+ rv9, rvcap2, rvChanged = decExpandSliceRV(rv, ti.rt, rtelem0Size, 1, rvlen, rvcap)
+ rvlen++
+ if rvChanged {
+ rv = rv9
+ rvcap = rvcap2
+ }
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ rv9 = rv.Index(j)
+ // rv.Index(rv.Len() - 1).Set(reflect.Zero(rtelem0))
+ if resetSliceElemToZeroValue {
+ if !rtelem0ZeroValid {
+ rtelem0ZeroValid = true
+ rtelem0Zero = reflect.Zero(rtelem0)
+ }
+ rv9.Set(rtelem0Zero)
+ }
+ d.decodeValue(rv9, fn)
+ }
+ }
+ }
+ if f.seq == seqTypeSlice {
+ if j < rvlen {
+ if rv.CanSet() {
+ rv.SetLen(j)
+ } else {
+ rv = rv.Slice(0, j)
+ rvChanged = true
+ }
+ rvlen = j
+ } else if j == 0 && rv.IsNil() {
+ rv = reflect.MakeSlice(ti.rt, 0, 0)
+ rvChanged = true
}
}
slh.End()
@@ -1041,7 +1053,7 @@ func (f *decFnInfo) kMap(rv reflect.Value) {
cr := d.cr
ti := f.ti
if rv.IsNil() {
- rv.Set(reflect.MakeMap(ti.rt))
+ rv.Set(makeMapReflect(ti.rt, containerLen))
}
if containerLen == 0 {
@@ -1052,7 +1064,7 @@ func (f *decFnInfo) kMap(rv reflect.Value) {
}
ktype, vtype := ti.rt.Key(), ti.rt.Elem()
- ktypeId := reflect.ValueOf(ktype).Pointer()
+ ktypeId := rt2id(ktype)
vtypeKind := vtype.Kind()
var keyFn, valFn *decFn
var xtyp reflect.Type
@@ -1063,6 +1075,7 @@ func (f *decFnInfo) kMap(rv reflect.Value) {
}
valFn = d.getDecFn(xtyp, true, true)
var mapGet, mapSet bool
+ rvvImmut := isImmutableKind(vtypeKind)
if !f.d.h.MapValueReset {
// if pointer, mapGet = true
// if interface, mapGet = true if !DecodeNakedAlways (else false)
@@ -1074,107 +1087,95 @@ func (f *decFnInfo) kMap(rv reflect.Value) {
if !f.d.h.InterfaceReset {
mapGet = true
}
- } else if !isImmutableKind(vtypeKind) {
+ } else if !rvvImmut {
mapGet = true
}
}
var rvk, rvv, rvz reflect.Value
-
- // for j := 0; j < containerLen; j++ {
- if containerLen > 0 {
- for j := 0; j < containerLen; j++ {
+ rvkMut := !isImmutableKind(ktype.Kind()) // if ktype is immutable, then re-use the same rvk.
+ ktypeIsString := ktypeId == stringTypId
+ // ktypeIsString = false
+ ktypeIsIntf := ktypeId == intfTypId
+ hasLen := containerLen > 0
+ var kstrbs []byte
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
+ }
+ if rvkMut || !rvk.IsValid() {
rvk = reflect.New(ktype).Elem()
- if cr != nil {
- cr.sendContainerState(containerMapKey)
- }
+ }
+ if ktypeIsString {
+ kstrbs = dd.DecodeStringAsBytes()
+ // fmt.Printf(">>>> decode: kMap: kstring: %s\n", kstrbs)
+ rvk.SetString(stringView(kstrbs))
+ // NOTE: if doing an insert, you MUST use a real string (not stringview)
+ } else {
d.decodeValue(rvk, keyFn)
-
// special case if a byte array.
- if ktypeId == intfTypId {
+ if ktypeIsIntf {
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()))
- }
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+
+ // Brittle, but OK per TryDecodeAsNil() contract.
+ // i.e. TryDecodeAsNil never shares slices with other decDriver procedures
+ if dd.TryDecodeAsNil() {
+ if ktypeIsString {
+ rvk.SetString(d.string(kstrbs))
}
- 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
+ rv.SetMapIndex(rvk, reflect.Value{}) // delete the mapping
+ continue
+ }
+
+ 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() {
+ rvv = reflect.New(vtype).Elem()
+ } else if vtypeKind == reflect.Ptr {
+ mapSet = false
}
- if cr != nil {
- cr.sendContainerState(containerMapValue)
+ // if rvv.IsValid() {
+ // if vtypeKind == reflect.Ptr {
+ // mapSet = false
+ // }
+ // } else {
+ // rvv = reflect.New(vtype).Elem()
+ // }
+ } else if rvvImmut {
+ if !rvz.IsValid() {
+ rvz = reflect.New(vtype).Elem()
+ }
+ rvv = rvz
+ } else {
+ rvv = reflect.New(vtype).Elem()
+ }
+
+ // We MUST be done with the stringview of the key, before decoding the value
+ // so that we don't bastardize the reused byte array.
+ if mapSet {
+ if ktypeIsString {
+ rvk.SetString(d.string(kstrbs))
}
d.decodeValue(rvv, valFn)
- if mapSet {
- rv.SetMapIndex(rvk, rvv)
- }
+ rv.SetMapIndex(rvk, rvv)
+ } else {
+ d.decodeValue(rvv, valFn)
}
+ // if ktypeIsString {
+ // // keepAlive4StringView(kstrbs) // not needed, as reference is outside loop
+ // }
}
+
if cr != nil {
cr.sendContainerState(containerMapEnd)
}
@@ -1244,6 +1245,11 @@ func (n *decNaked) reset() {
}
}
+type rtid2rv struct {
+ rtid uintptr
+ rv reflect.Value
+}
+
// 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.
@@ -1275,8 +1281,10 @@ type Decoder struct {
stid uintptr
n decNaked
+ np ptrToRvMap
b [scratchByteArrayLen]byte
is map[string]string // used for interning strings
+ zc []rtid2rv // zero-valued cache
}
// NewDecoder returns a Decoder for decoding a stream of bytes from an io.Reader.
@@ -1299,6 +1307,7 @@ func NewDecoderBytes(in []byte, h Handle) *Decoder {
func newDecoder(h Handle) *Decoder {
d := &Decoder{hh: h, h: h.getBasicHandle(), be: h.isBinary()}
+ d.np.init()
n := &d.n
// n.rs = n.ra[:0]
n.ms = n.ma[:0]
@@ -1322,10 +1331,10 @@ func (d *Decoder) resetCommon() {
// but could be changed.
d.mtid, d.stid = 0, 0
if d.h.MapType != nil {
- d.mtid = reflect.ValueOf(d.h.MapType).Pointer()
+ d.mtid = rt2id(d.h.MapType)
}
if d.h.SliceType != nil {
- d.stid = reflect.ValueOf(d.h.SliceType).Pointer()
+ d.stid = rt2id(d.h.SliceType)
}
}
@@ -1412,11 +1421,11 @@ func (d *Decoder) Decode(v interface{}) (err error) {
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)
-}
+// // 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
@@ -1428,15 +1437,9 @@ func (d *Decoder) swallow() {
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
- }
+ hasLen := containerLen >= 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ // if clenGtEqualZero {if j >= containerLen {break} } else if dd.CheckBreak() {break}
if cr != nil {
cr.sendContainerState(containerMapKey)
}
@@ -1450,16 +1453,9 @@ func (d *Decoder) swallow() {
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
- }
+ containerLen := dd.ReadArrayStart()
+ hasLen := containerLen >= 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
if cr != nil {
cr.sendContainerState(containerArrayElem)
}
@@ -1469,10 +1465,9 @@ func (d *Decoder) swallow() {
cr.sendContainerState(containerArrayEnd)
}
case valueTypeBytes:
- dd.DecodeBytes(d.b[:], false, true)
+ dd.DecodeBytes(d.b[:], true)
case valueTypeString:
- dd.DecodeBytes(d.b[:], true, true)
- // dd.DecodeStringAsBytes(d.b[:])
+ dd.DecodeStringAsBytes()
default:
// these are all primitives, which we can get from decodeNaked
// if RawExt using Value, complete the processing.
@@ -1570,7 +1565,7 @@ func (d *Decoder) decode(iv interface{}) {
d.errNotValidPtrValue(v)
}
// d.chkPtrValue(v)
- d.decodeValueNotNil(v.Elem(), nil)
+ d.decodeValueNotNil(v.Elem())
case *string:
*v = d.d.DecodeString()
@@ -1601,13 +1596,13 @@ func (d *Decoder) decode(iv interface{}) {
case *float64:
*v = d.d.DecodeFloat(false)
case *[]uint8:
- *v = d.d.DecodeBytes(*v, false, false)
+ *v = d.d.DecodeBytes(*v, false)
case *Raw:
*v = d.raw()
case *interface{}:
- d.decodeValueNotNil(reflect.ValueOf(iv).Elem(), nil)
+ d.decodeValueNotNil(reflect.ValueOf(iv).Elem())
default:
if !fastpathDecodeTypeSwitch(iv, d) {
@@ -1618,8 +1613,7 @@ func (d *Decoder) decode(iv interface{}) {
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.
+ // 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()))
@@ -1662,17 +1656,15 @@ func (d *Decoder) decodeValue(rv reflect.Value, fn *decFn) {
}
}
-func (d *Decoder) decodeValueNotNil(rv reflect.Value, fn *decFn) {
+func (d *Decoder) decodeValueNotNil(rv reflect.Value) {
if rv, proceed := d.preDecodeValue(rv, false); proceed {
- if fn == nil {
- fn = d.getDecFn(rv.Type(), true, true)
- }
+ 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()
+ rtid := rt2id(rt)
// retrieve or register a focus'ed function for this type
// to eliminate need to do the retrieval multiple times
@@ -1757,7 +1749,7 @@ func (d *Decoder) getDecFn(rt reflect.Type, checkFastpath, checkCodecSelfer bool
} else {
rtu = reflect.SliceOf(rt.Elem())
}
- rtuid := reflect.ValueOf(rtu).Pointer()
+ rtuid := rt2id(rtu)
if idx := fastpathAV.index(rtuid); idx != -1 {
xfnf := fastpathAV[idx].decfn
xrt := fastpathAV[idx].rt
@@ -1863,7 +1855,7 @@ func (d *Decoder) errNotValidPtrValue(rv reflect.Value) {
d.errorf("cannot decode into a value without an interface: %v", rv)
return
}
- rvi := rv.Interface()
+ rvi := rv2i(rv)
d.errorf("cannot decode into non-pointer or nil pointer. Got: %v, %T, %v", rv.Kind(), rvi, rvi)
}
@@ -1881,17 +1873,18 @@ func (d *Decoder) errorf(format string, params ...interface{}) {
// Possibly get an interned version of a string
//
-// This should mostly be used for map keys, where the key type is string
+// This should mostly be used for map keys, where the key type is string.
+// This is because keys of a map/struct are typically reused across many objects.
func (d *Decoder) string(v []byte) (s string) {
- if d.is != nil {
- s, ok := d.is[string(v)] // no allocation here, per go implementation
- if !ok {
- s = string(v) // new allocation here
- d.is[s] = s
- }
- return s
+ if d.is == nil {
+ return string(v) // don't return stringView, as we need a real string here.
}
- return string(v) // don't return stringView, as we need a real string here.
+ s, ok := d.is[string(v)] // no allocation here, per go implementation
+ if !ok {
+ s = string(v) // new allocation here
+ d.is[s] = s
+ }
+ return s
}
// func (d *Decoder) intern(s string) {
@@ -1983,11 +1976,11 @@ func decByteSlice(r decReader, clen, maxInitLen int, bs []byte) (bsOut []byte) {
r.readb(bsOut)
} else {
// bsOut = make([]byte, clen)
- len2, _ := decInferLen(clen, maxInitLen, 1)
+ len2 := decInferLen(clen, maxInitLen, 1)
bsOut = make([]byte, len2)
r.readb(bsOut)
for len2 < clen {
- len3, _ := decInferLen(clen-len2, maxInitLen, 1)
+ len3 := decInferLen(clen-len2, maxInitLen, 1)
// fmt.Printf(">>>>> TESTING: in loop: clen: %v, maxInitLen: %v, len2: %v, len3: %v\n", clen, maxInitLen, len2, len3)
bs3 := bsOut
bsOut = make([]byte, len2+len3)
@@ -2019,7 +2012,7 @@ func detachZeroCopyBytes(isBytesReader bool, dest []byte, in []byte) (out []byte
// - 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) {
+func decInferLen(clen, maxlen, unit int) (rvlen int) {
// handle when maxlen is not set i.e. <= 0
if clen <= 0 {
return
@@ -2038,7 +2031,6 @@ func decInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) {
}
if clen > maxlen {
rvlen = maxlen
- truncated = true
} else {
rvlen = clen
}
@@ -2054,6 +2046,31 @@ func decInferLen(clen, maxlen, unit int) (rvlen int, truncated bool) {
// return
}
+func decExpandSliceRV(s reflect.Value, st reflect.Type, stElemSize, num, slen, scap int) (
+ s2 reflect.Value, scap2 int, changed bool) {
+ // fmt.Printf("dec-expand-slice-rv: %v, %v\n", s, st)
+ l1 := slen + num // new slice length
+ if l1 < slen {
+ panic("expandSlice: slice overflow")
+ }
+ if l1 <= scap {
+ if s.CanSet() {
+ s.SetLen(l1)
+ } else {
+ s2 = s.Slice(0, l1)
+ scap2 = scap
+ changed = true
+ }
+ return
+ }
+ scap2 = growCap(scap, stElemSize, num)
+ s2 = reflect.MakeSlice(st, l1, scap2)
+ changed = true
+ // println("expandslicevalue: cap-old: ", c0, ", cap-new: ", c1, ", len-new: ", l1)
+ reflect.Copy(s2, s)
+ return
+}
+
// // implement overall decReader wrapping both, for possible use inline:
// type decReaderT struct {
// bytes bool
diff --git a/vendor/github.com/ugorji/go/codec/encode.go b/vendor/github.com/ugorji/go/codec/encode.go
index 268154d24..a9fa72f92 100644
--- a/vendor/github.com/ugorji/go/codec/encode.go
+++ b/vendor/github.com/ugorji/go/codec/encode.go
@@ -313,21 +313,21 @@ type encFnInfo struct {
}
func (f *encFnInfo) builtin(rv reflect.Value) {
- f.e.e.EncodeBuiltin(f.ti.rtid, rv.Interface())
+ f.e.e.EncodeBuiltin(f.ti.rtid, rv2i(rv))
}
func (f *encFnInfo) raw(rv reflect.Value) {
- f.e.raw(rv.Interface().(Raw))
+ f.e.raw(rv2i(rv).(Raw))
}
func (f *encFnInfo) rawExt(rv reflect.Value) {
- // rev := rv.Interface().(RawExt)
+ // rev := rv2i(rv).(RawExt)
// f.e.e.EncodeRawExt(&rev, f.e)
var re *RawExt
if rv.CanAddr() {
- re = rv.Addr().Interface().(*RawExt)
+ re = rv2i(rv.Addr()).(*RawExt)
} else {
- rev := rv.Interface().(RawExt)
+ rev := rv2i(rv).(RawExt)
re = &rev
}
f.e.e.EncodeRawExt(re, f.e)
@@ -338,21 +338,21 @@ func (f *encFnInfo) ext(rv reflect.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)
+ f.e.e.EncodeExt(rv2i(rv), 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()
+ v = rv2i(rv)
} else if indir == -1 {
// If a non-pointer was passed to Encode(), then that value is not addressable.
// Take addr if addressable, else copy value to an addressable value.
if rv.CanAddr() {
- v = rv.Addr().Interface()
+ v = rv2i(rv.Addr())
} else {
rv2 := reflect.New(rv.Type())
rv2.Elem().Set(rv)
- v = rv2.Interface()
+ v = rv2i(rv2)
// fmt.Printf("rv.Type: %v, rv2.Type: %v, v: %v\n", rv.Type(), rv2.Type(), v)
}
} else {
@@ -363,7 +363,7 @@ func (f *encFnInfo) getValueForMarshalInterface(rv reflect.Value, indir int8) (v
}
rv = rv.Elem()
}
- v = rv.Interface()
+ v = rv2i(rv)
}
return v, true
}
@@ -383,7 +383,7 @@ func (f *encFnInfo) binaryMarshal(rv reflect.Value) {
func (f *encFnInfo) textMarshal(rv reflect.Value) {
if v, proceed := f.getValueForMarshalInterface(rv, f.ti.tmIndir); proceed {
- // debugf(">>>> encoding.TextMarshaler: %T", rv.Interface())
+ // debugf(">>>> encoding.TextMarshaler: %T", rv2i(rv))
bs, fnerr := v.(encoding.TextMarshaler).MarshalText()
f.e.marshal(bs, fnerr, false, c_UTF8)
}
@@ -476,10 +476,10 @@ func (f *encFnInfo) kSlice(rv reflect.Value) {
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) {
+ // for b := range rv2i(rv).(<-chan byte) {
// bs = append(bs, b)
// }
- ch := rv.Interface().(<-chan byte)
+ ch := rv2i(rv).(<-chan byte)
for i := 0; i < l; i++ {
bs = append(bs, <-ch)
}
@@ -507,7 +507,7 @@ func (f *encFnInfo) kSlice(rv reflect.Value) {
// a concrete type and kInterface will bomb.
var fn *encFn
if rtelem.Kind() != reflect.Interface {
- rtelemid := reflect.ValueOf(rtelem).Pointer()
+ rtelemid := rt2id(rtelem)
fn = e.getEncFn(rtelemid, rtelem, true, true)
}
// TODO: Consider perf implication of encoding odd index values as symbols if type is string
@@ -680,7 +680,7 @@ func (f *encFnInfo) kMap(rv reflect.Value) {
ti := f.ti
rtkey := ti.rt.Key()
rtval := ti.rt.Elem()
- rtkeyid := reflect.ValueOf(rtkey).Pointer()
+ rtkeyid := rt2id(rtkey)
// keyTypeIsString := f.ti.rt.Key().Kind() == reflect.String
var keyTypeIsString = rtkeyid == stringTypId
if keyTypeIsString {
@@ -690,7 +690,7 @@ func (f *encFnInfo) kMap(rv reflect.Value) {
rtkey = rtkey.Elem()
}
if rtkey.Kind() != reflect.Interface {
- rtkeyid = reflect.ValueOf(rtkey).Pointer()
+ rtkeyid = rt2id(rtkey)
keyFn = e.getEncFn(rtkeyid, rtkey, true, true)
}
}
@@ -698,7 +698,7 @@ func (f *encFnInfo) kMap(rv reflect.Value) {
rtval = rtval.Elem()
}
if rtval.Kind() != reflect.Interface {
- rtvalid := reflect.ValueOf(rtval).Pointer()
+ rtvalid := rt2id(rtval)
valFn = e.getEncFn(rtvalid, rtval, true, true)
}
mks := rv.MapKeys()
@@ -1216,7 +1216,7 @@ func (e *Encoder) doEncodeValue(rv reflect.Value, fn *encFn, sptr uintptr,
}
if fn == nil {
rt := rv.Type()
- rtid := reflect.ValueOf(rt).Pointer()
+ rtid := rt2id(rt)
// fn = e.getEncFn(rtid, rt, true, true)
fn = e.getEncFn(rtid, rt, checkFastpath, checkCodecSelfer)
}
@@ -1240,7 +1240,7 @@ func (e *Encoder) encodeValue(rv reflect.Value, fn *encFn) {
}
func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCodecSelfer bool) (fn *encFn) {
- // rtid := reflect.ValueOf(rt).Pointer()
+ // rtid := rt2id(rt)
var ok bool
if useMapForCodecCache {
fn, ok = e.f[rtid]
@@ -1310,7 +1310,7 @@ func (e *Encoder) getEncFn(rtid uintptr, rt reflect.Type, checkFastpath, checkCo
} else {
rtu = reflect.SliceOf(rt.Elem())
}
- rtuid := reflect.ValueOf(rtu).Pointer()
+ rtuid := rt2id(rtu)
if idx := fastpathAV.index(rtuid); idx != -1 {
xfnf := fastpathAV[idx].encfn
xrt := fastpathAV[idx].rt
diff --git a/vendor/github.com/ugorji/go/codec/fast-path.generated.go b/vendor/github.com/ugorji/go/codec/fast-path.generated.go
index f2e5d2dcf..a1abd55c4 100644
--- a/vendor/github.com/ugorji/go/codec/fast-path.generated.go
+++ b/vendor/github.com/ugorji/go/codec/fast-path.generated.go
@@ -86,7 +86,7 @@ func init() {
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()
+ xptr := rt2id(xrt)
fastpathAV[i] = fastpathE{xptr, xrt, fe, fd}
i++
return
@@ -3115,9 +3115,9 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool {
func (f *encFnInfo) fastpathEncSliceIntfR(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceIntfV(rv2i(rv).([]interface{}), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceIntfV(rv.Interface().([]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceIntfV(rv2i(rv).([]interface{}), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceIntfV(v []interface{}, checkNil bool, e *Encoder) {
@@ -3168,9 +3168,9 @@ func (_ fastpathT) EncAsMapSliceIntfV(v []interface{}, checkNil bool, e *Encoder
func (f *encFnInfo) fastpathEncSliceStringR(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceStringV(rv2i(rv).([]string), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceStringV(rv.Interface().([]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceStringV(rv2i(rv).([]string), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceStringV(v []string, checkNil bool, e *Encoder) {
@@ -3221,9 +3221,9 @@ func (_ fastpathT) EncAsMapSliceStringV(v []string, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceFloat32R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceFloat32V(rv2i(rv).([]float32), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceFloat32V(rv.Interface().([]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceFloat32V(rv2i(rv).([]float32), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceFloat32V(v []float32, checkNil bool, e *Encoder) {
@@ -3274,9 +3274,9 @@ func (_ fastpathT) EncAsMapSliceFloat32V(v []float32, checkNil bool, e *Encoder)
func (f *encFnInfo) fastpathEncSliceFloat64R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceFloat64V(rv2i(rv).([]float64), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceFloat64V(rv.Interface().([]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceFloat64V(rv2i(rv).([]float64), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceFloat64V(v []float64, checkNil bool, e *Encoder) {
@@ -3327,9 +3327,9 @@ func (_ fastpathT) EncAsMapSliceFloat64V(v []float64, checkNil bool, e *Encoder)
func (f *encFnInfo) fastpathEncSliceUintR(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceUintV(rv2i(rv).([]uint), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceUintV(rv.Interface().([]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceUintV(rv2i(rv).([]uint), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceUintV(v []uint, checkNil bool, e *Encoder) {
@@ -3380,9 +3380,9 @@ func (_ fastpathT) EncAsMapSliceUintV(v []uint, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceUint16R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceUint16V(rv2i(rv).([]uint16), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceUint16V(rv.Interface().([]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceUint16V(rv2i(rv).([]uint16), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceUint16V(v []uint16, checkNil bool, e *Encoder) {
@@ -3433,9 +3433,9 @@ func (_ fastpathT) EncAsMapSliceUint16V(v []uint16, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceUint32R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceUint32V(rv2i(rv).([]uint32), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceUint32V(rv.Interface().([]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceUint32V(rv2i(rv).([]uint32), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceUint32V(v []uint32, checkNil bool, e *Encoder) {
@@ -3486,9 +3486,9 @@ func (_ fastpathT) EncAsMapSliceUint32V(v []uint32, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceUint64R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceUint64V(rv2i(rv).([]uint64), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceUint64V(rv.Interface().([]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceUint64V(rv2i(rv).([]uint64), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceUint64V(v []uint64, checkNil bool, e *Encoder) {
@@ -3539,9 +3539,9 @@ func (_ fastpathT) EncAsMapSliceUint64V(v []uint64, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceUintptrR(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceUintptrV(rv.Interface().([]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceUintptrV(rv2i(rv).([]uintptr), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceUintptrV(rv.Interface().([]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceUintptrV(rv2i(rv).([]uintptr), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceUintptrV(v []uintptr, checkNil bool, e *Encoder) {
@@ -3592,9 +3592,9 @@ func (_ fastpathT) EncAsMapSliceUintptrV(v []uintptr, checkNil bool, e *Encoder)
func (f *encFnInfo) fastpathEncSliceIntR(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceIntV(rv2i(rv).([]int), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceIntV(rv.Interface().([]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceIntV(rv2i(rv).([]int), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceIntV(v []int, checkNil bool, e *Encoder) {
@@ -3645,9 +3645,9 @@ func (_ fastpathT) EncAsMapSliceIntV(v []int, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceInt8R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceInt8V(rv2i(rv).([]int8), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceInt8V(rv.Interface().([]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceInt8V(rv2i(rv).([]int8), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceInt8V(v []int8, checkNil bool, e *Encoder) {
@@ -3698,9 +3698,9 @@ func (_ fastpathT) EncAsMapSliceInt8V(v []int8, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceInt16R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceInt16V(rv2i(rv).([]int16), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceInt16V(rv.Interface().([]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceInt16V(rv2i(rv).([]int16), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceInt16V(v []int16, checkNil bool, e *Encoder) {
@@ -3751,9 +3751,9 @@ func (_ fastpathT) EncAsMapSliceInt16V(v []int16, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceInt32R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceInt32V(rv2i(rv).([]int32), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceInt32V(rv.Interface().([]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceInt32V(rv2i(rv).([]int32), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceInt32V(v []int32, checkNil bool, e *Encoder) {
@@ -3804,9 +3804,9 @@ func (_ fastpathT) EncAsMapSliceInt32V(v []int32, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceInt64R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceInt64V(rv2i(rv).([]int64), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceInt64V(rv.Interface().([]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceInt64V(rv2i(rv).([]int64), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceInt64V(v []int64, checkNil bool, e *Encoder) {
@@ -3857,9 +3857,9 @@ func (_ fastpathT) EncAsMapSliceInt64V(v []int64, checkNil bool, e *Encoder) {
func (f *encFnInfo) fastpathEncSliceBoolR(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.EncAsMapSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncAsMapSliceBoolV(rv2i(rv).([]bool), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.EncSliceBoolV(rv.Interface().([]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncSliceBoolV(rv2i(rv).([]bool), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) EncSliceBoolV(v []bool, checkNil bool, e *Encoder) {
@@ -3909,7 +3909,7 @@ func (_ fastpathT) EncAsMapSliceBoolV(v []bool, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntfIntfR(rv reflect.Value) {
- fastpathTV.EncMapIntfIntfV(rv.Interface().(map[interface{}]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfIntfV(rv2i(rv).(map[interface{}]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -3962,7 +3962,7 @@ func (_ fastpathT) EncMapIntfIntfV(v map[interface{}]interface{}, checkNil bool,
}
func (f *encFnInfo) fastpathEncMapIntfStringR(rv reflect.Value) {
- fastpathTV.EncMapIntfStringV(rv.Interface().(map[interface{}]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfStringV(rv2i(rv).(map[interface{}]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -4015,7 +4015,7 @@ func (_ fastpathT) EncMapIntfStringV(v map[interface{}]string, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapIntfUintR(rv reflect.Value) {
- fastpathTV.EncMapIntfUintV(rv.Interface().(map[interface{}]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfUintV(rv2i(rv).(map[interface{}]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -4068,7 +4068,7 @@ func (_ fastpathT) EncMapIntfUintV(v map[interface{}]uint, checkNil bool, e *Enc
}
func (f *encFnInfo) fastpathEncMapIntfUint8R(rv reflect.Value) {
- fastpathTV.EncMapIntfUint8V(rv.Interface().(map[interface{}]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfUint8V(rv2i(rv).(map[interface{}]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -4121,7 +4121,7 @@ func (_ fastpathT) EncMapIntfUint8V(v map[interface{}]uint8, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapIntfUint16R(rv reflect.Value) {
- fastpathTV.EncMapIntfUint16V(rv.Interface().(map[interface{}]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfUint16V(rv2i(rv).(map[interface{}]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -4174,7 +4174,7 @@ func (_ fastpathT) EncMapIntfUint16V(v map[interface{}]uint16, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapIntfUint32R(rv reflect.Value) {
- fastpathTV.EncMapIntfUint32V(rv.Interface().(map[interface{}]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfUint32V(rv2i(rv).(map[interface{}]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -4227,7 +4227,7 @@ func (_ fastpathT) EncMapIntfUint32V(v map[interface{}]uint32, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapIntfUint64R(rv reflect.Value) {
- fastpathTV.EncMapIntfUint64V(rv.Interface().(map[interface{}]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfUint64V(rv2i(rv).(map[interface{}]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -4280,7 +4280,7 @@ func (_ fastpathT) EncMapIntfUint64V(v map[interface{}]uint64, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapIntfUintptrR(rv reflect.Value) {
- fastpathTV.EncMapIntfUintptrV(rv.Interface().(map[interface{}]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfUintptrV(rv2i(rv).(map[interface{}]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -4333,7 +4333,7 @@ func (_ fastpathT) EncMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool,
}
func (f *encFnInfo) fastpathEncMapIntfIntR(rv reflect.Value) {
- fastpathTV.EncMapIntfIntV(rv.Interface().(map[interface{}]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfIntV(rv2i(rv).(map[interface{}]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -4386,7 +4386,7 @@ func (_ fastpathT) EncMapIntfIntV(v map[interface{}]int, checkNil bool, e *Encod
}
func (f *encFnInfo) fastpathEncMapIntfInt8R(rv reflect.Value) {
- fastpathTV.EncMapIntfInt8V(rv.Interface().(map[interface{}]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfInt8V(rv2i(rv).(map[interface{}]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -4439,7 +4439,7 @@ func (_ fastpathT) EncMapIntfInt8V(v map[interface{}]int8, checkNil bool, e *Enc
}
func (f *encFnInfo) fastpathEncMapIntfInt16R(rv reflect.Value) {
- fastpathTV.EncMapIntfInt16V(rv.Interface().(map[interface{}]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfInt16V(rv2i(rv).(map[interface{}]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -4492,7 +4492,7 @@ func (_ fastpathT) EncMapIntfInt16V(v map[interface{}]int16, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapIntfInt32R(rv reflect.Value) {
- fastpathTV.EncMapIntfInt32V(rv.Interface().(map[interface{}]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfInt32V(rv2i(rv).(map[interface{}]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -4545,7 +4545,7 @@ func (_ fastpathT) EncMapIntfInt32V(v map[interface{}]int32, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapIntfInt64R(rv reflect.Value) {
- fastpathTV.EncMapIntfInt64V(rv.Interface().(map[interface{}]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfInt64V(rv2i(rv).(map[interface{}]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -4598,7 +4598,7 @@ func (_ fastpathT) EncMapIntfInt64V(v map[interface{}]int64, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapIntfFloat32R(rv reflect.Value) {
- fastpathTV.EncMapIntfFloat32V(rv.Interface().(map[interface{}]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfFloat32V(rv2i(rv).(map[interface{}]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -4651,7 +4651,7 @@ func (_ fastpathT) EncMapIntfFloat32V(v map[interface{}]float32, checkNil bool,
}
func (f *encFnInfo) fastpathEncMapIntfFloat64R(rv reflect.Value) {
- fastpathTV.EncMapIntfFloat64V(rv.Interface().(map[interface{}]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfFloat64V(rv2i(rv).(map[interface{}]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -4704,7 +4704,7 @@ func (_ fastpathT) EncMapIntfFloat64V(v map[interface{}]float64, checkNil bool,
}
func (f *encFnInfo) fastpathEncMapIntfBoolR(rv reflect.Value) {
- fastpathTV.EncMapIntfBoolV(rv.Interface().(map[interface{}]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntfBoolV(rv2i(rv).(map[interface{}]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -4757,7 +4757,7 @@ func (_ fastpathT) EncMapIntfBoolV(v map[interface{}]bool, checkNil bool, e *Enc
}
func (f *encFnInfo) fastpathEncMapStringIntfR(rv reflect.Value) {
- fastpathTV.EncMapStringIntfV(rv.Interface().(map[string]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringIntfV(rv2i(rv).(map[string]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -4812,7 +4812,7 @@ func (_ fastpathT) EncMapStringIntfV(v map[string]interface{}, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapStringStringR(rv reflect.Value) {
- fastpathTV.EncMapStringStringV(rv.Interface().(map[string]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringStringV(rv2i(rv).(map[string]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -4867,7 +4867,7 @@ func (_ fastpathT) EncMapStringStringV(v map[string]string, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapStringUintR(rv reflect.Value) {
- fastpathTV.EncMapStringUintV(rv.Interface().(map[string]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringUintV(rv2i(rv).(map[string]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -4922,7 +4922,7 @@ func (_ fastpathT) EncMapStringUintV(v map[string]uint, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapStringUint8R(rv reflect.Value) {
- fastpathTV.EncMapStringUint8V(rv.Interface().(map[string]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringUint8V(rv2i(rv).(map[string]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -4977,7 +4977,7 @@ func (_ fastpathT) EncMapStringUint8V(v map[string]uint8, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapStringUint16R(rv reflect.Value) {
- fastpathTV.EncMapStringUint16V(rv.Interface().(map[string]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringUint16V(rv2i(rv).(map[string]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -5032,7 +5032,7 @@ func (_ fastpathT) EncMapStringUint16V(v map[string]uint16, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapStringUint32R(rv reflect.Value) {
- fastpathTV.EncMapStringUint32V(rv.Interface().(map[string]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringUint32V(rv2i(rv).(map[string]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -5087,7 +5087,7 @@ func (_ fastpathT) EncMapStringUint32V(v map[string]uint32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapStringUint64R(rv reflect.Value) {
- fastpathTV.EncMapStringUint64V(rv.Interface().(map[string]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringUint64V(rv2i(rv).(map[string]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -5142,7 +5142,7 @@ func (_ fastpathT) EncMapStringUint64V(v map[string]uint64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapStringUintptrR(rv reflect.Value) {
- fastpathTV.EncMapStringUintptrV(rv.Interface().(map[string]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringUintptrV(rv2i(rv).(map[string]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -5197,7 +5197,7 @@ func (_ fastpathT) EncMapStringUintptrV(v map[string]uintptr, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapStringIntR(rv reflect.Value) {
- fastpathTV.EncMapStringIntV(rv.Interface().(map[string]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringIntV(rv2i(rv).(map[string]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -5252,7 +5252,7 @@ func (_ fastpathT) EncMapStringIntV(v map[string]int, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapStringInt8R(rv reflect.Value) {
- fastpathTV.EncMapStringInt8V(rv.Interface().(map[string]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringInt8V(rv2i(rv).(map[string]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -5307,7 +5307,7 @@ func (_ fastpathT) EncMapStringInt8V(v map[string]int8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapStringInt16R(rv reflect.Value) {
- fastpathTV.EncMapStringInt16V(rv.Interface().(map[string]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringInt16V(rv2i(rv).(map[string]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -5362,7 +5362,7 @@ func (_ fastpathT) EncMapStringInt16V(v map[string]int16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapStringInt32R(rv reflect.Value) {
- fastpathTV.EncMapStringInt32V(rv.Interface().(map[string]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringInt32V(rv2i(rv).(map[string]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -5417,7 +5417,7 @@ func (_ fastpathT) EncMapStringInt32V(v map[string]int32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapStringInt64R(rv reflect.Value) {
- fastpathTV.EncMapStringInt64V(rv.Interface().(map[string]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringInt64V(rv2i(rv).(map[string]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -5472,7 +5472,7 @@ func (_ fastpathT) EncMapStringInt64V(v map[string]int64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapStringFloat32R(rv reflect.Value) {
- fastpathTV.EncMapStringFloat32V(rv.Interface().(map[string]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringFloat32V(rv2i(rv).(map[string]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -5527,7 +5527,7 @@ func (_ fastpathT) EncMapStringFloat32V(v map[string]float32, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapStringFloat64R(rv reflect.Value) {
- fastpathTV.EncMapStringFloat64V(rv.Interface().(map[string]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringFloat64V(rv2i(rv).(map[string]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -5582,7 +5582,7 @@ func (_ fastpathT) EncMapStringFloat64V(v map[string]float64, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapStringBoolR(rv reflect.Value) {
- fastpathTV.EncMapStringBoolV(rv.Interface().(map[string]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapStringBoolV(rv2i(rv).(map[string]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -5637,7 +5637,7 @@ func (_ fastpathT) EncMapStringBoolV(v map[string]bool, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapFloat32IntfR(rv reflect.Value) {
- fastpathTV.EncMapFloat32IntfV(rv.Interface().(map[float32]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32IntfV(rv2i(rv).(map[float32]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -5683,7 +5683,7 @@ func (_ fastpathT) EncMapFloat32IntfV(v map[float32]interface{}, checkNil bool,
}
func (f *encFnInfo) fastpathEncMapFloat32StringR(rv reflect.Value) {
- fastpathTV.EncMapFloat32StringV(rv.Interface().(map[float32]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32StringV(rv2i(rv).(map[float32]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -5729,7 +5729,7 @@ func (_ fastpathT) EncMapFloat32StringV(v map[float32]string, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat32UintR(rv reflect.Value) {
- fastpathTV.EncMapFloat32UintV(rv.Interface().(map[float32]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32UintV(rv2i(rv).(map[float32]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -5775,7 +5775,7 @@ func (_ fastpathT) EncMapFloat32UintV(v map[float32]uint, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapFloat32Uint8R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Uint8V(rv.Interface().(map[float32]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Uint8V(rv2i(rv).(map[float32]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -5821,7 +5821,7 @@ func (_ fastpathT) EncMapFloat32Uint8V(v map[float32]uint8, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat32Uint16R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Uint16V(rv.Interface().(map[float32]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Uint16V(rv2i(rv).(map[float32]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -5867,7 +5867,7 @@ func (_ fastpathT) EncMapFloat32Uint16V(v map[float32]uint16, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat32Uint32R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Uint32V(rv.Interface().(map[float32]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Uint32V(rv2i(rv).(map[float32]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -5913,7 +5913,7 @@ func (_ fastpathT) EncMapFloat32Uint32V(v map[float32]uint32, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat32Uint64R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Uint64V(rv.Interface().(map[float32]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Uint64V(rv2i(rv).(map[float32]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -5959,7 +5959,7 @@ func (_ fastpathT) EncMapFloat32Uint64V(v map[float32]uint64, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat32UintptrR(rv reflect.Value) {
- fastpathTV.EncMapFloat32UintptrV(rv.Interface().(map[float32]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32UintptrV(rv2i(rv).(map[float32]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -6005,7 +6005,7 @@ func (_ fastpathT) EncMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapFloat32IntR(rv reflect.Value) {
- fastpathTV.EncMapFloat32IntV(rv.Interface().(map[float32]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32IntV(rv2i(rv).(map[float32]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -6051,7 +6051,7 @@ func (_ fastpathT) EncMapFloat32IntV(v map[float32]int, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapFloat32Int8R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Int8V(rv.Interface().(map[float32]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Int8V(rv2i(rv).(map[float32]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -6097,7 +6097,7 @@ func (_ fastpathT) EncMapFloat32Int8V(v map[float32]int8, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapFloat32Int16R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Int16V(rv.Interface().(map[float32]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Int16V(rv2i(rv).(map[float32]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -6143,7 +6143,7 @@ func (_ fastpathT) EncMapFloat32Int16V(v map[float32]int16, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat32Int32R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Int32V(rv.Interface().(map[float32]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Int32V(rv2i(rv).(map[float32]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -6189,7 +6189,7 @@ func (_ fastpathT) EncMapFloat32Int32V(v map[float32]int32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat32Int64R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Int64V(rv.Interface().(map[float32]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Int64V(rv2i(rv).(map[float32]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -6235,7 +6235,7 @@ func (_ fastpathT) EncMapFloat32Int64V(v map[float32]int64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat32Float32R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Float32V(rv.Interface().(map[float32]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Float32V(rv2i(rv).(map[float32]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -6281,7 +6281,7 @@ func (_ fastpathT) EncMapFloat32Float32V(v map[float32]float32, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapFloat32Float64R(rv reflect.Value) {
- fastpathTV.EncMapFloat32Float64V(rv.Interface().(map[float32]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32Float64V(rv2i(rv).(map[float32]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -6327,7 +6327,7 @@ func (_ fastpathT) EncMapFloat32Float64V(v map[float32]float64, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapFloat32BoolR(rv reflect.Value) {
- fastpathTV.EncMapFloat32BoolV(rv.Interface().(map[float32]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat32BoolV(rv2i(rv).(map[float32]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -6373,7 +6373,7 @@ func (_ fastpathT) EncMapFloat32BoolV(v map[float32]bool, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapFloat64IntfR(rv reflect.Value) {
- fastpathTV.EncMapFloat64IntfV(rv.Interface().(map[float64]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64IntfV(rv2i(rv).(map[float64]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -6419,7 +6419,7 @@ func (_ fastpathT) EncMapFloat64IntfV(v map[float64]interface{}, checkNil bool,
}
func (f *encFnInfo) fastpathEncMapFloat64StringR(rv reflect.Value) {
- fastpathTV.EncMapFloat64StringV(rv.Interface().(map[float64]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64StringV(rv2i(rv).(map[float64]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -6465,7 +6465,7 @@ func (_ fastpathT) EncMapFloat64StringV(v map[float64]string, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat64UintR(rv reflect.Value) {
- fastpathTV.EncMapFloat64UintV(rv.Interface().(map[float64]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64UintV(rv2i(rv).(map[float64]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -6511,7 +6511,7 @@ func (_ fastpathT) EncMapFloat64UintV(v map[float64]uint, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapFloat64Uint8R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Uint8V(rv.Interface().(map[float64]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Uint8V(rv2i(rv).(map[float64]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -6557,7 +6557,7 @@ func (_ fastpathT) EncMapFloat64Uint8V(v map[float64]uint8, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat64Uint16R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Uint16V(rv.Interface().(map[float64]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Uint16V(rv2i(rv).(map[float64]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -6603,7 +6603,7 @@ func (_ fastpathT) EncMapFloat64Uint16V(v map[float64]uint16, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat64Uint32R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Uint32V(rv.Interface().(map[float64]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Uint32V(rv2i(rv).(map[float64]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -6649,7 +6649,7 @@ func (_ fastpathT) EncMapFloat64Uint32V(v map[float64]uint32, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat64Uint64R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Uint64V(rv.Interface().(map[float64]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Uint64V(rv2i(rv).(map[float64]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -6695,7 +6695,7 @@ func (_ fastpathT) EncMapFloat64Uint64V(v map[float64]uint64, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapFloat64UintptrR(rv reflect.Value) {
- fastpathTV.EncMapFloat64UintptrV(rv.Interface().(map[float64]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64UintptrV(rv2i(rv).(map[float64]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -6741,7 +6741,7 @@ func (_ fastpathT) EncMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapFloat64IntR(rv reflect.Value) {
- fastpathTV.EncMapFloat64IntV(rv.Interface().(map[float64]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64IntV(rv2i(rv).(map[float64]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -6787,7 +6787,7 @@ func (_ fastpathT) EncMapFloat64IntV(v map[float64]int, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapFloat64Int8R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Int8V(rv.Interface().(map[float64]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Int8V(rv2i(rv).(map[float64]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -6833,7 +6833,7 @@ func (_ fastpathT) EncMapFloat64Int8V(v map[float64]int8, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapFloat64Int16R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Int16V(rv.Interface().(map[float64]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Int16V(rv2i(rv).(map[float64]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -6879,7 +6879,7 @@ func (_ fastpathT) EncMapFloat64Int16V(v map[float64]int16, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat64Int32R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Int32V(rv.Interface().(map[float64]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Int32V(rv2i(rv).(map[float64]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -6925,7 +6925,7 @@ func (_ fastpathT) EncMapFloat64Int32V(v map[float64]int32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat64Int64R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Int64V(rv.Interface().(map[float64]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Int64V(rv2i(rv).(map[float64]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -6971,7 +6971,7 @@ func (_ fastpathT) EncMapFloat64Int64V(v map[float64]int64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapFloat64Float32R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Float32V(rv.Interface().(map[float64]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Float32V(rv2i(rv).(map[float64]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -7017,7 +7017,7 @@ func (_ fastpathT) EncMapFloat64Float32V(v map[float64]float32, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapFloat64Float64R(rv reflect.Value) {
- fastpathTV.EncMapFloat64Float64V(rv.Interface().(map[float64]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64Float64V(rv2i(rv).(map[float64]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -7063,7 +7063,7 @@ func (_ fastpathT) EncMapFloat64Float64V(v map[float64]float64, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapFloat64BoolR(rv reflect.Value) {
- fastpathTV.EncMapFloat64BoolV(rv.Interface().(map[float64]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapFloat64BoolV(rv2i(rv).(map[float64]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -7109,7 +7109,7 @@ func (_ fastpathT) EncMapFloat64BoolV(v map[float64]bool, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUintIntfR(rv reflect.Value) {
- fastpathTV.EncMapUintIntfV(rv.Interface().(map[uint]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintIntfV(rv2i(rv).(map[uint]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -7155,7 +7155,7 @@ func (_ fastpathT) EncMapUintIntfV(v map[uint]interface{}, checkNil bool, e *Enc
}
func (f *encFnInfo) fastpathEncMapUintStringR(rv reflect.Value) {
- fastpathTV.EncMapUintStringV(rv.Interface().(map[uint]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintStringV(rv2i(rv).(map[uint]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -7201,7 +7201,7 @@ func (_ fastpathT) EncMapUintStringV(v map[uint]string, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUintUintR(rv reflect.Value) {
- fastpathTV.EncMapUintUintV(rv.Interface().(map[uint]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintUintV(rv2i(rv).(map[uint]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -7247,7 +7247,7 @@ func (_ fastpathT) EncMapUintUintV(v map[uint]uint, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapUintUint8R(rv reflect.Value) {
- fastpathTV.EncMapUintUint8V(rv.Interface().(map[uint]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintUint8V(rv2i(rv).(map[uint]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -7293,7 +7293,7 @@ func (_ fastpathT) EncMapUintUint8V(v map[uint]uint8, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUintUint16R(rv reflect.Value) {
- fastpathTV.EncMapUintUint16V(rv.Interface().(map[uint]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintUint16V(rv2i(rv).(map[uint]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -7339,7 +7339,7 @@ func (_ fastpathT) EncMapUintUint16V(v map[uint]uint16, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUintUint32R(rv reflect.Value) {
- fastpathTV.EncMapUintUint32V(rv.Interface().(map[uint]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintUint32V(rv2i(rv).(map[uint]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -7385,7 +7385,7 @@ func (_ fastpathT) EncMapUintUint32V(v map[uint]uint32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUintUint64R(rv reflect.Value) {
- fastpathTV.EncMapUintUint64V(rv.Interface().(map[uint]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintUint64V(rv2i(rv).(map[uint]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -7431,7 +7431,7 @@ func (_ fastpathT) EncMapUintUint64V(v map[uint]uint64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUintUintptrR(rv reflect.Value) {
- fastpathTV.EncMapUintUintptrV(rv.Interface().(map[uint]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintUintptrV(rv2i(rv).(map[uint]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -7477,7 +7477,7 @@ func (_ fastpathT) EncMapUintUintptrV(v map[uint]uintptr, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUintIntR(rv reflect.Value) {
- fastpathTV.EncMapUintIntV(rv.Interface().(map[uint]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintIntV(rv2i(rv).(map[uint]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -7523,7 +7523,7 @@ func (_ fastpathT) EncMapUintIntV(v map[uint]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapUintInt8R(rv reflect.Value) {
- fastpathTV.EncMapUintInt8V(rv.Interface().(map[uint]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintInt8V(rv2i(rv).(map[uint]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -7569,7 +7569,7 @@ func (_ fastpathT) EncMapUintInt8V(v map[uint]int8, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapUintInt16R(rv reflect.Value) {
- fastpathTV.EncMapUintInt16V(rv.Interface().(map[uint]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintInt16V(rv2i(rv).(map[uint]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -7615,7 +7615,7 @@ func (_ fastpathT) EncMapUintInt16V(v map[uint]int16, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUintInt32R(rv reflect.Value) {
- fastpathTV.EncMapUintInt32V(rv.Interface().(map[uint]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintInt32V(rv2i(rv).(map[uint]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -7661,7 +7661,7 @@ func (_ fastpathT) EncMapUintInt32V(v map[uint]int32, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUintInt64R(rv reflect.Value) {
- fastpathTV.EncMapUintInt64V(rv.Interface().(map[uint]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintInt64V(rv2i(rv).(map[uint]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -7707,7 +7707,7 @@ func (_ fastpathT) EncMapUintInt64V(v map[uint]int64, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUintFloat32R(rv reflect.Value) {
- fastpathTV.EncMapUintFloat32V(rv.Interface().(map[uint]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintFloat32V(rv2i(rv).(map[uint]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -7753,7 +7753,7 @@ func (_ fastpathT) EncMapUintFloat32V(v map[uint]float32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUintFloat64R(rv reflect.Value) {
- fastpathTV.EncMapUintFloat64V(rv.Interface().(map[uint]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintFloat64V(rv2i(rv).(map[uint]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -7799,7 +7799,7 @@ func (_ fastpathT) EncMapUintFloat64V(v map[uint]float64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUintBoolR(rv reflect.Value) {
- fastpathTV.EncMapUintBoolV(rv.Interface().(map[uint]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintBoolV(rv2i(rv).(map[uint]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -7845,7 +7845,7 @@ func (_ fastpathT) EncMapUintBoolV(v map[uint]bool, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapUint8IntfR(rv reflect.Value) {
- fastpathTV.EncMapUint8IntfV(rv.Interface().(map[uint8]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8IntfV(rv2i(rv).(map[uint8]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -7891,7 +7891,7 @@ func (_ fastpathT) EncMapUint8IntfV(v map[uint8]interface{}, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapUint8StringR(rv reflect.Value) {
- fastpathTV.EncMapUint8StringV(rv.Interface().(map[uint8]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8StringV(rv2i(rv).(map[uint8]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -7937,7 +7937,7 @@ func (_ fastpathT) EncMapUint8StringV(v map[uint8]string, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint8UintR(rv reflect.Value) {
- fastpathTV.EncMapUint8UintV(rv.Interface().(map[uint8]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8UintV(rv2i(rv).(map[uint8]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -7983,7 +7983,7 @@ func (_ fastpathT) EncMapUint8UintV(v map[uint8]uint, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUint8Uint8R(rv reflect.Value) {
- fastpathTV.EncMapUint8Uint8V(rv.Interface().(map[uint8]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Uint8V(rv2i(rv).(map[uint8]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -8029,7 +8029,7 @@ func (_ fastpathT) EncMapUint8Uint8V(v map[uint8]uint8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint8Uint16R(rv reflect.Value) {
- fastpathTV.EncMapUint8Uint16V(rv.Interface().(map[uint8]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Uint16V(rv2i(rv).(map[uint8]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -8075,7 +8075,7 @@ func (_ fastpathT) EncMapUint8Uint16V(v map[uint8]uint16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint8Uint32R(rv reflect.Value) {
- fastpathTV.EncMapUint8Uint32V(rv.Interface().(map[uint8]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Uint32V(rv2i(rv).(map[uint8]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -8121,7 +8121,7 @@ func (_ fastpathT) EncMapUint8Uint32V(v map[uint8]uint32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint8Uint64R(rv reflect.Value) {
- fastpathTV.EncMapUint8Uint64V(rv.Interface().(map[uint8]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Uint64V(rv2i(rv).(map[uint8]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -8167,7 +8167,7 @@ func (_ fastpathT) EncMapUint8Uint64V(v map[uint8]uint64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint8UintptrR(rv reflect.Value) {
- fastpathTV.EncMapUint8UintptrV(rv.Interface().(map[uint8]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8UintptrV(rv2i(rv).(map[uint8]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -8213,7 +8213,7 @@ func (_ fastpathT) EncMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint8IntR(rv reflect.Value) {
- fastpathTV.EncMapUint8IntV(rv.Interface().(map[uint8]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8IntV(rv2i(rv).(map[uint8]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -8259,7 +8259,7 @@ func (_ fastpathT) EncMapUint8IntV(v map[uint8]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapUint8Int8R(rv reflect.Value) {
- fastpathTV.EncMapUint8Int8V(rv.Interface().(map[uint8]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Int8V(rv2i(rv).(map[uint8]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -8305,7 +8305,7 @@ func (_ fastpathT) EncMapUint8Int8V(v map[uint8]int8, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUint8Int16R(rv reflect.Value) {
- fastpathTV.EncMapUint8Int16V(rv.Interface().(map[uint8]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Int16V(rv2i(rv).(map[uint8]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -8351,7 +8351,7 @@ func (_ fastpathT) EncMapUint8Int16V(v map[uint8]int16, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint8Int32R(rv reflect.Value) {
- fastpathTV.EncMapUint8Int32V(rv.Interface().(map[uint8]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Int32V(rv2i(rv).(map[uint8]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -8397,7 +8397,7 @@ func (_ fastpathT) EncMapUint8Int32V(v map[uint8]int32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint8Int64R(rv reflect.Value) {
- fastpathTV.EncMapUint8Int64V(rv.Interface().(map[uint8]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Int64V(rv2i(rv).(map[uint8]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -8443,7 +8443,7 @@ func (_ fastpathT) EncMapUint8Int64V(v map[uint8]int64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint8Float32R(rv reflect.Value) {
- fastpathTV.EncMapUint8Float32V(rv.Interface().(map[uint8]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Float32V(rv2i(rv).(map[uint8]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -8489,7 +8489,7 @@ func (_ fastpathT) EncMapUint8Float32V(v map[uint8]float32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint8Float64R(rv reflect.Value) {
- fastpathTV.EncMapUint8Float64V(rv.Interface().(map[uint8]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8Float64V(rv2i(rv).(map[uint8]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -8535,7 +8535,7 @@ func (_ fastpathT) EncMapUint8Float64V(v map[uint8]float64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint8BoolR(rv reflect.Value) {
- fastpathTV.EncMapUint8BoolV(rv.Interface().(map[uint8]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint8BoolV(rv2i(rv).(map[uint8]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -8581,7 +8581,7 @@ func (_ fastpathT) EncMapUint8BoolV(v map[uint8]bool, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUint16IntfR(rv reflect.Value) {
- fastpathTV.EncMapUint16IntfV(rv.Interface().(map[uint16]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16IntfV(rv2i(rv).(map[uint16]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -8627,7 +8627,7 @@ func (_ fastpathT) EncMapUint16IntfV(v map[uint16]interface{}, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapUint16StringR(rv reflect.Value) {
- fastpathTV.EncMapUint16StringV(rv.Interface().(map[uint16]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16StringV(rv2i(rv).(map[uint16]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -8673,7 +8673,7 @@ func (_ fastpathT) EncMapUint16StringV(v map[uint16]string, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint16UintR(rv reflect.Value) {
- fastpathTV.EncMapUint16UintV(rv.Interface().(map[uint16]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16UintV(rv2i(rv).(map[uint16]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -8719,7 +8719,7 @@ func (_ fastpathT) EncMapUint16UintV(v map[uint16]uint, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint16Uint8R(rv reflect.Value) {
- fastpathTV.EncMapUint16Uint8V(rv.Interface().(map[uint16]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Uint8V(rv2i(rv).(map[uint16]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -8765,7 +8765,7 @@ func (_ fastpathT) EncMapUint16Uint8V(v map[uint16]uint8, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint16Uint16R(rv reflect.Value) {
- fastpathTV.EncMapUint16Uint16V(rv.Interface().(map[uint16]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Uint16V(rv2i(rv).(map[uint16]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -8811,7 +8811,7 @@ func (_ fastpathT) EncMapUint16Uint16V(v map[uint16]uint16, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint16Uint32R(rv reflect.Value) {
- fastpathTV.EncMapUint16Uint32V(rv.Interface().(map[uint16]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Uint32V(rv2i(rv).(map[uint16]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -8857,7 +8857,7 @@ func (_ fastpathT) EncMapUint16Uint32V(v map[uint16]uint32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint16Uint64R(rv reflect.Value) {
- fastpathTV.EncMapUint16Uint64V(rv.Interface().(map[uint16]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Uint64V(rv2i(rv).(map[uint16]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -8903,7 +8903,7 @@ func (_ fastpathT) EncMapUint16Uint64V(v map[uint16]uint64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint16UintptrR(rv reflect.Value) {
- fastpathTV.EncMapUint16UintptrV(rv.Interface().(map[uint16]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16UintptrV(rv2i(rv).(map[uint16]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -8949,7 +8949,7 @@ func (_ fastpathT) EncMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint16IntR(rv reflect.Value) {
- fastpathTV.EncMapUint16IntV(rv.Interface().(map[uint16]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16IntV(rv2i(rv).(map[uint16]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -8995,7 +8995,7 @@ func (_ fastpathT) EncMapUint16IntV(v map[uint16]int, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUint16Int8R(rv reflect.Value) {
- fastpathTV.EncMapUint16Int8V(rv.Interface().(map[uint16]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Int8V(rv2i(rv).(map[uint16]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -9041,7 +9041,7 @@ func (_ fastpathT) EncMapUint16Int8V(v map[uint16]int8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint16Int16R(rv reflect.Value) {
- fastpathTV.EncMapUint16Int16V(rv.Interface().(map[uint16]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Int16V(rv2i(rv).(map[uint16]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -9087,7 +9087,7 @@ func (_ fastpathT) EncMapUint16Int16V(v map[uint16]int16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint16Int32R(rv reflect.Value) {
- fastpathTV.EncMapUint16Int32V(rv.Interface().(map[uint16]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Int32V(rv2i(rv).(map[uint16]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -9133,7 +9133,7 @@ func (_ fastpathT) EncMapUint16Int32V(v map[uint16]int32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint16Int64R(rv reflect.Value) {
- fastpathTV.EncMapUint16Int64V(rv.Interface().(map[uint16]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Int64V(rv2i(rv).(map[uint16]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -9179,7 +9179,7 @@ func (_ fastpathT) EncMapUint16Int64V(v map[uint16]int64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint16Float32R(rv reflect.Value) {
- fastpathTV.EncMapUint16Float32V(rv.Interface().(map[uint16]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Float32V(rv2i(rv).(map[uint16]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -9225,7 +9225,7 @@ func (_ fastpathT) EncMapUint16Float32V(v map[uint16]float32, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint16Float64R(rv reflect.Value) {
- fastpathTV.EncMapUint16Float64V(rv.Interface().(map[uint16]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16Float64V(rv2i(rv).(map[uint16]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -9271,7 +9271,7 @@ func (_ fastpathT) EncMapUint16Float64V(v map[uint16]float64, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint16BoolR(rv reflect.Value) {
- fastpathTV.EncMapUint16BoolV(rv.Interface().(map[uint16]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint16BoolV(rv2i(rv).(map[uint16]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -9317,7 +9317,7 @@ func (_ fastpathT) EncMapUint16BoolV(v map[uint16]bool, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint32IntfR(rv reflect.Value) {
- fastpathTV.EncMapUint32IntfV(rv.Interface().(map[uint32]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32IntfV(rv2i(rv).(map[uint32]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -9363,7 +9363,7 @@ func (_ fastpathT) EncMapUint32IntfV(v map[uint32]interface{}, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapUint32StringR(rv reflect.Value) {
- fastpathTV.EncMapUint32StringV(rv.Interface().(map[uint32]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32StringV(rv2i(rv).(map[uint32]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -9409,7 +9409,7 @@ func (_ fastpathT) EncMapUint32StringV(v map[uint32]string, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint32UintR(rv reflect.Value) {
- fastpathTV.EncMapUint32UintV(rv.Interface().(map[uint32]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32UintV(rv2i(rv).(map[uint32]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -9455,7 +9455,7 @@ func (_ fastpathT) EncMapUint32UintV(v map[uint32]uint, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint32Uint8R(rv reflect.Value) {
- fastpathTV.EncMapUint32Uint8V(rv.Interface().(map[uint32]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Uint8V(rv2i(rv).(map[uint32]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -9501,7 +9501,7 @@ func (_ fastpathT) EncMapUint32Uint8V(v map[uint32]uint8, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint32Uint16R(rv reflect.Value) {
- fastpathTV.EncMapUint32Uint16V(rv.Interface().(map[uint32]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Uint16V(rv2i(rv).(map[uint32]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -9547,7 +9547,7 @@ func (_ fastpathT) EncMapUint32Uint16V(v map[uint32]uint16, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint32Uint32R(rv reflect.Value) {
- fastpathTV.EncMapUint32Uint32V(rv.Interface().(map[uint32]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Uint32V(rv2i(rv).(map[uint32]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -9593,7 +9593,7 @@ func (_ fastpathT) EncMapUint32Uint32V(v map[uint32]uint32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint32Uint64R(rv reflect.Value) {
- fastpathTV.EncMapUint32Uint64V(rv.Interface().(map[uint32]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Uint64V(rv2i(rv).(map[uint32]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -9639,7 +9639,7 @@ func (_ fastpathT) EncMapUint32Uint64V(v map[uint32]uint64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint32UintptrR(rv reflect.Value) {
- fastpathTV.EncMapUint32UintptrV(rv.Interface().(map[uint32]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32UintptrV(rv2i(rv).(map[uint32]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -9685,7 +9685,7 @@ func (_ fastpathT) EncMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint32IntR(rv reflect.Value) {
- fastpathTV.EncMapUint32IntV(rv.Interface().(map[uint32]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32IntV(rv2i(rv).(map[uint32]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -9731,7 +9731,7 @@ func (_ fastpathT) EncMapUint32IntV(v map[uint32]int, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUint32Int8R(rv reflect.Value) {
- fastpathTV.EncMapUint32Int8V(rv.Interface().(map[uint32]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Int8V(rv2i(rv).(map[uint32]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -9777,7 +9777,7 @@ func (_ fastpathT) EncMapUint32Int8V(v map[uint32]int8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint32Int16R(rv reflect.Value) {
- fastpathTV.EncMapUint32Int16V(rv.Interface().(map[uint32]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Int16V(rv2i(rv).(map[uint32]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -9823,7 +9823,7 @@ func (_ fastpathT) EncMapUint32Int16V(v map[uint32]int16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint32Int32R(rv reflect.Value) {
- fastpathTV.EncMapUint32Int32V(rv.Interface().(map[uint32]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Int32V(rv2i(rv).(map[uint32]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -9869,7 +9869,7 @@ func (_ fastpathT) EncMapUint32Int32V(v map[uint32]int32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint32Int64R(rv reflect.Value) {
- fastpathTV.EncMapUint32Int64V(rv.Interface().(map[uint32]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Int64V(rv2i(rv).(map[uint32]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -9915,7 +9915,7 @@ func (_ fastpathT) EncMapUint32Int64V(v map[uint32]int64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint32Float32R(rv reflect.Value) {
- fastpathTV.EncMapUint32Float32V(rv.Interface().(map[uint32]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Float32V(rv2i(rv).(map[uint32]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -9961,7 +9961,7 @@ func (_ fastpathT) EncMapUint32Float32V(v map[uint32]float32, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint32Float64R(rv reflect.Value) {
- fastpathTV.EncMapUint32Float64V(rv.Interface().(map[uint32]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32Float64V(rv2i(rv).(map[uint32]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -10007,7 +10007,7 @@ func (_ fastpathT) EncMapUint32Float64V(v map[uint32]float64, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint32BoolR(rv reflect.Value) {
- fastpathTV.EncMapUint32BoolV(rv.Interface().(map[uint32]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint32BoolV(rv2i(rv).(map[uint32]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -10053,7 +10053,7 @@ func (_ fastpathT) EncMapUint32BoolV(v map[uint32]bool, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint64IntfR(rv reflect.Value) {
- fastpathTV.EncMapUint64IntfV(rv.Interface().(map[uint64]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64IntfV(rv2i(rv).(map[uint64]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -10099,7 +10099,7 @@ func (_ fastpathT) EncMapUint64IntfV(v map[uint64]interface{}, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapUint64StringR(rv reflect.Value) {
- fastpathTV.EncMapUint64StringV(rv.Interface().(map[uint64]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64StringV(rv2i(rv).(map[uint64]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -10145,7 +10145,7 @@ func (_ fastpathT) EncMapUint64StringV(v map[uint64]string, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint64UintR(rv reflect.Value) {
- fastpathTV.EncMapUint64UintV(rv.Interface().(map[uint64]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64UintV(rv2i(rv).(map[uint64]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -10191,7 +10191,7 @@ func (_ fastpathT) EncMapUint64UintV(v map[uint64]uint, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint64Uint8R(rv reflect.Value) {
- fastpathTV.EncMapUint64Uint8V(rv.Interface().(map[uint64]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Uint8V(rv2i(rv).(map[uint64]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -10237,7 +10237,7 @@ func (_ fastpathT) EncMapUint64Uint8V(v map[uint64]uint8, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint64Uint16R(rv reflect.Value) {
- fastpathTV.EncMapUint64Uint16V(rv.Interface().(map[uint64]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Uint16V(rv2i(rv).(map[uint64]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -10283,7 +10283,7 @@ func (_ fastpathT) EncMapUint64Uint16V(v map[uint64]uint16, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint64Uint32R(rv reflect.Value) {
- fastpathTV.EncMapUint64Uint32V(rv.Interface().(map[uint64]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Uint32V(rv2i(rv).(map[uint64]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -10329,7 +10329,7 @@ func (_ fastpathT) EncMapUint64Uint32V(v map[uint64]uint32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint64Uint64R(rv reflect.Value) {
- fastpathTV.EncMapUint64Uint64V(rv.Interface().(map[uint64]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Uint64V(rv2i(rv).(map[uint64]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -10375,7 +10375,7 @@ func (_ fastpathT) EncMapUint64Uint64V(v map[uint64]uint64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUint64UintptrR(rv reflect.Value) {
- fastpathTV.EncMapUint64UintptrV(rv.Interface().(map[uint64]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64UintptrV(rv2i(rv).(map[uint64]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -10421,7 +10421,7 @@ func (_ fastpathT) EncMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint64IntR(rv reflect.Value) {
- fastpathTV.EncMapUint64IntV(rv.Interface().(map[uint64]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64IntV(rv2i(rv).(map[uint64]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -10467,7 +10467,7 @@ func (_ fastpathT) EncMapUint64IntV(v map[uint64]int, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapUint64Int8R(rv reflect.Value) {
- fastpathTV.EncMapUint64Int8V(rv.Interface().(map[uint64]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Int8V(rv2i(rv).(map[uint64]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -10513,7 +10513,7 @@ func (_ fastpathT) EncMapUint64Int8V(v map[uint64]int8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUint64Int16R(rv reflect.Value) {
- fastpathTV.EncMapUint64Int16V(rv.Interface().(map[uint64]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Int16V(rv2i(rv).(map[uint64]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -10559,7 +10559,7 @@ func (_ fastpathT) EncMapUint64Int16V(v map[uint64]int16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint64Int32R(rv reflect.Value) {
- fastpathTV.EncMapUint64Int32V(rv.Interface().(map[uint64]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Int32V(rv2i(rv).(map[uint64]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -10605,7 +10605,7 @@ func (_ fastpathT) EncMapUint64Int32V(v map[uint64]int32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint64Int64R(rv reflect.Value) {
- fastpathTV.EncMapUint64Int64V(rv.Interface().(map[uint64]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Int64V(rv2i(rv).(map[uint64]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -10651,7 +10651,7 @@ func (_ fastpathT) EncMapUint64Int64V(v map[uint64]int64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUint64Float32R(rv reflect.Value) {
- fastpathTV.EncMapUint64Float32V(rv.Interface().(map[uint64]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Float32V(rv2i(rv).(map[uint64]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -10697,7 +10697,7 @@ func (_ fastpathT) EncMapUint64Float32V(v map[uint64]float32, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint64Float64R(rv reflect.Value) {
- fastpathTV.EncMapUint64Float64V(rv.Interface().(map[uint64]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64Float64V(rv2i(rv).(map[uint64]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -10743,7 +10743,7 @@ func (_ fastpathT) EncMapUint64Float64V(v map[uint64]float64, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUint64BoolR(rv reflect.Value) {
- fastpathTV.EncMapUint64BoolV(rv.Interface().(map[uint64]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUint64BoolV(rv2i(rv).(map[uint64]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -10789,7 +10789,7 @@ func (_ fastpathT) EncMapUint64BoolV(v map[uint64]bool, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUintptrIntfR(rv reflect.Value) {
- fastpathTV.EncMapUintptrIntfV(rv.Interface().(map[uintptr]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrIntfV(rv2i(rv).(map[uintptr]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -10835,7 +10835,7 @@ func (_ fastpathT) EncMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool,
}
func (f *encFnInfo) fastpathEncMapUintptrStringR(rv reflect.Value) {
- fastpathTV.EncMapUintptrStringV(rv.Interface().(map[uintptr]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrStringV(rv2i(rv).(map[uintptr]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -10881,7 +10881,7 @@ func (_ fastpathT) EncMapUintptrStringV(v map[uintptr]string, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUintptrUintR(rv reflect.Value) {
- fastpathTV.EncMapUintptrUintV(rv.Interface().(map[uintptr]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrUintV(rv2i(rv).(map[uintptr]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -10927,7 +10927,7 @@ func (_ fastpathT) EncMapUintptrUintV(v map[uintptr]uint, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUintptrUint8R(rv reflect.Value) {
- fastpathTV.EncMapUintptrUint8V(rv.Interface().(map[uintptr]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrUint8V(rv2i(rv).(map[uintptr]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -10973,7 +10973,7 @@ func (_ fastpathT) EncMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUintptrUint16R(rv reflect.Value) {
- fastpathTV.EncMapUintptrUint16V(rv.Interface().(map[uintptr]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrUint16V(rv2i(rv).(map[uintptr]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -11019,7 +11019,7 @@ func (_ fastpathT) EncMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUintptrUint32R(rv reflect.Value) {
- fastpathTV.EncMapUintptrUint32V(rv.Interface().(map[uintptr]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrUint32V(rv2i(rv).(map[uintptr]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -11065,7 +11065,7 @@ func (_ fastpathT) EncMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUintptrUint64R(rv reflect.Value) {
- fastpathTV.EncMapUintptrUint64V(rv.Interface().(map[uintptr]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrUint64V(rv2i(rv).(map[uintptr]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -11111,7 +11111,7 @@ func (_ fastpathT) EncMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, e *
}
func (f *encFnInfo) fastpathEncMapUintptrUintptrR(rv reflect.Value) {
- fastpathTV.EncMapUintptrUintptrV(rv.Interface().(map[uintptr]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrUintptrV(rv2i(rv).(map[uintptr]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -11157,7 +11157,7 @@ func (_ fastpathT) EncMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapUintptrIntR(rv reflect.Value) {
- fastpathTV.EncMapUintptrIntV(rv.Interface().(map[uintptr]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrIntV(rv2i(rv).(map[uintptr]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -11203,7 +11203,7 @@ func (_ fastpathT) EncMapUintptrIntV(v map[uintptr]int, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapUintptrInt8R(rv reflect.Value) {
- fastpathTV.EncMapUintptrInt8V(rv.Interface().(map[uintptr]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrInt8V(rv2i(rv).(map[uintptr]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -11249,7 +11249,7 @@ func (_ fastpathT) EncMapUintptrInt8V(v map[uintptr]int8, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapUintptrInt16R(rv reflect.Value) {
- fastpathTV.EncMapUintptrInt16V(rv.Interface().(map[uintptr]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrInt16V(rv2i(rv).(map[uintptr]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -11295,7 +11295,7 @@ func (_ fastpathT) EncMapUintptrInt16V(v map[uintptr]int16, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUintptrInt32R(rv reflect.Value) {
- fastpathTV.EncMapUintptrInt32V(rv.Interface().(map[uintptr]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrInt32V(rv2i(rv).(map[uintptr]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -11341,7 +11341,7 @@ func (_ fastpathT) EncMapUintptrInt32V(v map[uintptr]int32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUintptrInt64R(rv reflect.Value) {
- fastpathTV.EncMapUintptrInt64V(rv.Interface().(map[uintptr]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrInt64V(rv2i(rv).(map[uintptr]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -11387,7 +11387,7 @@ func (_ fastpathT) EncMapUintptrInt64V(v map[uintptr]int64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapUintptrFloat32R(rv reflect.Value) {
- fastpathTV.EncMapUintptrFloat32V(rv.Interface().(map[uintptr]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrFloat32V(rv2i(rv).(map[uintptr]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -11433,7 +11433,7 @@ func (_ fastpathT) EncMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapUintptrFloat64R(rv reflect.Value) {
- fastpathTV.EncMapUintptrFloat64V(rv.Interface().(map[uintptr]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrFloat64V(rv2i(rv).(map[uintptr]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -11479,7 +11479,7 @@ func (_ fastpathT) EncMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, e
}
func (f *encFnInfo) fastpathEncMapUintptrBoolR(rv reflect.Value) {
- fastpathTV.EncMapUintptrBoolV(rv.Interface().(map[uintptr]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapUintptrBoolV(rv2i(rv).(map[uintptr]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -11525,7 +11525,7 @@ func (_ fastpathT) EncMapUintptrBoolV(v map[uintptr]bool, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapIntIntfR(rv reflect.Value) {
- fastpathTV.EncMapIntIntfV(rv.Interface().(map[int]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntIntfV(rv2i(rv).(map[int]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -11571,7 +11571,7 @@ func (_ fastpathT) EncMapIntIntfV(v map[int]interface{}, checkNil bool, e *Encod
}
func (f *encFnInfo) fastpathEncMapIntStringR(rv reflect.Value) {
- fastpathTV.EncMapIntStringV(rv.Interface().(map[int]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntStringV(rv2i(rv).(map[int]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -11617,7 +11617,7 @@ func (_ fastpathT) EncMapIntStringV(v map[int]string, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapIntUintR(rv reflect.Value) {
- fastpathTV.EncMapIntUintV(rv.Interface().(map[int]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntUintV(rv2i(rv).(map[int]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -11663,7 +11663,7 @@ func (_ fastpathT) EncMapIntUintV(v map[int]uint, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntUint8R(rv reflect.Value) {
- fastpathTV.EncMapIntUint8V(rv.Interface().(map[int]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntUint8V(rv2i(rv).(map[int]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -11709,7 +11709,7 @@ func (_ fastpathT) EncMapIntUint8V(v map[int]uint8, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntUint16R(rv reflect.Value) {
- fastpathTV.EncMapIntUint16V(rv.Interface().(map[int]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntUint16V(rv2i(rv).(map[int]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -11755,7 +11755,7 @@ func (_ fastpathT) EncMapIntUint16V(v map[int]uint16, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapIntUint32R(rv reflect.Value) {
- fastpathTV.EncMapIntUint32V(rv.Interface().(map[int]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntUint32V(rv2i(rv).(map[int]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -11801,7 +11801,7 @@ func (_ fastpathT) EncMapIntUint32V(v map[int]uint32, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapIntUint64R(rv reflect.Value) {
- fastpathTV.EncMapIntUint64V(rv.Interface().(map[int]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntUint64V(rv2i(rv).(map[int]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -11847,7 +11847,7 @@ func (_ fastpathT) EncMapIntUint64V(v map[int]uint64, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapIntUintptrR(rv reflect.Value) {
- fastpathTV.EncMapIntUintptrV(rv.Interface().(map[int]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntUintptrV(rv2i(rv).(map[int]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -11893,7 +11893,7 @@ func (_ fastpathT) EncMapIntUintptrV(v map[int]uintptr, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapIntIntR(rv reflect.Value) {
- fastpathTV.EncMapIntIntV(rv.Interface().(map[int]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntIntV(rv2i(rv).(map[int]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -11939,7 +11939,7 @@ func (_ fastpathT) EncMapIntIntV(v map[int]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntInt8R(rv reflect.Value) {
- fastpathTV.EncMapIntInt8V(rv.Interface().(map[int]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntInt8V(rv2i(rv).(map[int]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -11985,7 +11985,7 @@ func (_ fastpathT) EncMapIntInt8V(v map[int]int8, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntInt16R(rv reflect.Value) {
- fastpathTV.EncMapIntInt16V(rv.Interface().(map[int]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntInt16V(rv2i(rv).(map[int]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -12031,7 +12031,7 @@ func (_ fastpathT) EncMapIntInt16V(v map[int]int16, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntInt32R(rv reflect.Value) {
- fastpathTV.EncMapIntInt32V(rv.Interface().(map[int]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntInt32V(rv2i(rv).(map[int]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -12077,7 +12077,7 @@ func (_ fastpathT) EncMapIntInt32V(v map[int]int32, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntInt64R(rv reflect.Value) {
- fastpathTV.EncMapIntInt64V(rv.Interface().(map[int]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntInt64V(rv2i(rv).(map[int]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -12123,7 +12123,7 @@ func (_ fastpathT) EncMapIntInt64V(v map[int]int64, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapIntFloat32R(rv reflect.Value) {
- fastpathTV.EncMapIntFloat32V(rv.Interface().(map[int]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntFloat32V(rv2i(rv).(map[int]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -12169,7 +12169,7 @@ func (_ fastpathT) EncMapIntFloat32V(v map[int]float32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapIntFloat64R(rv reflect.Value) {
- fastpathTV.EncMapIntFloat64V(rv.Interface().(map[int]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntFloat64V(rv2i(rv).(map[int]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -12215,7 +12215,7 @@ func (_ fastpathT) EncMapIntFloat64V(v map[int]float64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapIntBoolR(rv reflect.Value) {
- fastpathTV.EncMapIntBoolV(rv.Interface().(map[int]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapIntBoolV(rv2i(rv).(map[int]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -12261,7 +12261,7 @@ func (_ fastpathT) EncMapIntBoolV(v map[int]bool, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt8IntfR(rv reflect.Value) {
- fastpathTV.EncMapInt8IntfV(rv.Interface().(map[int8]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8IntfV(rv2i(rv).(map[int8]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -12307,7 +12307,7 @@ func (_ fastpathT) EncMapInt8IntfV(v map[int8]interface{}, checkNil bool, e *Enc
}
func (f *encFnInfo) fastpathEncMapInt8StringR(rv reflect.Value) {
- fastpathTV.EncMapInt8StringV(rv.Interface().(map[int8]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8StringV(rv2i(rv).(map[int8]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -12353,7 +12353,7 @@ func (_ fastpathT) EncMapInt8StringV(v map[int8]string, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt8UintR(rv reflect.Value) {
- fastpathTV.EncMapInt8UintV(rv.Interface().(map[int8]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8UintV(rv2i(rv).(map[int8]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -12399,7 +12399,7 @@ func (_ fastpathT) EncMapInt8UintV(v map[int8]uint, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt8Uint8R(rv reflect.Value) {
- fastpathTV.EncMapInt8Uint8V(rv.Interface().(map[int8]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Uint8V(rv2i(rv).(map[int8]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -12445,7 +12445,7 @@ func (_ fastpathT) EncMapInt8Uint8V(v map[int8]uint8, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt8Uint16R(rv reflect.Value) {
- fastpathTV.EncMapInt8Uint16V(rv.Interface().(map[int8]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Uint16V(rv2i(rv).(map[int8]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -12491,7 +12491,7 @@ func (_ fastpathT) EncMapInt8Uint16V(v map[int8]uint16, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt8Uint32R(rv reflect.Value) {
- fastpathTV.EncMapInt8Uint32V(rv.Interface().(map[int8]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Uint32V(rv2i(rv).(map[int8]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -12537,7 +12537,7 @@ func (_ fastpathT) EncMapInt8Uint32V(v map[int8]uint32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt8Uint64R(rv reflect.Value) {
- fastpathTV.EncMapInt8Uint64V(rv.Interface().(map[int8]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Uint64V(rv2i(rv).(map[int8]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -12583,7 +12583,7 @@ func (_ fastpathT) EncMapInt8Uint64V(v map[int8]uint64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt8UintptrR(rv reflect.Value) {
- fastpathTV.EncMapInt8UintptrV(rv.Interface().(map[int8]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8UintptrV(rv2i(rv).(map[int8]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -12629,7 +12629,7 @@ func (_ fastpathT) EncMapInt8UintptrV(v map[int8]uintptr, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt8IntR(rv reflect.Value) {
- fastpathTV.EncMapInt8IntV(rv.Interface().(map[int8]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8IntV(rv2i(rv).(map[int8]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -12675,7 +12675,7 @@ func (_ fastpathT) EncMapInt8IntV(v map[int8]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt8Int8R(rv reflect.Value) {
- fastpathTV.EncMapInt8Int8V(rv.Interface().(map[int8]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Int8V(rv2i(rv).(map[int8]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -12721,7 +12721,7 @@ func (_ fastpathT) EncMapInt8Int8V(v map[int8]int8, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt8Int16R(rv reflect.Value) {
- fastpathTV.EncMapInt8Int16V(rv.Interface().(map[int8]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Int16V(rv2i(rv).(map[int8]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -12767,7 +12767,7 @@ func (_ fastpathT) EncMapInt8Int16V(v map[int8]int16, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt8Int32R(rv reflect.Value) {
- fastpathTV.EncMapInt8Int32V(rv.Interface().(map[int8]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Int32V(rv2i(rv).(map[int8]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -12813,7 +12813,7 @@ func (_ fastpathT) EncMapInt8Int32V(v map[int8]int32, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt8Int64R(rv reflect.Value) {
- fastpathTV.EncMapInt8Int64V(rv.Interface().(map[int8]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Int64V(rv2i(rv).(map[int8]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -12859,7 +12859,7 @@ func (_ fastpathT) EncMapInt8Int64V(v map[int8]int64, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt8Float32R(rv reflect.Value) {
- fastpathTV.EncMapInt8Float32V(rv.Interface().(map[int8]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Float32V(rv2i(rv).(map[int8]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -12905,7 +12905,7 @@ func (_ fastpathT) EncMapInt8Float32V(v map[int8]float32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt8Float64R(rv reflect.Value) {
- fastpathTV.EncMapInt8Float64V(rv.Interface().(map[int8]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8Float64V(rv2i(rv).(map[int8]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -12951,7 +12951,7 @@ func (_ fastpathT) EncMapInt8Float64V(v map[int8]float64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt8BoolR(rv reflect.Value) {
- fastpathTV.EncMapInt8BoolV(rv.Interface().(map[int8]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt8BoolV(rv2i(rv).(map[int8]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -12997,7 +12997,7 @@ func (_ fastpathT) EncMapInt8BoolV(v map[int8]bool, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt16IntfR(rv reflect.Value) {
- fastpathTV.EncMapInt16IntfV(rv.Interface().(map[int16]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16IntfV(rv2i(rv).(map[int16]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -13043,7 +13043,7 @@ func (_ fastpathT) EncMapInt16IntfV(v map[int16]interface{}, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapInt16StringR(rv reflect.Value) {
- fastpathTV.EncMapInt16StringV(rv.Interface().(map[int16]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16StringV(rv2i(rv).(map[int16]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -13089,7 +13089,7 @@ func (_ fastpathT) EncMapInt16StringV(v map[int16]string, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt16UintR(rv reflect.Value) {
- fastpathTV.EncMapInt16UintV(rv.Interface().(map[int16]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16UintV(rv2i(rv).(map[int16]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -13135,7 +13135,7 @@ func (_ fastpathT) EncMapInt16UintV(v map[int16]uint, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt16Uint8R(rv reflect.Value) {
- fastpathTV.EncMapInt16Uint8V(rv.Interface().(map[int16]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Uint8V(rv2i(rv).(map[int16]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -13181,7 +13181,7 @@ func (_ fastpathT) EncMapInt16Uint8V(v map[int16]uint8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt16Uint16R(rv reflect.Value) {
- fastpathTV.EncMapInt16Uint16V(rv.Interface().(map[int16]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Uint16V(rv2i(rv).(map[int16]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -13227,7 +13227,7 @@ func (_ fastpathT) EncMapInt16Uint16V(v map[int16]uint16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt16Uint32R(rv reflect.Value) {
- fastpathTV.EncMapInt16Uint32V(rv.Interface().(map[int16]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Uint32V(rv2i(rv).(map[int16]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -13273,7 +13273,7 @@ func (_ fastpathT) EncMapInt16Uint32V(v map[int16]uint32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt16Uint64R(rv reflect.Value) {
- fastpathTV.EncMapInt16Uint64V(rv.Interface().(map[int16]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Uint64V(rv2i(rv).(map[int16]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -13319,7 +13319,7 @@ func (_ fastpathT) EncMapInt16Uint64V(v map[int16]uint64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt16UintptrR(rv reflect.Value) {
- fastpathTV.EncMapInt16UintptrV(rv.Interface().(map[int16]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16UintptrV(rv2i(rv).(map[int16]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -13365,7 +13365,7 @@ func (_ fastpathT) EncMapInt16UintptrV(v map[int16]uintptr, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt16IntR(rv reflect.Value) {
- fastpathTV.EncMapInt16IntV(rv.Interface().(map[int16]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16IntV(rv2i(rv).(map[int16]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -13411,7 +13411,7 @@ func (_ fastpathT) EncMapInt16IntV(v map[int16]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt16Int8R(rv reflect.Value) {
- fastpathTV.EncMapInt16Int8V(rv.Interface().(map[int16]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Int8V(rv2i(rv).(map[int16]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -13457,7 +13457,7 @@ func (_ fastpathT) EncMapInt16Int8V(v map[int16]int8, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt16Int16R(rv reflect.Value) {
- fastpathTV.EncMapInt16Int16V(rv.Interface().(map[int16]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Int16V(rv2i(rv).(map[int16]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -13503,7 +13503,7 @@ func (_ fastpathT) EncMapInt16Int16V(v map[int16]int16, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt16Int32R(rv reflect.Value) {
- fastpathTV.EncMapInt16Int32V(rv.Interface().(map[int16]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Int32V(rv2i(rv).(map[int16]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -13549,7 +13549,7 @@ func (_ fastpathT) EncMapInt16Int32V(v map[int16]int32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt16Int64R(rv reflect.Value) {
- fastpathTV.EncMapInt16Int64V(rv.Interface().(map[int16]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Int64V(rv2i(rv).(map[int16]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -13595,7 +13595,7 @@ func (_ fastpathT) EncMapInt16Int64V(v map[int16]int64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt16Float32R(rv reflect.Value) {
- fastpathTV.EncMapInt16Float32V(rv.Interface().(map[int16]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Float32V(rv2i(rv).(map[int16]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -13641,7 +13641,7 @@ func (_ fastpathT) EncMapInt16Float32V(v map[int16]float32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt16Float64R(rv reflect.Value) {
- fastpathTV.EncMapInt16Float64V(rv.Interface().(map[int16]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16Float64V(rv2i(rv).(map[int16]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -13687,7 +13687,7 @@ func (_ fastpathT) EncMapInt16Float64V(v map[int16]float64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt16BoolR(rv reflect.Value) {
- fastpathTV.EncMapInt16BoolV(rv.Interface().(map[int16]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt16BoolV(rv2i(rv).(map[int16]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -13733,7 +13733,7 @@ func (_ fastpathT) EncMapInt16BoolV(v map[int16]bool, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt32IntfR(rv reflect.Value) {
- fastpathTV.EncMapInt32IntfV(rv.Interface().(map[int32]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32IntfV(rv2i(rv).(map[int32]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -13779,7 +13779,7 @@ func (_ fastpathT) EncMapInt32IntfV(v map[int32]interface{}, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapInt32StringR(rv reflect.Value) {
- fastpathTV.EncMapInt32StringV(rv.Interface().(map[int32]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32StringV(rv2i(rv).(map[int32]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -13825,7 +13825,7 @@ func (_ fastpathT) EncMapInt32StringV(v map[int32]string, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt32UintR(rv reflect.Value) {
- fastpathTV.EncMapInt32UintV(rv.Interface().(map[int32]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32UintV(rv2i(rv).(map[int32]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -13871,7 +13871,7 @@ func (_ fastpathT) EncMapInt32UintV(v map[int32]uint, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt32Uint8R(rv reflect.Value) {
- fastpathTV.EncMapInt32Uint8V(rv.Interface().(map[int32]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Uint8V(rv2i(rv).(map[int32]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -13917,7 +13917,7 @@ func (_ fastpathT) EncMapInt32Uint8V(v map[int32]uint8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt32Uint16R(rv reflect.Value) {
- fastpathTV.EncMapInt32Uint16V(rv.Interface().(map[int32]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Uint16V(rv2i(rv).(map[int32]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -13963,7 +13963,7 @@ func (_ fastpathT) EncMapInt32Uint16V(v map[int32]uint16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt32Uint32R(rv reflect.Value) {
- fastpathTV.EncMapInt32Uint32V(rv.Interface().(map[int32]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Uint32V(rv2i(rv).(map[int32]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -14009,7 +14009,7 @@ func (_ fastpathT) EncMapInt32Uint32V(v map[int32]uint32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt32Uint64R(rv reflect.Value) {
- fastpathTV.EncMapInt32Uint64V(rv.Interface().(map[int32]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Uint64V(rv2i(rv).(map[int32]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -14055,7 +14055,7 @@ func (_ fastpathT) EncMapInt32Uint64V(v map[int32]uint64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt32UintptrR(rv reflect.Value) {
- fastpathTV.EncMapInt32UintptrV(rv.Interface().(map[int32]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32UintptrV(rv2i(rv).(map[int32]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -14101,7 +14101,7 @@ func (_ fastpathT) EncMapInt32UintptrV(v map[int32]uintptr, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt32IntR(rv reflect.Value) {
- fastpathTV.EncMapInt32IntV(rv.Interface().(map[int32]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32IntV(rv2i(rv).(map[int32]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -14147,7 +14147,7 @@ func (_ fastpathT) EncMapInt32IntV(v map[int32]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt32Int8R(rv reflect.Value) {
- fastpathTV.EncMapInt32Int8V(rv.Interface().(map[int32]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Int8V(rv2i(rv).(map[int32]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -14193,7 +14193,7 @@ func (_ fastpathT) EncMapInt32Int8V(v map[int32]int8, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt32Int16R(rv reflect.Value) {
- fastpathTV.EncMapInt32Int16V(rv.Interface().(map[int32]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Int16V(rv2i(rv).(map[int32]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -14239,7 +14239,7 @@ func (_ fastpathT) EncMapInt32Int16V(v map[int32]int16, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt32Int32R(rv reflect.Value) {
- fastpathTV.EncMapInt32Int32V(rv.Interface().(map[int32]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Int32V(rv2i(rv).(map[int32]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -14285,7 +14285,7 @@ func (_ fastpathT) EncMapInt32Int32V(v map[int32]int32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt32Int64R(rv reflect.Value) {
- fastpathTV.EncMapInt32Int64V(rv.Interface().(map[int32]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Int64V(rv2i(rv).(map[int32]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -14331,7 +14331,7 @@ func (_ fastpathT) EncMapInt32Int64V(v map[int32]int64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt32Float32R(rv reflect.Value) {
- fastpathTV.EncMapInt32Float32V(rv.Interface().(map[int32]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Float32V(rv2i(rv).(map[int32]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -14377,7 +14377,7 @@ func (_ fastpathT) EncMapInt32Float32V(v map[int32]float32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt32Float64R(rv reflect.Value) {
- fastpathTV.EncMapInt32Float64V(rv.Interface().(map[int32]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32Float64V(rv2i(rv).(map[int32]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -14423,7 +14423,7 @@ func (_ fastpathT) EncMapInt32Float64V(v map[int32]float64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt32BoolR(rv reflect.Value) {
- fastpathTV.EncMapInt32BoolV(rv.Interface().(map[int32]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt32BoolV(rv2i(rv).(map[int32]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -14469,7 +14469,7 @@ func (_ fastpathT) EncMapInt32BoolV(v map[int32]bool, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt64IntfR(rv reflect.Value) {
- fastpathTV.EncMapInt64IntfV(rv.Interface().(map[int64]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64IntfV(rv2i(rv).(map[int64]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -14515,7 +14515,7 @@ func (_ fastpathT) EncMapInt64IntfV(v map[int64]interface{}, checkNil bool, e *E
}
func (f *encFnInfo) fastpathEncMapInt64StringR(rv reflect.Value) {
- fastpathTV.EncMapInt64StringV(rv.Interface().(map[int64]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64StringV(rv2i(rv).(map[int64]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -14561,7 +14561,7 @@ func (_ fastpathT) EncMapInt64StringV(v map[int64]string, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt64UintR(rv reflect.Value) {
- fastpathTV.EncMapInt64UintV(rv.Interface().(map[int64]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64UintV(rv2i(rv).(map[int64]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -14607,7 +14607,7 @@ func (_ fastpathT) EncMapInt64UintV(v map[int64]uint, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt64Uint8R(rv reflect.Value) {
- fastpathTV.EncMapInt64Uint8V(rv.Interface().(map[int64]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Uint8V(rv2i(rv).(map[int64]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -14653,7 +14653,7 @@ func (_ fastpathT) EncMapInt64Uint8V(v map[int64]uint8, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt64Uint16R(rv reflect.Value) {
- fastpathTV.EncMapInt64Uint16V(rv.Interface().(map[int64]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Uint16V(rv2i(rv).(map[int64]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -14699,7 +14699,7 @@ func (_ fastpathT) EncMapInt64Uint16V(v map[int64]uint16, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt64Uint32R(rv reflect.Value) {
- fastpathTV.EncMapInt64Uint32V(rv.Interface().(map[int64]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Uint32V(rv2i(rv).(map[int64]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -14745,7 +14745,7 @@ func (_ fastpathT) EncMapInt64Uint32V(v map[int64]uint32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt64Uint64R(rv reflect.Value) {
- fastpathTV.EncMapInt64Uint64V(rv.Interface().(map[int64]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Uint64V(rv2i(rv).(map[int64]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -14791,7 +14791,7 @@ func (_ fastpathT) EncMapInt64Uint64V(v map[int64]uint64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapInt64UintptrR(rv reflect.Value) {
- fastpathTV.EncMapInt64UintptrV(rv.Interface().(map[int64]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64UintptrV(rv2i(rv).(map[int64]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -14837,7 +14837,7 @@ func (_ fastpathT) EncMapInt64UintptrV(v map[int64]uintptr, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt64IntR(rv reflect.Value) {
- fastpathTV.EncMapInt64IntV(rv.Interface().(map[int64]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64IntV(rv2i(rv).(map[int64]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -14883,7 +14883,7 @@ func (_ fastpathT) EncMapInt64IntV(v map[int64]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapInt64Int8R(rv reflect.Value) {
- fastpathTV.EncMapInt64Int8V(rv.Interface().(map[int64]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Int8V(rv2i(rv).(map[int64]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -14929,7 +14929,7 @@ func (_ fastpathT) EncMapInt64Int8V(v map[int64]int8, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapInt64Int16R(rv reflect.Value) {
- fastpathTV.EncMapInt64Int16V(rv.Interface().(map[int64]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Int16V(rv2i(rv).(map[int64]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -14975,7 +14975,7 @@ func (_ fastpathT) EncMapInt64Int16V(v map[int64]int16, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt64Int32R(rv reflect.Value) {
- fastpathTV.EncMapInt64Int32V(rv.Interface().(map[int64]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Int32V(rv2i(rv).(map[int64]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -15021,7 +15021,7 @@ func (_ fastpathT) EncMapInt64Int32V(v map[int64]int32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt64Int64R(rv reflect.Value) {
- fastpathTV.EncMapInt64Int64V(rv.Interface().(map[int64]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Int64V(rv2i(rv).(map[int64]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -15067,7 +15067,7 @@ func (_ fastpathT) EncMapInt64Int64V(v map[int64]int64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapInt64Float32R(rv reflect.Value) {
- fastpathTV.EncMapInt64Float32V(rv.Interface().(map[int64]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Float32V(rv2i(rv).(map[int64]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -15113,7 +15113,7 @@ func (_ fastpathT) EncMapInt64Float32V(v map[int64]float32, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt64Float64R(rv reflect.Value) {
- fastpathTV.EncMapInt64Float64V(rv.Interface().(map[int64]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64Float64V(rv2i(rv).(map[int64]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -15159,7 +15159,7 @@ func (_ fastpathT) EncMapInt64Float64V(v map[int64]float64, checkNil bool, e *En
}
func (f *encFnInfo) fastpathEncMapInt64BoolR(rv reflect.Value) {
- fastpathTV.EncMapInt64BoolV(rv.Interface().(map[int64]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapInt64BoolV(rv2i(rv).(map[int64]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -15205,7 +15205,7 @@ func (_ fastpathT) EncMapInt64BoolV(v map[int64]bool, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapBoolIntfR(rv reflect.Value) {
- fastpathTV.EncMapBoolIntfV(rv.Interface().(map[bool]interface{}), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolIntfV(rv2i(rv).(map[bool]interface{}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Encoder) {
ee := e.e
@@ -15251,7 +15251,7 @@ func (_ fastpathT) EncMapBoolIntfV(v map[bool]interface{}, checkNil bool, e *Enc
}
func (f *encFnInfo) fastpathEncMapBoolStringR(rv reflect.Value) {
- fastpathTV.EncMapBoolStringV(rv.Interface().(map[bool]string), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolStringV(rv2i(rv).(map[bool]string), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encoder) {
ee := e.e
@@ -15297,7 +15297,7 @@ func (_ fastpathT) EncMapBoolStringV(v map[bool]string, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapBoolUintR(rv reflect.Value) {
- fastpathTV.EncMapBoolUintV(rv.Interface().(map[bool]uint), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolUintV(rv2i(rv).(map[bool]uint), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) {
ee := e.e
@@ -15343,7 +15343,7 @@ func (_ fastpathT) EncMapBoolUintV(v map[bool]uint, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapBoolUint8R(rv reflect.Value) {
- fastpathTV.EncMapBoolUint8V(rv.Interface().(map[bool]uint8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolUint8V(rv2i(rv).(map[bool]uint8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder) {
ee := e.e
@@ -15389,7 +15389,7 @@ func (_ fastpathT) EncMapBoolUint8V(v map[bool]uint8, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapBoolUint16R(rv reflect.Value) {
- fastpathTV.EncMapBoolUint16V(rv.Interface().(map[bool]uint16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolUint16V(rv2i(rv).(map[bool]uint16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encoder) {
ee := e.e
@@ -15435,7 +15435,7 @@ func (_ fastpathT) EncMapBoolUint16V(v map[bool]uint16, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapBoolUint32R(rv reflect.Value) {
- fastpathTV.EncMapBoolUint32V(rv.Interface().(map[bool]uint32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolUint32V(rv2i(rv).(map[bool]uint32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encoder) {
ee := e.e
@@ -15481,7 +15481,7 @@ func (_ fastpathT) EncMapBoolUint32V(v map[bool]uint32, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapBoolUint64R(rv reflect.Value) {
- fastpathTV.EncMapBoolUint64V(rv.Interface().(map[bool]uint64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolUint64V(rv2i(rv).(map[bool]uint64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encoder) {
ee := e.e
@@ -15527,7 +15527,7 @@ func (_ fastpathT) EncMapBoolUint64V(v map[bool]uint64, checkNil bool, e *Encode
}
func (f *encFnInfo) fastpathEncMapBoolUintptrR(rv reflect.Value) {
- fastpathTV.EncMapBoolUintptrV(rv.Interface().(map[bool]uintptr), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolUintptrV(rv2i(rv).(map[bool]uintptr), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Encoder) {
ee := e.e
@@ -15573,7 +15573,7 @@ func (_ fastpathT) EncMapBoolUintptrV(v map[bool]uintptr, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapBoolIntR(rv reflect.Value) {
- fastpathTV.EncMapBoolIntV(rv.Interface().(map[bool]int), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolIntV(rv2i(rv).(map[bool]int), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) {
ee := e.e
@@ -15619,7 +15619,7 @@ func (_ fastpathT) EncMapBoolIntV(v map[bool]int, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapBoolInt8R(rv reflect.Value) {
- fastpathTV.EncMapBoolInt8V(rv.Interface().(map[bool]int8), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolInt8V(rv2i(rv).(map[bool]int8), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) {
ee := e.e
@@ -15665,7 +15665,7 @@ func (_ fastpathT) EncMapBoolInt8V(v map[bool]int8, checkNil bool, e *Encoder) {
}
func (f *encFnInfo) fastpathEncMapBoolInt16R(rv reflect.Value) {
- fastpathTV.EncMapBoolInt16V(rv.Interface().(map[bool]int16), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolInt16V(rv2i(rv).(map[bool]int16), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder) {
ee := e.e
@@ -15711,7 +15711,7 @@ func (_ fastpathT) EncMapBoolInt16V(v map[bool]int16, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapBoolInt32R(rv reflect.Value) {
- fastpathTV.EncMapBoolInt32V(rv.Interface().(map[bool]int32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolInt32V(rv2i(rv).(map[bool]int32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder) {
ee := e.e
@@ -15757,7 +15757,7 @@ func (_ fastpathT) EncMapBoolInt32V(v map[bool]int32, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapBoolInt64R(rv reflect.Value) {
- fastpathTV.EncMapBoolInt64V(rv.Interface().(map[bool]int64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolInt64V(rv2i(rv).(map[bool]int64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder) {
ee := e.e
@@ -15803,7 +15803,7 @@ func (_ fastpathT) EncMapBoolInt64V(v map[bool]int64, checkNil bool, e *Encoder)
}
func (f *encFnInfo) fastpathEncMapBoolFloat32R(rv reflect.Value) {
- fastpathTV.EncMapBoolFloat32V(rv.Interface().(map[bool]float32), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolFloat32V(rv2i(rv).(map[bool]float32), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Encoder) {
ee := e.e
@@ -15849,7 +15849,7 @@ func (_ fastpathT) EncMapBoolFloat32V(v map[bool]float32, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapBoolFloat64R(rv reflect.Value) {
- fastpathTV.EncMapBoolFloat64V(rv.Interface().(map[bool]float64), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolFloat64V(rv2i(rv).(map[bool]float64), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Encoder) {
ee := e.e
@@ -15895,7 +15895,7 @@ func (_ fastpathT) EncMapBoolFloat64V(v map[bool]float64, checkNil bool, e *Enco
}
func (f *encFnInfo) fastpathEncMapBoolBoolR(rv reflect.Value) {
- fastpathTV.EncMapBoolBoolV(rv.Interface().(map[bool]bool), fastpathCheckNilFalse, f.e)
+ fastpathTV.EncMapBoolBoolV(rv2i(rv).(map[bool]bool), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) EncMapBoolBoolV(v map[bool]bool, checkNil bool, e *Encoder) {
ee := e.e
@@ -18126,13 +18126,13 @@ func fastpathDecodeTypeSwitch(iv interface{}, d *Decoder) bool {
func (f *decFnInfo) fastpathDecSliceIntfR(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]interface{})
+ vp := rv2i(rv.Addr()).(*[]interface{})
v, changed := fastpathTV.DecSliceIntfV(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]interface{})
+ v := rv2i(rv).([]interface{})
fastpathTV.DecSliceIntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -18152,7 +18152,6 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool,
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -18167,90 +18166,58 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool,
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]interface{}, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]interface{}, 1, 4)
+ v = v[:containerLenS]
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])
-
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]interface{}, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, nil)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ d.decode(&v[j])
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]interface{}, 0)
+ changed = true
}
}
slh.End()
@@ -18260,13 +18227,13 @@ func (_ fastpathT) DecSliceIntfV(v []interface{}, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecSliceStringR(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]string)
+ vp := rv2i(rv.Addr()).(*[]string)
v, changed := fastpathTV.DecSliceStringV(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]string)
+ v := rv2i(rv).([]string)
fastpathTV.DecSliceStringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -18286,7 +18253,6 @@ func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, d
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -18301,89 +18267,58 @@ func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, d
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]string, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]string, 1, 4)
+ v = v[:containerLenS]
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()
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 16)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]string, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, "")
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = dd.DecodeString()
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]string, 0)
+ changed = true
}
}
slh.End()
@@ -18393,13 +18328,13 @@ func (_ fastpathT) DecSliceStringV(v []string, checkNil bool, canChange bool, d
func (f *decFnInfo) fastpathDecSliceFloat32R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]float32)
+ vp := rv2i(rv.Addr()).(*[]float32)
v, changed := fastpathTV.DecSliceFloat32V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]float32)
+ v := rv2i(rv).([]float32)
fastpathTV.DecSliceFloat32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -18419,7 +18354,6 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool,
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -18434,89 +18368,58 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool,
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]float32, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]float32, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]float32, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = float32(dd.DecodeFloat(true))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]float32, 0)
+ changed = true
}
}
slh.End()
@@ -18526,13 +18429,13 @@ func (_ fastpathT) DecSliceFloat32V(v []float32, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecSliceFloat64R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]float64)
+ vp := rv2i(rv.Addr()).(*[]float64)
v, changed := fastpathTV.DecSliceFloat64V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]float64)
+ v := rv2i(rv).([]float64)
fastpathTV.DecSliceFloat64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -18552,7 +18455,6 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool,
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -18567,89 +18469,58 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool,
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]float64, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]float64, 1, 4)
+ v = v[:containerLenS]
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)
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]float64, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = dd.DecodeFloat(false)
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]float64, 0)
+ changed = true
}
}
slh.End()
@@ -18659,13 +18530,13 @@ func (_ fastpathT) DecSliceFloat64V(v []float64, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecSliceUintR(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]uint)
+ vp := rv2i(rv.Addr()).(*[]uint)
v, changed := fastpathTV.DecSliceUintV(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]uint)
+ v := rv2i(rv).([]uint)
fastpathTV.DecSliceUintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -18685,7 +18556,6 @@ func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Dec
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -18700,89 +18570,58 @@ func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Dec
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]uint, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]uint, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]uint, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = uint(dd.DecodeUint(uintBitsize))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]uint, 0)
+ changed = true
}
}
slh.End()
@@ -18792,13 +18631,13 @@ func (_ fastpathT) DecSliceUintV(v []uint, checkNil bool, canChange bool, d *Dec
func (f *decFnInfo) fastpathDecSliceUint16R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]uint16)
+ vp := rv2i(rv.Addr()).(*[]uint16)
v, changed := fastpathTV.DecSliceUint16V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]uint16)
+ v := rv2i(rv).([]uint16)
fastpathTV.DecSliceUint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -18818,7 +18657,6 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -18833,89 +18671,58 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]uint16, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]uint16, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]uint16, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = uint16(dd.DecodeUint(16))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]uint16, 0)
+ changed = true
}
}
slh.End()
@@ -18925,13 +18732,13 @@ func (_ fastpathT) DecSliceUint16V(v []uint16, checkNil bool, canChange bool, d
func (f *decFnInfo) fastpathDecSliceUint32R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]uint32)
+ vp := rv2i(rv.Addr()).(*[]uint32)
v, changed := fastpathTV.DecSliceUint32V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]uint32)
+ v := rv2i(rv).([]uint32)
fastpathTV.DecSliceUint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -18951,7 +18758,6 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -18966,89 +18772,58 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]uint32, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]uint32, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]uint32, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = uint32(dd.DecodeUint(32))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]uint32, 0)
+ changed = true
}
}
slh.End()
@@ -19058,13 +18833,13 @@ func (_ fastpathT) DecSliceUint32V(v []uint32, checkNil bool, canChange bool, d
func (f *decFnInfo) fastpathDecSliceUint64R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]uint64)
+ vp := rv2i(rv.Addr()).(*[]uint64)
v, changed := fastpathTV.DecSliceUint64V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]uint64)
+ v := rv2i(rv).([]uint64)
fastpathTV.DecSliceUint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -19084,7 +18859,6 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -19099,89 +18873,58 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]uint64, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]uint64, 1, 4)
+ v = v[:containerLenS]
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)
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]uint64, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = dd.DecodeUint(64)
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]uint64, 0)
+ changed = true
}
}
slh.End()
@@ -19191,13 +18934,13 @@ func (_ fastpathT) DecSliceUint64V(v []uint64, checkNil bool, canChange bool, d
func (f *decFnInfo) fastpathDecSliceUintptrR(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]uintptr)
+ vp := rv2i(rv.Addr()).(*[]uintptr)
v, changed := fastpathTV.DecSliceUintptrV(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]uintptr)
+ v := rv2i(rv).([]uintptr)
fastpathTV.DecSliceUintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -19217,7 +18960,6 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool,
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -19232,89 +18974,58 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool,
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]uintptr, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]uintptr, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]uintptr, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = uintptr(dd.DecodeUint(uintBitsize))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]uintptr, 0)
+ changed = true
}
}
slh.End()
@@ -19324,13 +19035,13 @@ func (_ fastpathT) DecSliceUintptrV(v []uintptr, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecSliceIntR(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]int)
+ vp := rv2i(rv.Addr()).(*[]int)
v, changed := fastpathTV.DecSliceIntV(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]int)
+ v := rv2i(rv).([]int)
fastpathTV.DecSliceIntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -19350,7 +19061,6 @@ func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decod
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -19365,89 +19075,58 @@ func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decod
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]int, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]int, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]int, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = int(dd.DecodeInt(intBitsize))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]int, 0)
+ changed = true
}
}
slh.End()
@@ -19457,13 +19136,13 @@ func (_ fastpathT) DecSliceIntV(v []int, checkNil bool, canChange bool, d *Decod
func (f *decFnInfo) fastpathDecSliceInt8R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]int8)
+ vp := rv2i(rv.Addr()).(*[]int8)
v, changed := fastpathTV.DecSliceInt8V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]int8)
+ v := rv2i(rv).([]int8)
fastpathTV.DecSliceInt8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -19483,7 +19162,6 @@ func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Dec
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -19498,89 +19176,58 @@ func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Dec
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]int8, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]int8, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]int8, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = int8(dd.DecodeInt(8))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]int8, 0)
+ changed = true
}
}
slh.End()
@@ -19590,13 +19237,13 @@ func (_ fastpathT) DecSliceInt8V(v []int8, checkNil bool, canChange bool, d *Dec
func (f *decFnInfo) fastpathDecSliceInt16R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]int16)
+ vp := rv2i(rv.Addr()).(*[]int16)
v, changed := fastpathTV.DecSliceInt16V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]int16)
+ v := rv2i(rv).([]int16)
fastpathTV.DecSliceInt16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -19616,7 +19263,6 @@ func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *D
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -19631,89 +19277,58 @@ func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *D
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]int16, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]int16, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 2)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]int16, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = int16(dd.DecodeInt(16))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]int16, 0)
+ changed = true
}
}
slh.End()
@@ -19723,13 +19338,13 @@ func (_ fastpathT) DecSliceInt16V(v []int16, checkNil bool, canChange bool, d *D
func (f *decFnInfo) fastpathDecSliceInt32R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]int32)
+ vp := rv2i(rv.Addr()).(*[]int32)
v, changed := fastpathTV.DecSliceInt32V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]int32)
+ v := rv2i(rv).([]int32)
fastpathTV.DecSliceInt32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -19749,7 +19364,6 @@ func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *D
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -19764,89 +19378,58 @@ func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *D
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]int32, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]int32, 1, 4)
+ v = v[:containerLenS]
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))
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 4)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]int32, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = int32(dd.DecodeInt(32))
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]int32, 0)
+ changed = true
}
}
slh.End()
@@ -19856,13 +19439,13 @@ func (_ fastpathT) DecSliceInt32V(v []int32, checkNil bool, canChange bool, d *D
func (f *decFnInfo) fastpathDecSliceInt64R(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]int64)
+ vp := rv2i(rv.Addr()).(*[]int64)
v, changed := fastpathTV.DecSliceInt64V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]int64)
+ v := rv2i(rv).([]int64)
fastpathTV.DecSliceInt64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -19882,7 +19465,6 @@ func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *D
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -19897,89 +19479,58 @@ func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *D
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]int64, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]int64, 1, 4)
+ v = v[:containerLenS]
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)
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 8)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]int64, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, 0)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = dd.DecodeInt(64)
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]int64, 0)
+ changed = true
}
}
slh.End()
@@ -19989,13 +19540,13 @@ func (_ fastpathT) DecSliceInt64V(v []int64, checkNil bool, canChange bool, d *D
func (f *decFnInfo) fastpathDecSliceBoolR(rv reflect.Value) {
array := f.seq == seqTypeArray
if !array && rv.CanAddr() {
- vp := rv.Addr().Interface().(*[]bool)
+ vp := rv2i(rv.Addr()).(*[]bool)
v, changed := fastpathTV.DecSliceBoolV(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]bool)
+ v := rv2i(rv).([]bool)
fastpathTV.DecSliceBoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20015,7 +19566,6 @@ func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Dec
}
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
@@ -20030,89 +19580,58 @@ func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Dec
return v, changed
}
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]bool, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- if cap(v) == 0 {
- v = make([]bool, 1, 4)
+ v = v[:containerLenS]
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()
+ }
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, 1)
} else {
- d.swallow()
+ xlen = 8
}
- breakFound = dd.CheckBreak()
+ v = make([]bool, xlen)
+ changed = true
}
- if canChange && j < len(v) {
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, false)
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ v[j] = dd.DecodeBool()
+ }
+ }
+ if canChange {
+ if j < len(v) {
v = v[:j]
changed = true
+ } else if j == 0 && v == nil {
+ v = make([]bool, 0)
+ changed = true
}
}
slh.End()
@@ -20121,13 +19640,13 @@ func (_ fastpathT) DecSliceBoolV(v []bool, checkNil bool, canChange bool, d *Dec
func (f *decFnInfo) fastpathDecMapIntfIntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]interface{})
+ vp := rv2i(rv.Addr()).(*map[interface{}]interface{})
v, changed := fastpathTV.DecMapIntfIntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]interface{})
+ v := rv2i(rv).(map[interface{}]interface{})
fastpathTV.DecMapIntfIntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20148,61 +19667,42 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
v = make(map[interface{}]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20213,13 +19713,13 @@ func (_ fastpathT) DecMapIntfIntfV(v map[interface{}]interface{}, checkNil bool,
func (f *decFnInfo) fastpathDecMapIntfStringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]string)
+ vp := rv2i(rv.Addr()).(*map[interface{}]string)
v, changed := fastpathTV.DecMapIntfStringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]string)
+ v := rv2i(rv).(map[interface{}]string)
fastpathTV.DecMapIntfStringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20240,51 +19740,37 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
v = make(map[interface{}]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20295,13 +19781,13 @@ func (_ fastpathT) DecMapIntfStringV(v map[interface{}]string, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapIntfUintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]uint)
+ vp := rv2i(rv.Addr()).(*map[interface{}]uint)
v, changed := fastpathTV.DecMapIntfUintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]uint)
+ v := rv2i(rv).(map[interface{}]uint)
fastpathTV.DecMapIntfUintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20322,51 +19808,37 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canCha
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[interface{}]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20377,13 +19849,13 @@ func (_ fastpathT) DecMapIntfUintV(v map[interface{}]uint, checkNil bool, canCha
func (f *decFnInfo) fastpathDecMapIntfUint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]uint8)
+ vp := rv2i(rv.Addr()).(*map[interface{}]uint8)
v, changed := fastpathTV.DecMapIntfUint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]uint8)
+ v := rv2i(rv).(map[interface{}]uint8)
fastpathTV.DecMapIntfUint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20404,51 +19876,37 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[interface{}]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20459,13 +19917,13 @@ func (_ fastpathT) DecMapIntfUint8V(v map[interface{}]uint8, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapIntfUint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]uint16)
+ vp := rv2i(rv.Addr()).(*map[interface{}]uint16)
v, changed := fastpathTV.DecMapIntfUint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]uint16)
+ v := rv2i(rv).(map[interface{}]uint16)
fastpathTV.DecMapIntfUint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20486,51 +19944,37 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[interface{}]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20541,13 +19985,13 @@ func (_ fastpathT) DecMapIntfUint16V(v map[interface{}]uint16, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapIntfUint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]uint32)
+ vp := rv2i(rv.Addr()).(*map[interface{}]uint32)
v, changed := fastpathTV.DecMapIntfUint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]uint32)
+ v := rv2i(rv).(map[interface{}]uint32)
fastpathTV.DecMapIntfUint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20568,51 +20012,37 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[interface{}]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20623,13 +20053,13 @@ func (_ fastpathT) DecMapIntfUint32V(v map[interface{}]uint32, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapIntfUint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]uint64)
+ vp := rv2i(rv.Addr()).(*map[interface{}]uint64)
v, changed := fastpathTV.DecMapIntfUint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]uint64)
+ v := rv2i(rv).(map[interface{}]uint64)
fastpathTV.DecMapIntfUint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20650,51 +20080,37 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[interface{}]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20705,13 +20121,13 @@ func (_ fastpathT) DecMapIntfUint64V(v map[interface{}]uint64, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapIntfUintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]uintptr)
+ vp := rv2i(rv.Addr()).(*map[interface{}]uintptr)
v, changed := fastpathTV.DecMapIntfUintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]uintptr)
+ v := rv2i(rv).(map[interface{}]uintptr)
fastpathTV.DecMapIntfUintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20732,51 +20148,37 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[interface{}]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20787,13 +20189,13 @@ func (_ fastpathT) DecMapIntfUintptrV(v map[interface{}]uintptr, checkNil bool,
func (f *decFnInfo) fastpathDecMapIntfIntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]int)
+ vp := rv2i(rv.Addr()).(*map[interface{}]int)
v, changed := fastpathTV.DecMapIntfIntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]int)
+ v := rv2i(rv).(map[interface{}]int)
fastpathTV.DecMapIntfIntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20814,51 +20216,37 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChang
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[interface{}]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20869,13 +20257,13 @@ func (_ fastpathT) DecMapIntfIntV(v map[interface{}]int, checkNil bool, canChang
func (f *decFnInfo) fastpathDecMapIntfInt8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]int8)
+ vp := rv2i(rv.Addr()).(*map[interface{}]int8)
v, changed := fastpathTV.DecMapIntfInt8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]int8)
+ v := rv2i(rv).(map[interface{}]int8)
fastpathTV.DecMapIntfInt8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20896,51 +20284,37 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canCha
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[interface{}]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -20951,13 +20325,13 @@ func (_ fastpathT) DecMapIntfInt8V(v map[interface{}]int8, checkNil bool, canCha
func (f *decFnInfo) fastpathDecMapIntfInt16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]int16)
+ vp := rv2i(rv.Addr()).(*map[interface{}]int16)
v, changed := fastpathTV.DecMapIntfInt16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]int16)
+ v := rv2i(rv).(map[interface{}]int16)
fastpathTV.DecMapIntfInt16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -20978,51 +20352,37 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[interface{}]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -21033,13 +20393,13 @@ func (_ fastpathT) DecMapIntfInt16V(v map[interface{}]int16, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapIntfInt32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]int32)
+ vp := rv2i(rv.Addr()).(*map[interface{}]int32)
v, changed := fastpathTV.DecMapIntfInt32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]int32)
+ v := rv2i(rv).(map[interface{}]int32)
fastpathTV.DecMapIntfInt32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21060,51 +20420,37 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[interface{}]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -21115,13 +20461,13 @@ func (_ fastpathT) DecMapIntfInt32V(v map[interface{}]int32, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapIntfInt64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]int64)
+ vp := rv2i(rv.Addr()).(*map[interface{}]int64)
v, changed := fastpathTV.DecMapIntfInt64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]int64)
+ v := rv2i(rv).(map[interface{}]int64)
fastpathTV.DecMapIntfInt64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21142,51 +20488,37 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[interface{}]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -21197,13 +20529,13 @@ func (_ fastpathT) DecMapIntfInt64V(v map[interface{}]int64, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapIntfFloat32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]float32)
+ vp := rv2i(rv.Addr()).(*map[interface{}]float32)
v, changed := fastpathTV.DecMapIntfFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]float32)
+ v := rv2i(rv).(map[interface{}]float32)
fastpathTV.DecMapIntfFloat32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21224,51 +20556,37 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[interface{}]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -21279,13 +20597,13 @@ func (_ fastpathT) DecMapIntfFloat32V(v map[interface{}]float32, checkNil bool,
func (f *decFnInfo) fastpathDecMapIntfFloat64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]float64)
+ vp := rv2i(rv.Addr()).(*map[interface{}]float64)
v, changed := fastpathTV.DecMapIntfFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]float64)
+ v := rv2i(rv).(map[interface{}]float64)
fastpathTV.DecMapIntfFloat64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21306,51 +20624,37 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[interface{}]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -21361,13 +20665,13 @@ func (_ fastpathT) DecMapIntfFloat64V(v map[interface{}]float64, checkNil bool,
func (f *decFnInfo) fastpathDecMapIntfBoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[interface{}]bool)
+ vp := rv2i(rv.Addr()).(*map[interface{}]bool)
v, changed := fastpathTV.DecMapIntfBoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[interface{}]bool)
+ v := rv2i(rv).(map[interface{}]bool)
fastpathTV.DecMapIntfBoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21388,51 +20692,37 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canCha
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[interface{}]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -21443,13 +20733,13 @@ func (_ fastpathT) DecMapIntfBoolV(v map[interface{}]bool, checkNil bool, canCha
func (f *decFnInfo) fastpathDecMapStringIntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]interface{})
+ vp := rv2i(rv.Addr()).(*map[string]interface{})
v, changed := fastpathTV.DecMapStringIntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]interface{})
+ v := rv2i(rv).(map[string]interface{})
fastpathTV.DecMapStringIntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21470,53 +20760,38 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
v = make(map[string]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -21527,13 +20802,13 @@ func (_ fastpathT) DecMapStringIntfV(v map[string]interface{}, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapStringStringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]string)
+ vp := rv2i(rv.Addr()).(*map[string]string)
v, changed := fastpathTV.DecMapStringStringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]string)
+ v := rv2i(rv).(map[string]string)
fastpathTV.DecMapStringStringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21554,43 +20829,33 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 32)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 32)
v = make(map[string]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -21601,13 +20866,13 @@ func (_ fastpathT) DecMapStringStringV(v map[string]string, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapStringUintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]uint)
+ vp := rv2i(rv.Addr()).(*map[string]uint)
v, changed := fastpathTV.DecMapStringUintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]uint)
+ v := rv2i(rv).(map[string]uint)
fastpathTV.DecMapStringUintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21628,43 +20893,33 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[string]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -21675,13 +20930,13 @@ func (_ fastpathT) DecMapStringUintV(v map[string]uint, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapStringUint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]uint8)
+ vp := rv2i(rv.Addr()).(*map[string]uint8)
v, changed := fastpathTV.DecMapStringUint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]uint8)
+ v := rv2i(rv).(map[string]uint8)
fastpathTV.DecMapStringUint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21702,43 +20957,33 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[string]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint8(dd.DecodeUint(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -21749,13 +20994,13 @@ func (_ fastpathT) DecMapStringUint8V(v map[string]uint8, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapStringUint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]uint16)
+ vp := rv2i(rv.Addr()).(*map[string]uint16)
v, changed := fastpathTV.DecMapStringUint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]uint16)
+ v := rv2i(rv).(map[string]uint16)
fastpathTV.DecMapStringUint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21776,43 +21021,33 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[string]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint16(dd.DecodeUint(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -21823,13 +21058,13 @@ func (_ fastpathT) DecMapStringUint16V(v map[string]uint16, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapStringUint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]uint32)
+ vp := rv2i(rv.Addr()).(*map[string]uint32)
v, changed := fastpathTV.DecMapStringUint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]uint32)
+ v := rv2i(rv).(map[string]uint32)
fastpathTV.DecMapStringUint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21850,43 +21085,33 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[string]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint32(dd.DecodeUint(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -21897,13 +21122,13 @@ func (_ fastpathT) DecMapStringUint32V(v map[string]uint32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapStringUint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]uint64)
+ vp := rv2i(rv.Addr()).(*map[string]uint64)
v, changed := fastpathTV.DecMapStringUint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]uint64)
+ v := rv2i(rv).(map[string]uint64)
fastpathTV.DecMapStringUint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21924,43 +21149,33 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[string]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -21971,13 +21186,13 @@ func (_ fastpathT) DecMapStringUint64V(v map[string]uint64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapStringUintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]uintptr)
+ vp := rv2i(rv.Addr()).(*map[string]uintptr)
v, changed := fastpathTV.DecMapStringUintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]uintptr)
+ v := rv2i(rv).(map[string]uintptr)
fastpathTV.DecMapStringUintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -21998,43 +21213,33 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[string]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uintptr(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22045,13 +21250,13 @@ func (_ fastpathT) DecMapStringUintptrV(v map[string]uintptr, checkNil bool, can
func (f *decFnInfo) fastpathDecMapStringIntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]int)
+ vp := rv2i(rv.Addr()).(*map[string]int)
v, changed := fastpathTV.DecMapStringIntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]int)
+ v := rv2i(rv).(map[string]int)
fastpathTV.DecMapStringIntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22072,43 +21277,33 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[string]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int(dd.DecodeInt(intBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22119,13 +21314,13 @@ func (_ fastpathT) DecMapStringIntV(v map[string]int, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapStringInt8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]int8)
+ vp := rv2i(rv.Addr()).(*map[string]int8)
v, changed := fastpathTV.DecMapStringInt8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]int8)
+ v := rv2i(rv).(map[string]int8)
fastpathTV.DecMapStringInt8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22146,43 +21341,33 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[string]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int8(dd.DecodeInt(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22193,13 +21378,13 @@ func (_ fastpathT) DecMapStringInt8V(v map[string]int8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapStringInt16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]int16)
+ vp := rv2i(rv.Addr()).(*map[string]int16)
v, changed := fastpathTV.DecMapStringInt16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]int16)
+ v := rv2i(rv).(map[string]int16)
fastpathTV.DecMapStringInt16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22220,43 +21405,33 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[string]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int16(dd.DecodeInt(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22267,13 +21442,13 @@ func (_ fastpathT) DecMapStringInt16V(v map[string]int16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapStringInt32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]int32)
+ vp := rv2i(rv.Addr()).(*map[string]int32)
v, changed := fastpathTV.DecMapStringInt32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]int32)
+ v := rv2i(rv).(map[string]int32)
fastpathTV.DecMapStringInt32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22294,43 +21469,33 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[string]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int32(dd.DecodeInt(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22341,13 +21506,13 @@ func (_ fastpathT) DecMapStringInt32V(v map[string]int32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapStringInt64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]int64)
+ vp := rv2i(rv.Addr()).(*map[string]int64)
v, changed := fastpathTV.DecMapStringInt64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]int64)
+ v := rv2i(rv).(map[string]int64)
fastpathTV.DecMapStringInt64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22368,43 +21533,33 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[string]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22415,13 +21570,13 @@ func (_ fastpathT) DecMapStringInt64V(v map[string]int64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapStringFloat32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]float32)
+ vp := rv2i(rv.Addr()).(*map[string]float32)
v, changed := fastpathTV.DecMapStringFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]float32)
+ v := rv2i(rv).(map[string]float32)
fastpathTV.DecMapStringFloat32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22442,43 +21597,33 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[string]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = float32(dd.DecodeFloat(true))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22489,13 +21634,13 @@ func (_ fastpathT) DecMapStringFloat32V(v map[string]float32, checkNil bool, can
func (f *decFnInfo) fastpathDecMapStringFloat64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]float64)
+ vp := rv2i(rv.Addr()).(*map[string]float64)
v, changed := fastpathTV.DecMapStringFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]float64)
+ v := rv2i(rv).(map[string]float64)
fastpathTV.DecMapStringFloat64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22516,43 +21661,33 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[string]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22563,13 +21698,13 @@ func (_ fastpathT) DecMapStringFloat64V(v map[string]float64, checkNil bool, can
func (f *decFnInfo) fastpathDecMapStringBoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[string]bool)
+ vp := rv2i(rv.Addr()).(*map[string]bool)
v, changed := fastpathTV.DecMapStringBoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[string]bool)
+ v := rv2i(rv).(map[string]bool)
fastpathTV.DecMapStringBoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22590,43 +21725,33 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[string]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeString()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22637,13 +21762,13 @@ func (_ fastpathT) DecMapStringBoolV(v map[string]bool, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapFloat32IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]interface{})
+ vp := rv2i(rv.Addr()).(*map[float32]interface{})
v, changed := fastpathTV.DecMapFloat32IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]interface{})
+ v := rv2i(rv).(map[float32]interface{})
fastpathTV.DecMapFloat32IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22664,53 +21789,38 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[float32]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -22721,13 +21831,13 @@ func (_ fastpathT) DecMapFloat32IntfV(v map[float32]interface{}, checkNil bool,
func (f *decFnInfo) fastpathDecMapFloat32StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]string)
+ vp := rv2i(rv.Addr()).(*map[float32]string)
v, changed := fastpathTV.DecMapFloat32StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]string)
+ v := rv2i(rv).(map[float32]string)
fastpathTV.DecMapFloat32StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22748,43 +21858,33 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[float32]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = float32(dd.DecodeFloat(true))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -22795,13 +21895,13 @@ func (_ fastpathT) DecMapFloat32StringV(v map[float32]string, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat32UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]uint)
+ vp := rv2i(rv.Addr()).(*map[float32]uint)
v, changed := fastpathTV.DecMapFloat32UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]uint)
+ v := rv2i(rv).(map[float32]uint)
fastpathTV.DecMapFloat32UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22822,43 +21922,33 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float32]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -22869,13 +21959,13 @@ func (_ fastpathT) DecMapFloat32UintV(v map[float32]uint, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapFloat32Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]uint8)
+ vp := rv2i(rv.Addr()).(*map[float32]uint8)
v, changed := fastpathTV.DecMapFloat32Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]uint8)
+ v := rv2i(rv).(map[float32]uint8)
fastpathTV.DecMapFloat32Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22896,43 +21986,33 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[float32]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -22943,13 +22023,13 @@ func (_ fastpathT) DecMapFloat32Uint8V(v map[float32]uint8, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat32Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]uint16)
+ vp := rv2i(rv.Addr()).(*map[float32]uint16)
v, changed := fastpathTV.DecMapFloat32Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]uint16)
+ v := rv2i(rv).(map[float32]uint16)
fastpathTV.DecMapFloat32Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -22970,43 +22050,33 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[float32]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23017,13 +22087,13 @@ func (_ fastpathT) DecMapFloat32Uint16V(v map[float32]uint16, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat32Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]uint32)
+ vp := rv2i(rv.Addr()).(*map[float32]uint32)
v, changed := fastpathTV.DecMapFloat32Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]uint32)
+ v := rv2i(rv).(map[float32]uint32)
fastpathTV.DecMapFloat32Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23044,43 +22114,33 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[float32]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23091,13 +22151,13 @@ func (_ fastpathT) DecMapFloat32Uint32V(v map[float32]uint32, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat32Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]uint64)
+ vp := rv2i(rv.Addr()).(*map[float32]uint64)
v, changed := fastpathTV.DecMapFloat32Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]uint64)
+ v := rv2i(rv).(map[float32]uint64)
fastpathTV.DecMapFloat32Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23118,43 +22178,33 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float32]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = float32(dd.DecodeFloat(true))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -23165,13 +22215,13 @@ func (_ fastpathT) DecMapFloat32Uint64V(v map[float32]uint64, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat32UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]uintptr)
+ vp := rv2i(rv.Addr()).(*map[float32]uintptr)
v, changed := fastpathTV.DecMapFloat32UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]uintptr)
+ v := rv2i(rv).(map[float32]uintptr)
fastpathTV.DecMapFloat32UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23192,43 +22242,33 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float32]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23239,13 +22279,13 @@ func (_ fastpathT) DecMapFloat32UintptrV(v map[float32]uintptr, checkNil bool, c
func (f *decFnInfo) fastpathDecMapFloat32IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]int)
+ vp := rv2i(rv.Addr()).(*map[float32]int)
v, changed := fastpathTV.DecMapFloat32IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]int)
+ v := rv2i(rv).(map[float32]int)
fastpathTV.DecMapFloat32IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23266,43 +22306,33 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float32]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23313,13 +22343,13 @@ func (_ fastpathT) DecMapFloat32IntV(v map[float32]int, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapFloat32Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]int8)
+ vp := rv2i(rv.Addr()).(*map[float32]int8)
v, changed := fastpathTV.DecMapFloat32Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]int8)
+ v := rv2i(rv).(map[float32]int8)
fastpathTV.DecMapFloat32Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23340,43 +22370,33 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[float32]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23387,13 +22407,13 @@ func (_ fastpathT) DecMapFloat32Int8V(v map[float32]int8, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapFloat32Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]int16)
+ vp := rv2i(rv.Addr()).(*map[float32]int16)
v, changed := fastpathTV.DecMapFloat32Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]int16)
+ v := rv2i(rv).(map[float32]int16)
fastpathTV.DecMapFloat32Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23414,43 +22434,33 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[float32]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23461,13 +22471,13 @@ func (_ fastpathT) DecMapFloat32Int16V(v map[float32]int16, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat32Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]int32)
+ vp := rv2i(rv.Addr()).(*map[float32]int32)
v, changed := fastpathTV.DecMapFloat32Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]int32)
+ v := rv2i(rv).(map[float32]int32)
fastpathTV.DecMapFloat32Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23488,43 +22498,33 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[float32]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23535,13 +22535,13 @@ func (_ fastpathT) DecMapFloat32Int32V(v map[float32]int32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat32Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]int64)
+ vp := rv2i(rv.Addr()).(*map[float32]int64)
v, changed := fastpathTV.DecMapFloat32Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]int64)
+ v := rv2i(rv).(map[float32]int64)
fastpathTV.DecMapFloat32Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23562,43 +22562,33 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float32]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = float32(dd.DecodeFloat(true))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -23609,13 +22599,13 @@ func (_ fastpathT) DecMapFloat32Int64V(v map[float32]int64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat32Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]float32)
+ vp := rv2i(rv.Addr()).(*map[float32]float32)
v, changed := fastpathTV.DecMapFloat32Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]float32)
+ v := rv2i(rv).(map[float32]float32)
fastpathTV.DecMapFloat32Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23636,43 +22626,33 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[float32]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23683,13 +22663,13 @@ func (_ fastpathT) DecMapFloat32Float32V(v map[float32]float32, checkNil bool, c
func (f *decFnInfo) fastpathDecMapFloat32Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]float64)
+ vp := rv2i(rv.Addr()).(*map[float32]float64)
v, changed := fastpathTV.DecMapFloat32Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]float64)
+ v := rv2i(rv).(map[float32]float64)
fastpathTV.DecMapFloat32Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23710,43 +22690,33 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float32]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = float32(dd.DecodeFloat(true))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -23757,13 +22727,13 @@ func (_ fastpathT) DecMapFloat32Float64V(v map[float32]float64, checkNil bool, c
func (f *decFnInfo) fastpathDecMapFloat32BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float32]bool)
+ vp := rv2i(rv.Addr()).(*map[float32]bool)
v, changed := fastpathTV.DecMapFloat32BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float32]bool)
+ v := rv2i(rv).(map[float32]bool)
fastpathTV.DecMapFloat32BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23784,43 +22754,33 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[float32]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = float32(dd.DecodeFloat(true))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -23831,13 +22791,13 @@ func (_ fastpathT) DecMapFloat32BoolV(v map[float32]bool, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapFloat64IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]interface{})
+ vp := rv2i(rv.Addr()).(*map[float64]interface{})
v, changed := fastpathTV.DecMapFloat64IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]interface{})
+ v := rv2i(rv).(map[float64]interface{})
fastpathTV.DecMapFloat64IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23858,53 +22818,38 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[float64]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -23915,13 +22860,13 @@ func (_ fastpathT) DecMapFloat64IntfV(v map[float64]interface{}, checkNil bool,
func (f *decFnInfo) fastpathDecMapFloat64StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]string)
+ vp := rv2i(rv.Addr()).(*map[float64]string)
v, changed := fastpathTV.DecMapFloat64StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]string)
+ v := rv2i(rv).(map[float64]string)
fastpathTV.DecMapFloat64StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -23942,43 +22887,33 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[float64]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -23989,13 +22924,13 @@ func (_ fastpathT) DecMapFloat64StringV(v map[float64]string, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat64UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]uint)
+ vp := rv2i(rv.Addr()).(*map[float64]uint)
v, changed := fastpathTV.DecMapFloat64UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]uint)
+ v := rv2i(rv).(map[float64]uint)
fastpathTV.DecMapFloat64UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24016,43 +22951,33 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[float64]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24063,13 +22988,13 @@ func (_ fastpathT) DecMapFloat64UintV(v map[float64]uint, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapFloat64Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]uint8)
+ vp := rv2i(rv.Addr()).(*map[float64]uint8)
v, changed := fastpathTV.DecMapFloat64Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]uint8)
+ v := rv2i(rv).(map[float64]uint8)
fastpathTV.DecMapFloat64Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24090,43 +23015,33 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[float64]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint8(dd.DecodeUint(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24137,13 +23052,13 @@ func (_ fastpathT) DecMapFloat64Uint8V(v map[float64]uint8, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat64Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]uint16)
+ vp := rv2i(rv.Addr()).(*map[float64]uint16)
v, changed := fastpathTV.DecMapFloat64Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]uint16)
+ v := rv2i(rv).(map[float64]uint16)
fastpathTV.DecMapFloat64Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24164,43 +23079,33 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[float64]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint16(dd.DecodeUint(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24211,13 +23116,13 @@ func (_ fastpathT) DecMapFloat64Uint16V(v map[float64]uint16, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat64Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]uint32)
+ vp := rv2i(rv.Addr()).(*map[float64]uint32)
v, changed := fastpathTV.DecMapFloat64Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]uint32)
+ v := rv2i(rv).(map[float64]uint32)
fastpathTV.DecMapFloat64Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24238,43 +23143,33 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float64]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint32(dd.DecodeUint(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24285,13 +23180,13 @@ func (_ fastpathT) DecMapFloat64Uint32V(v map[float64]uint32, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat64Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]uint64)
+ vp := rv2i(rv.Addr()).(*map[float64]uint64)
v, changed := fastpathTV.DecMapFloat64Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]uint64)
+ v := rv2i(rv).(map[float64]uint64)
fastpathTV.DecMapFloat64Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24312,43 +23207,33 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[float64]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24359,13 +23244,13 @@ func (_ fastpathT) DecMapFloat64Uint64V(v map[float64]uint64, checkNil bool, can
func (f *decFnInfo) fastpathDecMapFloat64UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]uintptr)
+ vp := rv2i(rv.Addr()).(*map[float64]uintptr)
v, changed := fastpathTV.DecMapFloat64UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]uintptr)
+ v := rv2i(rv).(map[float64]uintptr)
fastpathTV.DecMapFloat64UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24386,43 +23271,33 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[float64]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uintptr(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24433,13 +23308,13 @@ func (_ fastpathT) DecMapFloat64UintptrV(v map[float64]uintptr, checkNil bool, c
func (f *decFnInfo) fastpathDecMapFloat64IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]int)
+ vp := rv2i(rv.Addr()).(*map[float64]int)
v, changed := fastpathTV.DecMapFloat64IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]int)
+ v := rv2i(rv).(map[float64]int)
fastpathTV.DecMapFloat64IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24460,43 +23335,33 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[float64]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int(dd.DecodeInt(intBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24507,13 +23372,13 @@ func (_ fastpathT) DecMapFloat64IntV(v map[float64]int, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapFloat64Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]int8)
+ vp := rv2i(rv.Addr()).(*map[float64]int8)
v, changed := fastpathTV.DecMapFloat64Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]int8)
+ v := rv2i(rv).(map[float64]int8)
fastpathTV.DecMapFloat64Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24534,43 +23399,33 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[float64]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int8(dd.DecodeInt(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24581,13 +23436,13 @@ func (_ fastpathT) DecMapFloat64Int8V(v map[float64]int8, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapFloat64Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]int16)
+ vp := rv2i(rv.Addr()).(*map[float64]int16)
v, changed := fastpathTV.DecMapFloat64Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]int16)
+ v := rv2i(rv).(map[float64]int16)
fastpathTV.DecMapFloat64Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24608,43 +23463,33 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[float64]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int16(dd.DecodeInt(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24655,13 +23500,13 @@ func (_ fastpathT) DecMapFloat64Int16V(v map[float64]int16, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat64Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]int32)
+ vp := rv2i(rv.Addr()).(*map[float64]int32)
v, changed := fastpathTV.DecMapFloat64Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]int32)
+ v := rv2i(rv).(map[float64]int32)
fastpathTV.DecMapFloat64Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24682,43 +23527,33 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float64]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int32(dd.DecodeInt(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24729,13 +23564,13 @@ func (_ fastpathT) DecMapFloat64Int32V(v map[float64]int32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat64Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]int64)
+ vp := rv2i(rv.Addr()).(*map[float64]int64)
v, changed := fastpathTV.DecMapFloat64Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]int64)
+ v := rv2i(rv).(map[float64]int64)
fastpathTV.DecMapFloat64Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24756,43 +23591,33 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[float64]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24803,13 +23628,13 @@ func (_ fastpathT) DecMapFloat64Int64V(v map[float64]int64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapFloat64Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]float32)
+ vp := rv2i(rv.Addr()).(*map[float64]float32)
v, changed := fastpathTV.DecMapFloat64Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]float32)
+ v := rv2i(rv).(map[float64]float32)
fastpathTV.DecMapFloat64Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24830,43 +23655,33 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[float64]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = float32(dd.DecodeFloat(true))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24877,13 +23692,13 @@ func (_ fastpathT) DecMapFloat64Float32V(v map[float64]float32, checkNil bool, c
func (f *decFnInfo) fastpathDecMapFloat64Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]float64)
+ vp := rv2i(rv.Addr()).(*map[float64]float64)
v, changed := fastpathTV.DecMapFloat64Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]float64)
+ v := rv2i(rv).(map[float64]float64)
fastpathTV.DecMapFloat64Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24904,43 +23719,33 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[float64]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -24951,13 +23756,13 @@ func (_ fastpathT) DecMapFloat64Float64V(v map[float64]float64, checkNil bool, c
func (f *decFnInfo) fastpathDecMapFloat64BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[float64]bool)
+ vp := rv2i(rv.Addr()).(*map[float64]bool)
v, changed := fastpathTV.DecMapFloat64BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[float64]bool)
+ v := rv2i(rv).(map[float64]bool)
fastpathTV.DecMapFloat64BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -24978,43 +23783,33 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[float64]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeFloat(false)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -25025,13 +23820,13 @@ func (_ fastpathT) DecMapFloat64BoolV(v map[float64]bool, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUintIntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]interface{})
+ vp := rv2i(rv.Addr()).(*map[uint]interface{})
v, changed := fastpathTV.DecMapUintIntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]interface{})
+ v := rv2i(rv).(map[uint]interface{})
fastpathTV.DecMapUintIntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25052,53 +23847,38 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canCha
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[uint]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25109,13 +23889,13 @@ func (_ fastpathT) DecMapUintIntfV(v map[uint]interface{}, checkNil bool, canCha
func (f *decFnInfo) fastpathDecMapUintStringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]string)
+ vp := rv2i(rv.Addr()).(*map[uint]string)
v, changed := fastpathTV.DecMapUintStringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]string)
+ v := rv2i(rv).(map[uint]string)
fastpathTV.DecMapUintStringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25136,43 +23916,33 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[uint]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -25183,13 +23953,13 @@ func (_ fastpathT) DecMapUintStringV(v map[uint]string, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUintUintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]uint)
+ vp := rv2i(rv.Addr()).(*map[uint]uint)
v, changed := fastpathTV.DecMapUintUintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]uint)
+ v := rv2i(rv).(map[uint]uint)
fastpathTV.DecMapUintUintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25210,43 +23980,33 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25257,13 +24017,13 @@ func (_ fastpathT) DecMapUintUintV(v map[uint]uint, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapUintUint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]uint8)
+ vp := rv2i(rv.Addr()).(*map[uint]uint8)
v, changed := fastpathTV.DecMapUintUint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]uint8)
+ v := rv2i(rv).(map[uint]uint8)
fastpathTV.DecMapUintUint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25284,43 +24044,33 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25331,13 +24081,13 @@ func (_ fastpathT) DecMapUintUint8V(v map[uint]uint8, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUintUint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]uint16)
+ vp := rv2i(rv.Addr()).(*map[uint]uint16)
v, changed := fastpathTV.DecMapUintUint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]uint16)
+ v := rv2i(rv).(map[uint]uint16)
fastpathTV.DecMapUintUint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25358,43 +24108,33 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25405,13 +24145,13 @@ func (_ fastpathT) DecMapUintUint16V(v map[uint]uint16, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUintUint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]uint32)
+ vp := rv2i(rv.Addr()).(*map[uint]uint32)
v, changed := fastpathTV.DecMapUintUint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]uint32)
+ v := rv2i(rv).(map[uint]uint32)
fastpathTV.DecMapUintUint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25432,43 +24172,33 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25479,13 +24209,13 @@ func (_ fastpathT) DecMapUintUint32V(v map[uint]uint32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUintUint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]uint64)
+ vp := rv2i(rv.Addr()).(*map[uint]uint64)
v, changed := fastpathTV.DecMapUintUint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]uint64)
+ v := rv2i(rv).(map[uint]uint64)
fastpathTV.DecMapUintUint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25506,43 +24236,33 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -25553,13 +24273,13 @@ func (_ fastpathT) DecMapUintUint64V(v map[uint]uint64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUintUintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]uintptr)
+ vp := rv2i(rv.Addr()).(*map[uint]uintptr)
v, changed := fastpathTV.DecMapUintUintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]uintptr)
+ v := rv2i(rv).(map[uint]uintptr)
fastpathTV.DecMapUintUintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25580,43 +24300,33 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25627,13 +24337,13 @@ func (_ fastpathT) DecMapUintUintptrV(v map[uint]uintptr, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUintIntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]int)
+ vp := rv2i(rv.Addr()).(*map[uint]int)
v, changed := fastpathTV.DecMapUintIntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]int)
+ v := rv2i(rv).(map[uint]int)
fastpathTV.DecMapUintIntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25654,43 +24364,33 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25701,13 +24401,13 @@ func (_ fastpathT) DecMapUintIntV(v map[uint]int, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecMapUintInt8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]int8)
+ vp := rv2i(rv.Addr()).(*map[uint]int8)
v, changed := fastpathTV.DecMapUintInt8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]int8)
+ v := rv2i(rv).(map[uint]int8)
fastpathTV.DecMapUintInt8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25728,43 +24428,33 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25775,13 +24465,13 @@ func (_ fastpathT) DecMapUintInt8V(v map[uint]int8, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapUintInt16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]int16)
+ vp := rv2i(rv.Addr()).(*map[uint]int16)
v, changed := fastpathTV.DecMapUintInt16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]int16)
+ v := rv2i(rv).(map[uint]int16)
fastpathTV.DecMapUintInt16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25802,43 +24492,33 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25849,13 +24529,13 @@ func (_ fastpathT) DecMapUintInt16V(v map[uint]int16, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUintInt32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]int32)
+ vp := rv2i(rv.Addr()).(*map[uint]int32)
v, changed := fastpathTV.DecMapUintInt32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]int32)
+ v := rv2i(rv).(map[uint]int32)
fastpathTV.DecMapUintInt32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25876,43 +24556,33 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -25923,13 +24593,13 @@ func (_ fastpathT) DecMapUintInt32V(v map[uint]int32, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUintInt64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]int64)
+ vp := rv2i(rv.Addr()).(*map[uint]int64)
v, changed := fastpathTV.DecMapUintInt64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]int64)
+ v := rv2i(rv).(map[uint]int64)
fastpathTV.DecMapUintInt64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -25950,43 +24620,33 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -25997,13 +24657,13 @@ func (_ fastpathT) DecMapUintInt64V(v map[uint]int64, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUintFloat32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]float32)
+ vp := rv2i(rv.Addr()).(*map[uint]float32)
v, changed := fastpathTV.DecMapUintFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]float32)
+ v := rv2i(rv).(map[uint]float32)
fastpathTV.DecMapUintFloat32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26024,43 +24684,33 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26071,13 +24721,13 @@ func (_ fastpathT) DecMapUintFloat32V(v map[uint]float32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUintFloat64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]float64)
+ vp := rv2i(rv.Addr()).(*map[uint]float64)
v, changed := fastpathTV.DecMapUintFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]float64)
+ v := rv2i(rv).(map[uint]float64)
fastpathTV.DecMapUintFloat64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26098,43 +24748,33 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -26145,13 +24785,13 @@ func (_ fastpathT) DecMapUintFloat64V(v map[uint]float64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUintBoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint]bool)
+ vp := rv2i(rv.Addr()).(*map[uint]bool)
v, changed := fastpathTV.DecMapUintBoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint]bool)
+ v := rv2i(rv).(map[uint]bool)
fastpathTV.DecMapUintBoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26172,43 +24812,33 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -26219,13 +24849,13 @@ func (_ fastpathT) DecMapUintBoolV(v map[uint]bool, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapUint8IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]interface{})
+ vp := rv2i(rv.Addr()).(*map[uint8]interface{})
v, changed := fastpathTV.DecMapUint8IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]interface{})
+ v := rv2i(rv).(map[uint8]interface{})
fastpathTV.DecMapUint8IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26246,53 +24876,38 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[uint8]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26303,13 +24918,13 @@ func (_ fastpathT) DecMapUint8IntfV(v map[uint8]interface{}, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapUint8StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]string)
+ vp := rv2i(rv.Addr()).(*map[uint8]string)
v, changed := fastpathTV.DecMapUint8StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]string)
+ v := rv2i(rv).(map[uint8]string)
fastpathTV.DecMapUint8StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26330,43 +24945,33 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[uint8]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint8(dd.DecodeUint(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -26377,13 +24982,13 @@ func (_ fastpathT) DecMapUint8StringV(v map[uint8]string, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint8UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]uint)
+ vp := rv2i(rv.Addr()).(*map[uint8]uint)
v, changed := fastpathTV.DecMapUint8UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]uint)
+ v := rv2i(rv).(map[uint8]uint)
fastpathTV.DecMapUint8UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26404,43 +25009,33 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint8]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26451,13 +25046,13 @@ func (_ fastpathT) DecMapUint8UintV(v map[uint8]uint, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUint8Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]uint8)
+ vp := rv2i(rv.Addr()).(*map[uint8]uint8)
v, changed := fastpathTV.DecMapUint8Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]uint8)
+ v := rv2i(rv).(map[uint8]uint8)
fastpathTV.DecMapUint8Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26478,43 +25073,33 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[uint8]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26525,13 +25110,13 @@ func (_ fastpathT) DecMapUint8Uint8V(v map[uint8]uint8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint8Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]uint16)
+ vp := rv2i(rv.Addr()).(*map[uint8]uint16)
v, changed := fastpathTV.DecMapUint8Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]uint16)
+ v := rv2i(rv).(map[uint8]uint16)
fastpathTV.DecMapUint8Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26552,43 +25137,33 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[uint8]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26599,13 +25174,13 @@ func (_ fastpathT) DecMapUint8Uint16V(v map[uint8]uint16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint8Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]uint32)
+ vp := rv2i(rv.Addr()).(*map[uint8]uint32)
v, changed := fastpathTV.DecMapUint8Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]uint32)
+ v := rv2i(rv).(map[uint8]uint32)
fastpathTV.DecMapUint8Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26626,43 +25201,33 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[uint8]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26673,13 +25238,13 @@ func (_ fastpathT) DecMapUint8Uint32V(v map[uint8]uint32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint8Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]uint64)
+ vp := rv2i(rv.Addr()).(*map[uint8]uint64)
v, changed := fastpathTV.DecMapUint8Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]uint64)
+ v := rv2i(rv).(map[uint8]uint64)
fastpathTV.DecMapUint8Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26700,43 +25265,33 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint8]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint8(dd.DecodeUint(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -26747,13 +25302,13 @@ func (_ fastpathT) DecMapUint8Uint64V(v map[uint8]uint64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint8UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]uintptr)
+ vp := rv2i(rv.Addr()).(*map[uint8]uintptr)
v, changed := fastpathTV.DecMapUint8UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]uintptr)
+ v := rv2i(rv).(map[uint8]uintptr)
fastpathTV.DecMapUint8UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26774,43 +25329,33 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint8]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26821,13 +25366,13 @@ func (_ fastpathT) DecMapUint8UintptrV(v map[uint8]uintptr, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint8IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]int)
+ vp := rv2i(rv.Addr()).(*map[uint8]int)
v, changed := fastpathTV.DecMapUint8IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]int)
+ v := rv2i(rv).(map[uint8]int)
fastpathTV.DecMapUint8IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26848,43 +25393,33 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint8]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26895,13 +25430,13 @@ func (_ fastpathT) DecMapUint8IntV(v map[uint8]int, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapUint8Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]int8)
+ vp := rv2i(rv.Addr()).(*map[uint8]int8)
v, changed := fastpathTV.DecMapUint8Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]int8)
+ v := rv2i(rv).(map[uint8]int8)
fastpathTV.DecMapUint8Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26922,43 +25457,33 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[uint8]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -26969,13 +25494,13 @@ func (_ fastpathT) DecMapUint8Int8V(v map[uint8]int8, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUint8Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]int16)
+ vp := rv2i(rv.Addr()).(*map[uint8]int16)
v, changed := fastpathTV.DecMapUint8Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]int16)
+ v := rv2i(rv).(map[uint8]int16)
fastpathTV.DecMapUint8Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -26996,43 +25521,33 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[uint8]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27043,13 +25558,13 @@ func (_ fastpathT) DecMapUint8Int16V(v map[uint8]int16, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint8Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]int32)
+ vp := rv2i(rv.Addr()).(*map[uint8]int32)
v, changed := fastpathTV.DecMapUint8Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]int32)
+ v := rv2i(rv).(map[uint8]int32)
fastpathTV.DecMapUint8Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27070,43 +25585,33 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[uint8]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27117,13 +25622,13 @@ func (_ fastpathT) DecMapUint8Int32V(v map[uint8]int32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint8Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]int64)
+ vp := rv2i(rv.Addr()).(*map[uint8]int64)
v, changed := fastpathTV.DecMapUint8Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]int64)
+ v := rv2i(rv).(map[uint8]int64)
fastpathTV.DecMapUint8Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27144,43 +25649,33 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint8]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint8(dd.DecodeUint(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -27191,13 +25686,13 @@ func (_ fastpathT) DecMapUint8Int64V(v map[uint8]int64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint8Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]float32)
+ vp := rv2i(rv.Addr()).(*map[uint8]float32)
v, changed := fastpathTV.DecMapUint8Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]float32)
+ v := rv2i(rv).(map[uint8]float32)
fastpathTV.DecMapUint8Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27218,43 +25713,33 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[uint8]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27265,13 +25750,13 @@ func (_ fastpathT) DecMapUint8Float32V(v map[uint8]float32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint8Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]float64)
+ vp := rv2i(rv.Addr()).(*map[uint8]float64)
v, changed := fastpathTV.DecMapUint8Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]float64)
+ v := rv2i(rv).(map[uint8]float64)
fastpathTV.DecMapUint8Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27292,43 +25777,33 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint8]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint8(dd.DecodeUint(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -27339,13 +25814,13 @@ func (_ fastpathT) DecMapUint8Float64V(v map[uint8]float64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint8BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint8]bool)
+ vp := rv2i(rv.Addr()).(*map[uint8]bool)
v, changed := fastpathTV.DecMapUint8BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint8]bool)
+ v := rv2i(rv).(map[uint8]bool)
fastpathTV.DecMapUint8BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27366,43 +25841,33 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[uint8]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint8(dd.DecodeUint(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -27413,13 +25878,13 @@ func (_ fastpathT) DecMapUint8BoolV(v map[uint8]bool, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUint16IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]interface{})
+ vp := rv2i(rv.Addr()).(*map[uint16]interface{})
v, changed := fastpathTV.DecMapUint16IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]interface{})
+ v := rv2i(rv).(map[uint16]interface{})
fastpathTV.DecMapUint16IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27440,53 +25905,38 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[uint16]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27497,13 +25947,13 @@ func (_ fastpathT) DecMapUint16IntfV(v map[uint16]interface{}, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapUint16StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]string)
+ vp := rv2i(rv.Addr()).(*map[uint16]string)
v, changed := fastpathTV.DecMapUint16StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]string)
+ v := rv2i(rv).(map[uint16]string)
fastpathTV.DecMapUint16StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27524,43 +25974,33 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[uint16]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint16(dd.DecodeUint(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -27571,13 +26011,13 @@ func (_ fastpathT) DecMapUint16StringV(v map[uint16]string, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint16UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]uint)
+ vp := rv2i(rv.Addr()).(*map[uint16]uint)
v, changed := fastpathTV.DecMapUint16UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]uint)
+ v := rv2i(rv).(map[uint16]uint)
fastpathTV.DecMapUint16UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27598,43 +26038,33 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint16]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27645,13 +26075,13 @@ func (_ fastpathT) DecMapUint16UintV(v map[uint16]uint, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint16Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]uint8)
+ vp := rv2i(rv.Addr()).(*map[uint16]uint8)
v, changed := fastpathTV.DecMapUint16Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]uint8)
+ v := rv2i(rv).(map[uint16]uint8)
fastpathTV.DecMapUint16Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27672,43 +26102,33 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[uint16]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27719,13 +26139,13 @@ func (_ fastpathT) DecMapUint16Uint8V(v map[uint16]uint8, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint16Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]uint16)
+ vp := rv2i(rv.Addr()).(*map[uint16]uint16)
v, changed := fastpathTV.DecMapUint16Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]uint16)
+ v := rv2i(rv).(map[uint16]uint16)
fastpathTV.DecMapUint16Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27746,43 +26166,33 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
v = make(map[uint16]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27793,13 +26203,13 @@ func (_ fastpathT) DecMapUint16Uint16V(v map[uint16]uint16, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint16Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]uint32)
+ vp := rv2i(rv.Addr()).(*map[uint16]uint32)
v, changed := fastpathTV.DecMapUint16Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]uint32)
+ v := rv2i(rv).(map[uint16]uint32)
fastpathTV.DecMapUint16Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27820,43 +26230,33 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[uint16]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -27867,13 +26267,13 @@ func (_ fastpathT) DecMapUint16Uint32V(v map[uint16]uint32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint16Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]uint64)
+ vp := rv2i(rv.Addr()).(*map[uint16]uint64)
v, changed := fastpathTV.DecMapUint16Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]uint64)
+ v := rv2i(rv).(map[uint16]uint64)
fastpathTV.DecMapUint16Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27894,43 +26294,33 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint16]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint16(dd.DecodeUint(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -27941,13 +26331,13 @@ func (_ fastpathT) DecMapUint16Uint64V(v map[uint16]uint64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint16UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]uintptr)
+ vp := rv2i(rv.Addr()).(*map[uint16]uintptr)
v, changed := fastpathTV.DecMapUint16UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]uintptr)
+ v := rv2i(rv).(map[uint16]uintptr)
fastpathTV.DecMapUint16UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -27968,43 +26358,33 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint16]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28015,13 +26395,13 @@ func (_ fastpathT) DecMapUint16UintptrV(v map[uint16]uintptr, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint16IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]int)
+ vp := rv2i(rv.Addr()).(*map[uint16]int)
v, changed := fastpathTV.DecMapUint16IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]int)
+ v := rv2i(rv).(map[uint16]int)
fastpathTV.DecMapUint16IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28042,43 +26422,33 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint16]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28089,13 +26459,13 @@ func (_ fastpathT) DecMapUint16IntV(v map[uint16]int, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUint16Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]int8)
+ vp := rv2i(rv.Addr()).(*map[uint16]int8)
v, changed := fastpathTV.DecMapUint16Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]int8)
+ v := rv2i(rv).(map[uint16]int8)
fastpathTV.DecMapUint16Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28116,43 +26486,33 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[uint16]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28163,13 +26523,13 @@ func (_ fastpathT) DecMapUint16Int8V(v map[uint16]int8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint16Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]int16)
+ vp := rv2i(rv.Addr()).(*map[uint16]int16)
v, changed := fastpathTV.DecMapUint16Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]int16)
+ v := rv2i(rv).(map[uint16]int16)
fastpathTV.DecMapUint16Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28190,43 +26550,33 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
v = make(map[uint16]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28237,13 +26587,13 @@ func (_ fastpathT) DecMapUint16Int16V(v map[uint16]int16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint16Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]int32)
+ vp := rv2i(rv.Addr()).(*map[uint16]int32)
v, changed := fastpathTV.DecMapUint16Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]int32)
+ v := rv2i(rv).(map[uint16]int32)
fastpathTV.DecMapUint16Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28264,43 +26614,33 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[uint16]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28311,13 +26651,13 @@ func (_ fastpathT) DecMapUint16Int32V(v map[uint16]int32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint16Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]int64)
+ vp := rv2i(rv.Addr()).(*map[uint16]int64)
v, changed := fastpathTV.DecMapUint16Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]int64)
+ v := rv2i(rv).(map[uint16]int64)
fastpathTV.DecMapUint16Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28338,43 +26678,33 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint16]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint16(dd.DecodeUint(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -28385,13 +26715,13 @@ func (_ fastpathT) DecMapUint16Int64V(v map[uint16]int64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint16Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]float32)
+ vp := rv2i(rv.Addr()).(*map[uint16]float32)
v, changed := fastpathTV.DecMapUint16Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]float32)
+ v := rv2i(rv).(map[uint16]float32)
fastpathTV.DecMapUint16Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28412,43 +26742,33 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[uint16]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28459,13 +26779,13 @@ func (_ fastpathT) DecMapUint16Float32V(v map[uint16]float32, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint16Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]float64)
+ vp := rv2i(rv.Addr()).(*map[uint16]float64)
v, changed := fastpathTV.DecMapUint16Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]float64)
+ v := rv2i(rv).(map[uint16]float64)
fastpathTV.DecMapUint16Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28486,43 +26806,33 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint16]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint16(dd.DecodeUint(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -28533,13 +26843,13 @@ func (_ fastpathT) DecMapUint16Float64V(v map[uint16]float64, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint16BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint16]bool)
+ vp := rv2i(rv.Addr()).(*map[uint16]bool)
v, changed := fastpathTV.DecMapUint16BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint16]bool)
+ v := rv2i(rv).(map[uint16]bool)
fastpathTV.DecMapUint16BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28560,43 +26870,33 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[uint16]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint16(dd.DecodeUint(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -28607,13 +26907,13 @@ func (_ fastpathT) DecMapUint16BoolV(v map[uint16]bool, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint32IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]interface{})
+ vp := rv2i(rv.Addr()).(*map[uint32]interface{})
v, changed := fastpathTV.DecMapUint32IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]interface{})
+ v := rv2i(rv).(map[uint32]interface{})
fastpathTV.DecMapUint32IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28634,53 +26934,38 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[uint32]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28691,13 +26976,13 @@ func (_ fastpathT) DecMapUint32IntfV(v map[uint32]interface{}, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapUint32StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]string)
+ vp := rv2i(rv.Addr()).(*map[uint32]string)
v, changed := fastpathTV.DecMapUint32StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]string)
+ v := rv2i(rv).(map[uint32]string)
fastpathTV.DecMapUint32StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28718,43 +27003,33 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[uint32]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint32(dd.DecodeUint(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -28765,13 +27040,13 @@ func (_ fastpathT) DecMapUint32StringV(v map[uint32]string, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint32UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]uint)
+ vp := rv2i(rv.Addr()).(*map[uint32]uint)
v, changed := fastpathTV.DecMapUint32UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]uint)
+ v := rv2i(rv).(map[uint32]uint)
fastpathTV.DecMapUint32UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28792,43 +27067,33 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint32]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28839,13 +27104,13 @@ func (_ fastpathT) DecMapUint32UintV(v map[uint32]uint, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint32Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]uint8)
+ vp := rv2i(rv.Addr()).(*map[uint32]uint8)
v, changed := fastpathTV.DecMapUint32Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]uint8)
+ v := rv2i(rv).(map[uint32]uint8)
fastpathTV.DecMapUint32Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28866,43 +27131,33 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[uint32]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28913,13 +27168,13 @@ func (_ fastpathT) DecMapUint32Uint8V(v map[uint32]uint8, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint32Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]uint16)
+ vp := rv2i(rv.Addr()).(*map[uint32]uint16)
v, changed := fastpathTV.DecMapUint32Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]uint16)
+ v := rv2i(rv).(map[uint32]uint16)
fastpathTV.DecMapUint32Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -28940,43 +27195,33 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[uint32]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -28987,13 +27232,13 @@ func (_ fastpathT) DecMapUint32Uint16V(v map[uint32]uint16, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint32Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]uint32)
+ vp := rv2i(rv.Addr()).(*map[uint32]uint32)
v, changed := fastpathTV.DecMapUint32Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]uint32)
+ v := rv2i(rv).(map[uint32]uint32)
fastpathTV.DecMapUint32Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29014,43 +27259,33 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[uint32]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29061,13 +27296,13 @@ func (_ fastpathT) DecMapUint32Uint32V(v map[uint32]uint32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint32Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]uint64)
+ vp := rv2i(rv.Addr()).(*map[uint32]uint64)
v, changed := fastpathTV.DecMapUint32Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]uint64)
+ v := rv2i(rv).(map[uint32]uint64)
fastpathTV.DecMapUint32Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29088,43 +27323,33 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint32]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint32(dd.DecodeUint(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -29135,13 +27360,13 @@ func (_ fastpathT) DecMapUint32Uint64V(v map[uint32]uint64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint32UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]uintptr)
+ vp := rv2i(rv.Addr()).(*map[uint32]uintptr)
v, changed := fastpathTV.DecMapUint32UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]uintptr)
+ v := rv2i(rv).(map[uint32]uintptr)
fastpathTV.DecMapUint32UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29162,43 +27387,33 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint32]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29209,13 +27424,13 @@ func (_ fastpathT) DecMapUint32UintptrV(v map[uint32]uintptr, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint32IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]int)
+ vp := rv2i(rv.Addr()).(*map[uint32]int)
v, changed := fastpathTV.DecMapUint32IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]int)
+ v := rv2i(rv).(map[uint32]int)
fastpathTV.DecMapUint32IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29236,43 +27451,33 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint32]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29283,13 +27488,13 @@ func (_ fastpathT) DecMapUint32IntV(v map[uint32]int, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUint32Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]int8)
+ vp := rv2i(rv.Addr()).(*map[uint32]int8)
v, changed := fastpathTV.DecMapUint32Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]int8)
+ v := rv2i(rv).(map[uint32]int8)
fastpathTV.DecMapUint32Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29310,43 +27515,33 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[uint32]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29357,13 +27552,13 @@ func (_ fastpathT) DecMapUint32Int8V(v map[uint32]int8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint32Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]int16)
+ vp := rv2i(rv.Addr()).(*map[uint32]int16)
v, changed := fastpathTV.DecMapUint32Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]int16)
+ v := rv2i(rv).(map[uint32]int16)
fastpathTV.DecMapUint32Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29384,43 +27579,33 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[uint32]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29431,13 +27616,13 @@ func (_ fastpathT) DecMapUint32Int16V(v map[uint32]int16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint32Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]int32)
+ vp := rv2i(rv.Addr()).(*map[uint32]int32)
v, changed := fastpathTV.DecMapUint32Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]int32)
+ v := rv2i(rv).(map[uint32]int32)
fastpathTV.DecMapUint32Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29458,43 +27643,33 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[uint32]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29505,13 +27680,13 @@ func (_ fastpathT) DecMapUint32Int32V(v map[uint32]int32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint32Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]int64)
+ vp := rv2i(rv.Addr()).(*map[uint32]int64)
v, changed := fastpathTV.DecMapUint32Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]int64)
+ v := rv2i(rv).(map[uint32]int64)
fastpathTV.DecMapUint32Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29532,43 +27707,33 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint32]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint32(dd.DecodeUint(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -29579,13 +27744,13 @@ func (_ fastpathT) DecMapUint32Int64V(v map[uint32]int64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint32Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]float32)
+ vp := rv2i(rv.Addr()).(*map[uint32]float32)
v, changed := fastpathTV.DecMapUint32Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]float32)
+ v := rv2i(rv).(map[uint32]float32)
fastpathTV.DecMapUint32Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29606,43 +27771,33 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[uint32]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29653,13 +27808,13 @@ func (_ fastpathT) DecMapUint32Float32V(v map[uint32]float32, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint32Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]float64)
+ vp := rv2i(rv.Addr()).(*map[uint32]float64)
v, changed := fastpathTV.DecMapUint32Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]float64)
+ v := rv2i(rv).(map[uint32]float64)
fastpathTV.DecMapUint32Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29680,43 +27835,33 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint32]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint32(dd.DecodeUint(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -29727,13 +27872,13 @@ func (_ fastpathT) DecMapUint32Float64V(v map[uint32]float64, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint32BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint32]bool)
+ vp := rv2i(rv.Addr()).(*map[uint32]bool)
v, changed := fastpathTV.DecMapUint32BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint32]bool)
+ v := rv2i(rv).(map[uint32]bool)
fastpathTV.DecMapUint32BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29754,43 +27899,33 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[uint32]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uint32(dd.DecodeUint(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -29801,13 +27936,13 @@ func (_ fastpathT) DecMapUint32BoolV(v map[uint32]bool, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint64IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]interface{})
+ vp := rv2i(rv.Addr()).(*map[uint64]interface{})
v, changed := fastpathTV.DecMapUint64IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]interface{})
+ v := rv2i(rv).(map[uint64]interface{})
fastpathTV.DecMapUint64IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29828,53 +27963,38 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, ca
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[uint64]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -29885,13 +28005,13 @@ func (_ fastpathT) DecMapUint64IntfV(v map[uint64]interface{}, checkNil bool, ca
func (f *decFnInfo) fastpathDecMapUint64StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]string)
+ vp := rv2i(rv.Addr()).(*map[uint64]string)
v, changed := fastpathTV.DecMapUint64StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]string)
+ v := rv2i(rv).(map[uint64]string)
fastpathTV.DecMapUint64StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29912,43 +28032,33 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[uint64]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -29959,13 +28069,13 @@ func (_ fastpathT) DecMapUint64StringV(v map[uint64]string, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint64UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]uint)
+ vp := rv2i(rv.Addr()).(*map[uint64]uint)
v, changed := fastpathTV.DecMapUint64UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]uint)
+ v := rv2i(rv).(map[uint64]uint)
fastpathTV.DecMapUint64UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -29986,43 +28096,33 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint64]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30033,13 +28133,13 @@ func (_ fastpathT) DecMapUint64UintV(v map[uint64]uint, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint64Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]uint8)
+ vp := rv2i(rv.Addr()).(*map[uint64]uint8)
v, changed := fastpathTV.DecMapUint64Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]uint8)
+ v := rv2i(rv).(map[uint64]uint8)
fastpathTV.DecMapUint64Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30060,43 +28160,33 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint64]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint8(dd.DecodeUint(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30107,13 +28197,13 @@ func (_ fastpathT) DecMapUint64Uint8V(v map[uint64]uint8, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint64Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]uint16)
+ vp := rv2i(rv.Addr()).(*map[uint64]uint16)
v, changed := fastpathTV.DecMapUint64Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]uint16)
+ v := rv2i(rv).(map[uint64]uint16)
fastpathTV.DecMapUint64Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30134,43 +28224,33 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint64]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint16(dd.DecodeUint(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30181,13 +28261,13 @@ func (_ fastpathT) DecMapUint64Uint16V(v map[uint64]uint16, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint64Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]uint32)
+ vp := rv2i(rv.Addr()).(*map[uint64]uint32)
v, changed := fastpathTV.DecMapUint64Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]uint32)
+ v := rv2i(rv).(map[uint64]uint32)
fastpathTV.DecMapUint64Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30208,43 +28288,33 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint64]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint32(dd.DecodeUint(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30255,13 +28325,13 @@ func (_ fastpathT) DecMapUint64Uint32V(v map[uint64]uint32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint64Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]uint64)
+ vp := rv2i(rv.Addr()).(*map[uint64]uint64)
v, changed := fastpathTV.DecMapUint64Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]uint64)
+ v := rv2i(rv).(map[uint64]uint64)
fastpathTV.DecMapUint64Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30282,43 +28352,33 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint64]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30329,13 +28389,13 @@ func (_ fastpathT) DecMapUint64Uint64V(v map[uint64]uint64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUint64UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]uintptr)
+ vp := rv2i(rv.Addr()).(*map[uint64]uintptr)
v, changed := fastpathTV.DecMapUint64UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]uintptr)
+ v := rv2i(rv).(map[uint64]uintptr)
fastpathTV.DecMapUint64UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30356,43 +28416,33 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint64]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uintptr(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30403,13 +28453,13 @@ func (_ fastpathT) DecMapUint64UintptrV(v map[uint64]uintptr, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint64IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]int)
+ vp := rv2i(rv.Addr()).(*map[uint64]int)
v, changed := fastpathTV.DecMapUint64IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]int)
+ v := rv2i(rv).(map[uint64]int)
fastpathTV.DecMapUint64IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30430,43 +28480,33 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint64]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int(dd.DecodeInt(intBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30477,13 +28517,13 @@ func (_ fastpathT) DecMapUint64IntV(v map[uint64]int, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapUint64Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]int8)
+ vp := rv2i(rv.Addr()).(*map[uint64]int8)
v, changed := fastpathTV.DecMapUint64Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]int8)
+ v := rv2i(rv).(map[uint64]int8)
fastpathTV.DecMapUint64Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30504,43 +28544,33 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint64]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int8(dd.DecodeInt(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30551,13 +28581,13 @@ func (_ fastpathT) DecMapUint64Int8V(v map[uint64]int8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUint64Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]int16)
+ vp := rv2i(rv.Addr()).(*map[uint64]int16)
v, changed := fastpathTV.DecMapUint64Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]int16)
+ v := rv2i(rv).(map[uint64]int16)
fastpathTV.DecMapUint64Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30578,43 +28608,33 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uint64]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int16(dd.DecodeInt(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30625,13 +28645,13 @@ func (_ fastpathT) DecMapUint64Int16V(v map[uint64]int16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint64Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]int32)
+ vp := rv2i(rv.Addr()).(*map[uint64]int32)
v, changed := fastpathTV.DecMapUint64Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]int32)
+ v := rv2i(rv).(map[uint64]int32)
fastpathTV.DecMapUint64Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30652,43 +28672,33 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint64]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int32(dd.DecodeInt(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30699,13 +28709,13 @@ func (_ fastpathT) DecMapUint64Int32V(v map[uint64]int32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint64Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]int64)
+ vp := rv2i(rv.Addr()).(*map[uint64]int64)
v, changed := fastpathTV.DecMapUint64Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]int64)
+ v := rv2i(rv).(map[uint64]int64)
fastpathTV.DecMapUint64Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30726,43 +28736,33 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint64]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30773,13 +28773,13 @@ func (_ fastpathT) DecMapUint64Int64V(v map[uint64]int64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUint64Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]float32)
+ vp := rv2i(rv.Addr()).(*map[uint64]float32)
v, changed := fastpathTV.DecMapUint64Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]float32)
+ v := rv2i(rv).(map[uint64]float32)
fastpathTV.DecMapUint64Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30800,43 +28800,33 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uint64]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = float32(dd.DecodeFloat(true))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30847,13 +28837,13 @@ func (_ fastpathT) DecMapUint64Float32V(v map[uint64]float32, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint64Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]float64)
+ vp := rv2i(rv.Addr()).(*map[uint64]float64)
v, changed := fastpathTV.DecMapUint64Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]float64)
+ v := rv2i(rv).(map[uint64]float64)
fastpathTV.DecMapUint64Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30874,43 +28864,33 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uint64]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30921,13 +28901,13 @@ func (_ fastpathT) DecMapUint64Float64V(v map[uint64]float64, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUint64BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uint64]bool)
+ vp := rv2i(rv.Addr()).(*map[uint64]bool)
v, changed := fastpathTV.DecMapUint64BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uint64]bool)
+ v := rv2i(rv).(map[uint64]bool)
fastpathTV.DecMapUint64BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -30948,43 +28928,33 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uint64]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeUint(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -30995,13 +28965,13 @@ func (_ fastpathT) DecMapUint64BoolV(v map[uint64]bool, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUintptrIntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]interface{})
+ vp := rv2i(rv.Addr()).(*map[uintptr]interface{})
v, changed := fastpathTV.DecMapUintptrIntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]interface{})
+ v := rv2i(rv).(map[uintptr]interface{})
fastpathTV.DecMapUintptrIntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31022,53 +28992,38 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[uintptr]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31079,13 +29034,13 @@ func (_ fastpathT) DecMapUintptrIntfV(v map[uintptr]interface{}, checkNil bool,
func (f *decFnInfo) fastpathDecMapUintptrStringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]string)
+ vp := rv2i(rv.Addr()).(*map[uintptr]string)
v, changed := fastpathTV.DecMapUintptrStringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]string)
+ v := rv2i(rv).(map[uintptr]string)
fastpathTV.DecMapUintptrStringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31106,43 +29061,33 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[uintptr]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uintptr(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -31153,13 +29098,13 @@ func (_ fastpathT) DecMapUintptrStringV(v map[uintptr]string, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUintptrUintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]uint)
+ vp := rv2i(rv.Addr()).(*map[uintptr]uint)
v, changed := fastpathTV.DecMapUintptrUintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]uint)
+ v := rv2i(rv).(map[uintptr]uint)
fastpathTV.DecMapUintptrUintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31180,43 +29125,33 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uintptr]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31227,13 +29162,13 @@ func (_ fastpathT) DecMapUintptrUintV(v map[uintptr]uint, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUintptrUint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]uint8)
+ vp := rv2i(rv.Addr()).(*map[uintptr]uint8)
v, changed := fastpathTV.DecMapUintptrUint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]uint8)
+ v := rv2i(rv).(map[uintptr]uint8)
fastpathTV.DecMapUintptrUint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31254,43 +29189,33 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uintptr]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31301,13 +29226,13 @@ func (_ fastpathT) DecMapUintptrUint8V(v map[uintptr]uint8, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUintptrUint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]uint16)
+ vp := rv2i(rv.Addr()).(*map[uintptr]uint16)
v, changed := fastpathTV.DecMapUintptrUint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]uint16)
+ v := rv2i(rv).(map[uintptr]uint16)
fastpathTV.DecMapUintptrUint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31328,43 +29253,33 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uintptr]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31375,13 +29290,13 @@ func (_ fastpathT) DecMapUintptrUint16V(v map[uintptr]uint16, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUintptrUint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]uint32)
+ vp := rv2i(rv.Addr()).(*map[uintptr]uint32)
v, changed := fastpathTV.DecMapUintptrUint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]uint32)
+ v := rv2i(rv).(map[uintptr]uint32)
fastpathTV.DecMapUintptrUint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31402,43 +29317,33 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uintptr]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31449,13 +29354,13 @@ func (_ fastpathT) DecMapUintptrUint32V(v map[uintptr]uint32, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUintptrUint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]uint64)
+ vp := rv2i(rv.Addr()).(*map[uintptr]uint64)
v, changed := fastpathTV.DecMapUintptrUint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]uint64)
+ v := rv2i(rv).(map[uintptr]uint64)
fastpathTV.DecMapUintptrUint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31476,43 +29381,33 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, can
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uintptr]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uintptr(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -31523,13 +29418,13 @@ func (_ fastpathT) DecMapUintptrUint64V(v map[uintptr]uint64, checkNil bool, can
func (f *decFnInfo) fastpathDecMapUintptrUintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]uintptr)
+ vp := rv2i(rv.Addr()).(*map[uintptr]uintptr)
v, changed := fastpathTV.DecMapUintptrUintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]uintptr)
+ v := rv2i(rv).(map[uintptr]uintptr)
fastpathTV.DecMapUintptrUintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31550,43 +29445,33 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uintptr]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31597,13 +29482,13 @@ func (_ fastpathT) DecMapUintptrUintptrV(v map[uintptr]uintptr, checkNil bool, c
func (f *decFnInfo) fastpathDecMapUintptrIntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]int)
+ vp := rv2i(rv.Addr()).(*map[uintptr]int)
v, changed := fastpathTV.DecMapUintptrIntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]int)
+ v := rv2i(rv).(map[uintptr]int)
fastpathTV.DecMapUintptrIntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31624,43 +29509,33 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uintptr]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31671,13 +29546,13 @@ func (_ fastpathT) DecMapUintptrIntV(v map[uintptr]int, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapUintptrInt8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]int8)
+ vp := rv2i(rv.Addr()).(*map[uintptr]int8)
v, changed := fastpathTV.DecMapUintptrInt8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]int8)
+ v := rv2i(rv).(map[uintptr]int8)
fastpathTV.DecMapUintptrInt8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31698,43 +29573,33 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uintptr]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31745,13 +29610,13 @@ func (_ fastpathT) DecMapUintptrInt8V(v map[uintptr]int8, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapUintptrInt16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]int16)
+ vp := rv2i(rv.Addr()).(*map[uintptr]int16)
v, changed := fastpathTV.DecMapUintptrInt16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]int16)
+ v := rv2i(rv).(map[uintptr]int16)
fastpathTV.DecMapUintptrInt16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31772,43 +29637,33 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[uintptr]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31819,13 +29674,13 @@ func (_ fastpathT) DecMapUintptrInt16V(v map[uintptr]int16, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUintptrInt32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]int32)
+ vp := rv2i(rv.Addr()).(*map[uintptr]int32)
v, changed := fastpathTV.DecMapUintptrInt32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]int32)
+ v := rv2i(rv).(map[uintptr]int32)
fastpathTV.DecMapUintptrInt32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31846,43 +29701,33 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uintptr]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -31893,13 +29738,13 @@ func (_ fastpathT) DecMapUintptrInt32V(v map[uintptr]int32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUintptrInt64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]int64)
+ vp := rv2i(rv.Addr()).(*map[uintptr]int64)
v, changed := fastpathTV.DecMapUintptrInt64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]int64)
+ v := rv2i(rv).(map[uintptr]int64)
fastpathTV.DecMapUintptrInt64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31920,43 +29765,33 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uintptr]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uintptr(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -31967,13 +29802,13 @@ func (_ fastpathT) DecMapUintptrInt64V(v map[uintptr]int64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapUintptrFloat32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]float32)
+ vp := rv2i(rv.Addr()).(*map[uintptr]float32)
v, changed := fastpathTV.DecMapUintptrFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]float32)
+ v := rv2i(rv).(map[uintptr]float32)
fastpathTV.DecMapUintptrFloat32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -31994,43 +29829,33 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[uintptr]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32041,13 +29866,13 @@ func (_ fastpathT) DecMapUintptrFloat32V(v map[uintptr]float32, checkNil bool, c
func (f *decFnInfo) fastpathDecMapUintptrFloat64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]float64)
+ vp := rv2i(rv.Addr()).(*map[uintptr]float64)
v, changed := fastpathTV.DecMapUintptrFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]float64)
+ v := rv2i(rv).(map[uintptr]float64)
fastpathTV.DecMapUintptrFloat64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32068,43 +29893,33 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, c
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[uintptr]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uintptr(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -32115,13 +29930,13 @@ func (_ fastpathT) DecMapUintptrFloat64V(v map[uintptr]float64, checkNil bool, c
func (f *decFnInfo) fastpathDecMapUintptrBoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[uintptr]bool)
+ vp := rv2i(rv.Addr()).(*map[uintptr]bool)
v, changed := fastpathTV.DecMapUintptrBoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[uintptr]bool)
+ v := rv2i(rv).(map[uintptr]bool)
fastpathTV.DecMapUintptrBoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32142,43 +29957,33 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[uintptr]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = uintptr(dd.DecodeUint(uintBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -32189,13 +29994,13 @@ func (_ fastpathT) DecMapUintptrBoolV(v map[uintptr]bool, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapIntIntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]interface{})
+ vp := rv2i(rv.Addr()).(*map[int]interface{})
v, changed := fastpathTV.DecMapIntIntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]interface{})
+ v := rv2i(rv).(map[int]interface{})
fastpathTV.DecMapIntIntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32216,53 +30021,38 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChang
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[int]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32273,13 +30063,13 @@ func (_ fastpathT) DecMapIntIntfV(v map[int]interface{}, checkNil bool, canChang
func (f *decFnInfo) fastpathDecMapIntStringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]string)
+ vp := rv2i(rv.Addr()).(*map[int]string)
v, changed := fastpathTV.DecMapIntStringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]string)
+ v := rv2i(rv).(map[int]string)
fastpathTV.DecMapIntStringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32300,43 +30090,33 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[int]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int(dd.DecodeInt(intBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -32347,13 +30127,13 @@ func (_ fastpathT) DecMapIntStringV(v map[int]string, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapIntUintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]uint)
+ vp := rv2i(rv.Addr()).(*map[int]uint)
v, changed := fastpathTV.DecMapIntUintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]uint)
+ v := rv2i(rv).(map[int]uint)
fastpathTV.DecMapIntUintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32374,43 +30154,33 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32421,13 +30191,13 @@ func (_ fastpathT) DecMapIntUintV(v map[int]uint, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecMapIntUint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]uint8)
+ vp := rv2i(rv.Addr()).(*map[int]uint8)
v, changed := fastpathTV.DecMapIntUint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]uint8)
+ v := rv2i(rv).(map[int]uint8)
fastpathTV.DecMapIntUint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32448,43 +30218,33 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32495,13 +30255,13 @@ func (_ fastpathT) DecMapIntUint8V(v map[int]uint8, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapIntUint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]uint16)
+ vp := rv2i(rv.Addr()).(*map[int]uint16)
v, changed := fastpathTV.DecMapIntUint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]uint16)
+ v := rv2i(rv).(map[int]uint16)
fastpathTV.DecMapIntUint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32522,43 +30282,33 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32569,13 +30319,13 @@ func (_ fastpathT) DecMapIntUint16V(v map[int]uint16, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapIntUint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]uint32)
+ vp := rv2i(rv.Addr()).(*map[int]uint32)
v, changed := fastpathTV.DecMapIntUint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]uint32)
+ v := rv2i(rv).(map[int]uint32)
fastpathTV.DecMapIntUint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32596,43 +30346,33 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32643,13 +30383,13 @@ func (_ fastpathT) DecMapIntUint32V(v map[int]uint32, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapIntUint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]uint64)
+ vp := rv2i(rv.Addr()).(*map[int]uint64)
v, changed := fastpathTV.DecMapIntUint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]uint64)
+ v := rv2i(rv).(map[int]uint64)
fastpathTV.DecMapIntUint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32670,43 +30410,33 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int(dd.DecodeInt(intBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -32717,13 +30447,13 @@ func (_ fastpathT) DecMapIntUint64V(v map[int]uint64, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapIntUintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]uintptr)
+ vp := rv2i(rv.Addr()).(*map[int]uintptr)
v, changed := fastpathTV.DecMapIntUintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]uintptr)
+ v := rv2i(rv).(map[int]uintptr)
fastpathTV.DecMapIntUintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32744,43 +30474,33 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32791,13 +30511,13 @@ func (_ fastpathT) DecMapIntUintptrV(v map[int]uintptr, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapIntIntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]int)
+ vp := rv2i(rv.Addr()).(*map[int]int)
v, changed := fastpathTV.DecMapIntIntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]int)
+ v := rv2i(rv).(map[int]int)
fastpathTV.DecMapIntIntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32818,43 +30538,33 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32865,13 +30575,13 @@ func (_ fastpathT) DecMapIntIntV(v map[int]int, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecMapIntInt8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]int8)
+ vp := rv2i(rv.Addr()).(*map[int]int8)
v, changed := fastpathTV.DecMapIntInt8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]int8)
+ v := rv2i(rv).(map[int]int8)
fastpathTV.DecMapIntInt8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32892,43 +30602,33 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -32939,13 +30639,13 @@ func (_ fastpathT) DecMapIntInt8V(v map[int]int8, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecMapIntInt16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]int16)
+ vp := rv2i(rv.Addr()).(*map[int]int16)
v, changed := fastpathTV.DecMapIntInt16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]int16)
+ v := rv2i(rv).(map[int]int16)
fastpathTV.DecMapIntInt16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -32966,43 +30666,33 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33013,13 +30703,13 @@ func (_ fastpathT) DecMapIntInt16V(v map[int]int16, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapIntInt32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]int32)
+ vp := rv2i(rv.Addr()).(*map[int]int32)
v, changed := fastpathTV.DecMapIntInt32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]int32)
+ v := rv2i(rv).(map[int]int32)
fastpathTV.DecMapIntInt32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33040,43 +30730,33 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33087,13 +30767,13 @@ func (_ fastpathT) DecMapIntInt32V(v map[int]int32, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapIntInt64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]int64)
+ vp := rv2i(rv.Addr()).(*map[int]int64)
v, changed := fastpathTV.DecMapIntInt64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]int64)
+ v := rv2i(rv).(map[int]int64)
fastpathTV.DecMapIntInt64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33114,43 +30794,33 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int(dd.DecodeInt(intBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -33161,13 +30831,13 @@ func (_ fastpathT) DecMapIntInt64V(v map[int]int64, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapIntFloat32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]float32)
+ vp := rv2i(rv.Addr()).(*map[int]float32)
v, changed := fastpathTV.DecMapIntFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]float32)
+ v := rv2i(rv).(map[int]float32)
fastpathTV.DecMapIntFloat32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33188,43 +30858,33 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33235,13 +30895,13 @@ func (_ fastpathT) DecMapIntFloat32V(v map[int]float32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapIntFloat64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]float64)
+ vp := rv2i(rv.Addr()).(*map[int]float64)
v, changed := fastpathTV.DecMapIntFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]float64)
+ v := rv2i(rv).(map[int]float64)
fastpathTV.DecMapIntFloat64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33262,43 +30922,33 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int(dd.DecodeInt(intBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -33309,13 +30959,13 @@ func (_ fastpathT) DecMapIntFloat64V(v map[int]float64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapIntBoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int]bool)
+ vp := rv2i(rv.Addr()).(*map[int]bool)
v, changed := fastpathTV.DecMapIntBoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int]bool)
+ v := rv2i(rv).(map[int]bool)
fastpathTV.DecMapIntBoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33336,43 +30986,33 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int(dd.DecodeInt(intBitsize))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -33383,13 +31023,13 @@ func (_ fastpathT) DecMapIntBoolV(v map[int]bool, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecMapInt8IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]interface{})
+ vp := rv2i(rv.Addr()).(*map[int8]interface{})
v, changed := fastpathTV.DecMapInt8IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]interface{})
+ v := rv2i(rv).(map[int8]interface{})
fastpathTV.DecMapInt8IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33410,53 +31050,38 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canCha
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[int8]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33467,13 +31092,13 @@ func (_ fastpathT) DecMapInt8IntfV(v map[int8]interface{}, checkNil bool, canCha
func (f *decFnInfo) fastpathDecMapInt8StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]string)
+ vp := rv2i(rv.Addr()).(*map[int8]string)
v, changed := fastpathTV.DecMapInt8StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]string)
+ v := rv2i(rv).(map[int8]string)
fastpathTV.DecMapInt8StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33494,43 +31119,33 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[int8]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int8(dd.DecodeInt(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -33541,13 +31156,13 @@ func (_ fastpathT) DecMapInt8StringV(v map[int8]string, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt8UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]uint)
+ vp := rv2i(rv.Addr()).(*map[int8]uint)
v, changed := fastpathTV.DecMapInt8UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]uint)
+ v := rv2i(rv).(map[int8]uint)
fastpathTV.DecMapInt8UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33568,43 +31183,33 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int8]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33615,13 +31220,13 @@ func (_ fastpathT) DecMapInt8UintV(v map[int8]uint, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapInt8Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]uint8)
+ vp := rv2i(rv.Addr()).(*map[int8]uint8)
v, changed := fastpathTV.DecMapInt8Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]uint8)
+ v := rv2i(rv).(map[int8]uint8)
fastpathTV.DecMapInt8Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33642,43 +31247,33 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[int8]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33689,13 +31284,13 @@ func (_ fastpathT) DecMapInt8Uint8V(v map[int8]uint8, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt8Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]uint16)
+ vp := rv2i(rv.Addr()).(*map[int8]uint16)
v, changed := fastpathTV.DecMapInt8Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]uint16)
+ v := rv2i(rv).(map[int8]uint16)
fastpathTV.DecMapInt8Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33716,43 +31311,33 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[int8]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33763,13 +31348,13 @@ func (_ fastpathT) DecMapInt8Uint16V(v map[int8]uint16, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt8Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]uint32)
+ vp := rv2i(rv.Addr()).(*map[int8]uint32)
v, changed := fastpathTV.DecMapInt8Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]uint32)
+ v := rv2i(rv).(map[int8]uint32)
fastpathTV.DecMapInt8Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33790,43 +31375,33 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[int8]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33837,13 +31412,13 @@ func (_ fastpathT) DecMapInt8Uint32V(v map[int8]uint32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt8Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]uint64)
+ vp := rv2i(rv.Addr()).(*map[int8]uint64)
v, changed := fastpathTV.DecMapInt8Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]uint64)
+ v := rv2i(rv).(map[int8]uint64)
fastpathTV.DecMapInt8Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33864,43 +31439,33 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int8]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int8(dd.DecodeInt(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -33911,13 +31476,13 @@ func (_ fastpathT) DecMapInt8Uint64V(v map[int8]uint64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt8UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]uintptr)
+ vp := rv2i(rv.Addr()).(*map[int8]uintptr)
v, changed := fastpathTV.DecMapInt8UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]uintptr)
+ v := rv2i(rv).(map[int8]uintptr)
fastpathTV.DecMapInt8UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -33938,43 +31503,33 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int8]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -33985,13 +31540,13 @@ func (_ fastpathT) DecMapInt8UintptrV(v map[int8]uintptr, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt8IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]int)
+ vp := rv2i(rv.Addr()).(*map[int8]int)
v, changed := fastpathTV.DecMapInt8IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]int)
+ v := rv2i(rv).(map[int8]int)
fastpathTV.DecMapInt8IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34012,43 +31567,33 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int8]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34059,13 +31604,13 @@ func (_ fastpathT) DecMapInt8IntV(v map[int8]int, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecMapInt8Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]int8)
+ vp := rv2i(rv.Addr()).(*map[int8]int8)
v, changed := fastpathTV.DecMapInt8Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]int8)
+ v := rv2i(rv).(map[int8]int8)
fastpathTV.DecMapInt8Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34086,43 +31631,33 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[int8]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34133,13 +31668,13 @@ func (_ fastpathT) DecMapInt8Int8V(v map[int8]int8, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapInt8Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]int16)
+ vp := rv2i(rv.Addr()).(*map[int8]int16)
v, changed := fastpathTV.DecMapInt8Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]int16)
+ v := rv2i(rv).(map[int8]int16)
fastpathTV.DecMapInt8Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34160,43 +31695,33 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[int8]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34207,13 +31732,13 @@ func (_ fastpathT) DecMapInt8Int16V(v map[int8]int16, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt8Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]int32)
+ vp := rv2i(rv.Addr()).(*map[int8]int32)
v, changed := fastpathTV.DecMapInt8Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]int32)
+ v := rv2i(rv).(map[int8]int32)
fastpathTV.DecMapInt8Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34234,43 +31759,33 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[int8]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34281,13 +31796,13 @@ func (_ fastpathT) DecMapInt8Int32V(v map[int8]int32, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt8Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]int64)
+ vp := rv2i(rv.Addr()).(*map[int8]int64)
v, changed := fastpathTV.DecMapInt8Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]int64)
+ v := rv2i(rv).(map[int8]int64)
fastpathTV.DecMapInt8Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34308,43 +31823,33 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int8]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int8(dd.DecodeInt(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -34355,13 +31860,13 @@ func (_ fastpathT) DecMapInt8Int64V(v map[int8]int64, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt8Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]float32)
+ vp := rv2i(rv.Addr()).(*map[int8]float32)
v, changed := fastpathTV.DecMapInt8Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]float32)
+ v := rv2i(rv).(map[int8]float32)
fastpathTV.DecMapInt8Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34382,43 +31887,33 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[int8]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34429,13 +31924,13 @@ func (_ fastpathT) DecMapInt8Float32V(v map[int8]float32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt8Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]float64)
+ vp := rv2i(rv.Addr()).(*map[int8]float64)
v, changed := fastpathTV.DecMapInt8Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]float64)
+ v := rv2i(rv).(map[int8]float64)
fastpathTV.DecMapInt8Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34456,43 +31951,33 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int8]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int8(dd.DecodeInt(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -34503,13 +31988,13 @@ func (_ fastpathT) DecMapInt8Float64V(v map[int8]float64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt8BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int8]bool)
+ vp := rv2i(rv.Addr()).(*map[int8]bool)
v, changed := fastpathTV.DecMapInt8BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int8]bool)
+ v := rv2i(rv).(map[int8]bool)
fastpathTV.DecMapInt8BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34530,43 +32015,33 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[int8]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int8(dd.DecodeInt(8))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -34577,13 +32052,13 @@ func (_ fastpathT) DecMapInt8BoolV(v map[int8]bool, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapInt16IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]interface{})
+ vp := rv2i(rv.Addr()).(*map[int16]interface{})
v, changed := fastpathTV.DecMapInt16IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]interface{})
+ v := rv2i(rv).(map[int16]interface{})
fastpathTV.DecMapInt16IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34604,53 +32079,38 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[int16]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34661,13 +32121,13 @@ func (_ fastpathT) DecMapInt16IntfV(v map[int16]interface{}, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapInt16StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]string)
+ vp := rv2i(rv.Addr()).(*map[int16]string)
v, changed := fastpathTV.DecMapInt16StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]string)
+ v := rv2i(rv).(map[int16]string)
fastpathTV.DecMapInt16StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34688,43 +32148,33 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 18)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 18)
v = make(map[int16]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int16(dd.DecodeInt(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -34735,13 +32185,13 @@ func (_ fastpathT) DecMapInt16StringV(v map[int16]string, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt16UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]uint)
+ vp := rv2i(rv.Addr()).(*map[int16]uint)
v, changed := fastpathTV.DecMapInt16UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]uint)
+ v := rv2i(rv).(map[int16]uint)
fastpathTV.DecMapInt16UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34762,43 +32212,33 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int16]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34809,13 +32249,13 @@ func (_ fastpathT) DecMapInt16UintV(v map[int16]uint, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt16Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]uint8)
+ vp := rv2i(rv.Addr()).(*map[int16]uint8)
v, changed := fastpathTV.DecMapInt16Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]uint8)
+ v := rv2i(rv).(map[int16]uint8)
fastpathTV.DecMapInt16Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34836,43 +32276,33 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[int16]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34883,13 +32313,13 @@ func (_ fastpathT) DecMapInt16Uint8V(v map[int16]uint8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt16Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]uint16)
+ vp := rv2i(rv.Addr()).(*map[int16]uint16)
v, changed := fastpathTV.DecMapInt16Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]uint16)
+ v := rv2i(rv).(map[int16]uint16)
fastpathTV.DecMapInt16Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34910,43 +32340,33 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
v = make(map[int16]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -34957,13 +32377,13 @@ func (_ fastpathT) DecMapInt16Uint16V(v map[int16]uint16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt16Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]uint32)
+ vp := rv2i(rv.Addr()).(*map[int16]uint32)
v, changed := fastpathTV.DecMapInt16Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]uint32)
+ v := rv2i(rv).(map[int16]uint32)
fastpathTV.DecMapInt16Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -34984,43 +32404,33 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[int16]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35031,13 +32441,13 @@ func (_ fastpathT) DecMapInt16Uint32V(v map[int16]uint32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt16Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]uint64)
+ vp := rv2i(rv.Addr()).(*map[int16]uint64)
v, changed := fastpathTV.DecMapInt16Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]uint64)
+ v := rv2i(rv).(map[int16]uint64)
fastpathTV.DecMapInt16Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35058,43 +32468,33 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int16]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int16(dd.DecodeInt(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -35105,13 +32505,13 @@ func (_ fastpathT) DecMapInt16Uint64V(v map[int16]uint64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt16UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]uintptr)
+ vp := rv2i(rv.Addr()).(*map[int16]uintptr)
v, changed := fastpathTV.DecMapInt16UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]uintptr)
+ v := rv2i(rv).(map[int16]uintptr)
fastpathTV.DecMapInt16UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35132,43 +32532,33 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int16]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35179,13 +32569,13 @@ func (_ fastpathT) DecMapInt16UintptrV(v map[int16]uintptr, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt16IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]int)
+ vp := rv2i(rv.Addr()).(*map[int16]int)
v, changed := fastpathTV.DecMapInt16IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]int)
+ v := rv2i(rv).(map[int16]int)
fastpathTV.DecMapInt16IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35206,43 +32596,33 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int16]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35253,13 +32633,13 @@ func (_ fastpathT) DecMapInt16IntV(v map[int16]int, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapInt16Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]int8)
+ vp := rv2i(rv.Addr()).(*map[int16]int8)
v, changed := fastpathTV.DecMapInt16Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]int8)
+ v := rv2i(rv).(map[int16]int8)
fastpathTV.DecMapInt16Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35280,43 +32660,33 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[int16]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35327,13 +32697,13 @@ func (_ fastpathT) DecMapInt16Int8V(v map[int16]int8, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt16Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]int16)
+ vp := rv2i(rv.Addr()).(*map[int16]int16)
v, changed := fastpathTV.DecMapInt16Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]int16)
+ v := rv2i(rv).(map[int16]int16)
fastpathTV.DecMapInt16Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35354,43 +32724,33 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 4)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 4)
v = make(map[int16]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35401,13 +32761,13 @@ func (_ fastpathT) DecMapInt16Int16V(v map[int16]int16, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt16Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]int32)
+ vp := rv2i(rv.Addr()).(*map[int16]int32)
v, changed := fastpathTV.DecMapInt16Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]int32)
+ v := rv2i(rv).(map[int16]int32)
fastpathTV.DecMapInt16Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35428,43 +32788,33 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[int16]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35475,13 +32825,13 @@ func (_ fastpathT) DecMapInt16Int32V(v map[int16]int32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt16Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]int64)
+ vp := rv2i(rv.Addr()).(*map[int16]int64)
v, changed := fastpathTV.DecMapInt16Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]int64)
+ v := rv2i(rv).(map[int16]int64)
fastpathTV.DecMapInt16Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35502,43 +32852,33 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int16]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int16(dd.DecodeInt(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -35549,13 +32889,13 @@ func (_ fastpathT) DecMapInt16Int64V(v map[int16]int64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt16Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]float32)
+ vp := rv2i(rv.Addr()).(*map[int16]float32)
v, changed := fastpathTV.DecMapInt16Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]float32)
+ v := rv2i(rv).(map[int16]float32)
fastpathTV.DecMapInt16Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35576,43 +32916,33 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[int16]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35623,13 +32953,13 @@ func (_ fastpathT) DecMapInt16Float32V(v map[int16]float32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt16Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]float64)
+ vp := rv2i(rv.Addr()).(*map[int16]float64)
v, changed := fastpathTV.DecMapInt16Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]float64)
+ v := rv2i(rv).(map[int16]float64)
fastpathTV.DecMapInt16Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35650,43 +32980,33 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int16]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int16(dd.DecodeInt(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -35697,13 +33017,13 @@ func (_ fastpathT) DecMapInt16Float64V(v map[int16]float64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt16BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int16]bool)
+ vp := rv2i(rv.Addr()).(*map[int16]bool)
v, changed := fastpathTV.DecMapInt16BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int16]bool)
+ v := rv2i(rv).(map[int16]bool)
fastpathTV.DecMapInt16BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35724,43 +33044,33 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[int16]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int16(dd.DecodeInt(16))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -35771,13 +33081,13 @@ func (_ fastpathT) DecMapInt16BoolV(v map[int16]bool, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt32IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]interface{})
+ vp := rv2i(rv.Addr()).(*map[int32]interface{})
v, changed := fastpathTV.DecMapInt32IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]interface{})
+ v := rv2i(rv).(map[int32]interface{})
fastpathTV.DecMapInt32IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35798,53 +33108,38 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[int32]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -35855,13 +33150,13 @@ func (_ fastpathT) DecMapInt32IntfV(v map[int32]interface{}, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapInt32StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]string)
+ vp := rv2i(rv.Addr()).(*map[int32]string)
v, changed := fastpathTV.DecMapInt32StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]string)
+ v := rv2i(rv).(map[int32]string)
fastpathTV.DecMapInt32StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35882,43 +33177,33 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 20)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 20)
v = make(map[int32]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int32(dd.DecodeInt(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -35929,13 +33214,13 @@ func (_ fastpathT) DecMapInt32StringV(v map[int32]string, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt32UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]uint)
+ vp := rv2i(rv.Addr()).(*map[int32]uint)
v, changed := fastpathTV.DecMapInt32UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]uint)
+ v := rv2i(rv).(map[int32]uint)
fastpathTV.DecMapInt32UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -35956,43 +33241,33 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int32]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36003,13 +33278,13 @@ func (_ fastpathT) DecMapInt32UintV(v map[int32]uint, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt32Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]uint8)
+ vp := rv2i(rv.Addr()).(*map[int32]uint8)
v, changed := fastpathTV.DecMapInt32Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]uint8)
+ v := rv2i(rv).(map[int32]uint8)
fastpathTV.DecMapInt32Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36030,43 +33305,33 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[int32]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36077,13 +33342,13 @@ func (_ fastpathT) DecMapInt32Uint8V(v map[int32]uint8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt32Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]uint16)
+ vp := rv2i(rv.Addr()).(*map[int32]uint16)
v, changed := fastpathTV.DecMapInt32Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]uint16)
+ v := rv2i(rv).(map[int32]uint16)
fastpathTV.DecMapInt32Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36104,43 +33369,33 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[int32]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36151,13 +33406,13 @@ func (_ fastpathT) DecMapInt32Uint16V(v map[int32]uint16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt32Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]uint32)
+ vp := rv2i(rv.Addr()).(*map[int32]uint32)
v, changed := fastpathTV.DecMapInt32Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]uint32)
+ v := rv2i(rv).(map[int32]uint32)
fastpathTV.DecMapInt32Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36178,43 +33433,33 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[int32]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36225,13 +33470,13 @@ func (_ fastpathT) DecMapInt32Uint32V(v map[int32]uint32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt32Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]uint64)
+ vp := rv2i(rv.Addr()).(*map[int32]uint64)
v, changed := fastpathTV.DecMapInt32Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]uint64)
+ v := rv2i(rv).(map[int32]uint64)
fastpathTV.DecMapInt32Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36252,43 +33497,33 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int32]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int32(dd.DecodeInt(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -36299,13 +33534,13 @@ func (_ fastpathT) DecMapInt32Uint64V(v map[int32]uint64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt32UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]uintptr)
+ vp := rv2i(rv.Addr()).(*map[int32]uintptr)
v, changed := fastpathTV.DecMapInt32UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]uintptr)
+ v := rv2i(rv).(map[int32]uintptr)
fastpathTV.DecMapInt32UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36326,43 +33561,33 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int32]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36373,13 +33598,13 @@ func (_ fastpathT) DecMapInt32UintptrV(v map[int32]uintptr, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt32IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]int)
+ vp := rv2i(rv.Addr()).(*map[int32]int)
v, changed := fastpathTV.DecMapInt32IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]int)
+ v := rv2i(rv).(map[int32]int)
fastpathTV.DecMapInt32IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36400,43 +33625,33 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int32]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36447,13 +33662,13 @@ func (_ fastpathT) DecMapInt32IntV(v map[int32]int, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapInt32Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]int8)
+ vp := rv2i(rv.Addr()).(*map[int32]int8)
v, changed := fastpathTV.DecMapInt32Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]int8)
+ v := rv2i(rv).(map[int32]int8)
fastpathTV.DecMapInt32Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36474,43 +33689,33 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[int32]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36521,13 +33726,13 @@ func (_ fastpathT) DecMapInt32Int8V(v map[int32]int8, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt32Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]int16)
+ vp := rv2i(rv.Addr()).(*map[int32]int16)
v, changed := fastpathTV.DecMapInt32Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]int16)
+ v := rv2i(rv).(map[int32]int16)
fastpathTV.DecMapInt32Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36548,43 +33753,33 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 6)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 6)
v = make(map[int32]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36595,13 +33790,13 @@ func (_ fastpathT) DecMapInt32Int16V(v map[int32]int16, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt32Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]int32)
+ vp := rv2i(rv.Addr()).(*map[int32]int32)
v, changed := fastpathTV.DecMapInt32Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]int32)
+ v := rv2i(rv).(map[int32]int32)
fastpathTV.DecMapInt32Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36622,43 +33817,33 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[int32]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36669,13 +33854,13 @@ func (_ fastpathT) DecMapInt32Int32V(v map[int32]int32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt32Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]int64)
+ vp := rv2i(rv.Addr()).(*map[int32]int64)
v, changed := fastpathTV.DecMapInt32Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]int64)
+ v := rv2i(rv).(map[int32]int64)
fastpathTV.DecMapInt32Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36696,43 +33881,33 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int32]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int32(dd.DecodeInt(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -36743,13 +33918,13 @@ func (_ fastpathT) DecMapInt32Int64V(v map[int32]int64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt32Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]float32)
+ vp := rv2i(rv.Addr()).(*map[int32]float32)
v, changed := fastpathTV.DecMapInt32Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]float32)
+ v := rv2i(rv).(map[int32]float32)
fastpathTV.DecMapInt32Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36770,43 +33945,33 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 8)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 8)
v = make(map[int32]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -36817,13 +33982,13 @@ func (_ fastpathT) DecMapInt32Float32V(v map[int32]float32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt32Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]float64)
+ vp := rv2i(rv.Addr()).(*map[int32]float64)
v, changed := fastpathTV.DecMapInt32Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]float64)
+ v := rv2i(rv).(map[int32]float64)
fastpathTV.DecMapInt32Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36844,43 +34009,33 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int32]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int32(dd.DecodeInt(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -36891,13 +34046,13 @@ func (_ fastpathT) DecMapInt32Float64V(v map[int32]float64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt32BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int32]bool)
+ vp := rv2i(rv.Addr()).(*map[int32]bool)
v, changed := fastpathTV.DecMapInt32BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int32]bool)
+ v := rv2i(rv).(map[int32]bool)
fastpathTV.DecMapInt32BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36918,43 +34073,33 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[int32]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = int32(dd.DecodeInt(32))
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -36965,13 +34110,13 @@ func (_ fastpathT) DecMapInt32BoolV(v map[int32]bool, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt64IntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]interface{})
+ vp := rv2i(rv.Addr()).(*map[int64]interface{})
v, changed := fastpathTV.DecMapInt64IntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]interface{})
+ v := rv2i(rv).(map[int64]interface{})
fastpathTV.DecMapInt64IntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -36992,53 +34137,38 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canC
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[int64]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -37049,13 +34179,13 @@ func (_ fastpathT) DecMapInt64IntfV(v map[int64]interface{}, checkNil bool, canC
func (f *decFnInfo) fastpathDecMapInt64StringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]string)
+ vp := rv2i(rv.Addr()).(*map[int64]string)
v, changed := fastpathTV.DecMapInt64StringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]string)
+ v := rv2i(rv).(map[int64]string)
fastpathTV.DecMapInt64StringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37076,43 +34206,33 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 24)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 24)
v = make(map[int64]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37123,13 +34243,13 @@ func (_ fastpathT) DecMapInt64StringV(v map[int64]string, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt64UintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]uint)
+ vp := rv2i(rv.Addr()).(*map[int64]uint)
v, changed := fastpathTV.DecMapInt64UintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]uint)
+ v := rv2i(rv).(map[int64]uint)
fastpathTV.DecMapInt64UintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37150,43 +34270,33 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int64]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37197,13 +34307,13 @@ func (_ fastpathT) DecMapInt64UintV(v map[int64]uint, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt64Uint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]uint8)
+ vp := rv2i(rv.Addr()).(*map[int64]uint8)
v, changed := fastpathTV.DecMapInt64Uint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]uint8)
+ v := rv2i(rv).(map[int64]uint8)
fastpathTV.DecMapInt64Uint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37224,43 +34334,33 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int64]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint8(dd.DecodeUint(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37271,13 +34371,13 @@ func (_ fastpathT) DecMapInt64Uint8V(v map[int64]uint8, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt64Uint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]uint16)
+ vp := rv2i(rv.Addr()).(*map[int64]uint16)
v, changed := fastpathTV.DecMapInt64Uint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]uint16)
+ v := rv2i(rv).(map[int64]uint16)
fastpathTV.DecMapInt64Uint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37298,43 +34398,33 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int64]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint16(dd.DecodeUint(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37345,13 +34435,13 @@ func (_ fastpathT) DecMapInt64Uint16V(v map[int64]uint16, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt64Uint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]uint32)
+ vp := rv2i(rv.Addr()).(*map[int64]uint32)
v, changed := fastpathTV.DecMapInt64Uint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]uint32)
+ v := rv2i(rv).(map[int64]uint32)
fastpathTV.DecMapInt64Uint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37372,43 +34462,33 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int64]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint32(dd.DecodeUint(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37419,13 +34499,13 @@ func (_ fastpathT) DecMapInt64Uint32V(v map[int64]uint32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt64Uint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]uint64)
+ vp := rv2i(rv.Addr()).(*map[int64]uint64)
v, changed := fastpathTV.DecMapInt64Uint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]uint64)
+ v := rv2i(rv).(map[int64]uint64)
fastpathTV.DecMapInt64Uint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37446,43 +34526,33 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int64]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37493,13 +34563,13 @@ func (_ fastpathT) DecMapInt64Uint64V(v map[int64]uint64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapInt64UintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]uintptr)
+ vp := rv2i(rv.Addr()).(*map[int64]uintptr)
v, changed := fastpathTV.DecMapInt64UintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]uintptr)
+ v := rv2i(rv).(map[int64]uintptr)
fastpathTV.DecMapInt64UintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37520,43 +34590,33 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int64]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uintptr(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37567,13 +34627,13 @@ func (_ fastpathT) DecMapInt64UintptrV(v map[int64]uintptr, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt64IntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]int)
+ vp := rv2i(rv.Addr()).(*map[int64]int)
v, changed := fastpathTV.DecMapInt64IntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]int)
+ v := rv2i(rv).(map[int64]int)
fastpathTV.DecMapInt64IntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37594,43 +34654,33 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int64]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int(dd.DecodeInt(intBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37641,13 +34691,13 @@ func (_ fastpathT) DecMapInt64IntV(v map[int64]int, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapInt64Int8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]int8)
+ vp := rv2i(rv.Addr()).(*map[int64]int8)
v, changed := fastpathTV.DecMapInt64Int8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]int8)
+ v := rv2i(rv).(map[int64]int8)
fastpathTV.DecMapInt64Int8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37668,43 +34718,33 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int64]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int8(dd.DecodeInt(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37715,13 +34755,13 @@ func (_ fastpathT) DecMapInt64Int8V(v map[int64]int8, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapInt64Int16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]int16)
+ vp := rv2i(rv.Addr()).(*map[int64]int16)
v, changed := fastpathTV.DecMapInt64Int16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]int16)
+ v := rv2i(rv).(map[int64]int16)
fastpathTV.DecMapInt64Int16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37742,43 +34782,33 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 10)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 10)
v = make(map[int64]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int16(dd.DecodeInt(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37789,13 +34819,13 @@ func (_ fastpathT) DecMapInt64Int16V(v map[int64]int16, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt64Int32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]int32)
+ vp := rv2i(rv.Addr()).(*map[int64]int32)
v, changed := fastpathTV.DecMapInt64Int32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]int32)
+ v := rv2i(rv).(map[int64]int32)
fastpathTV.DecMapInt64Int32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37816,43 +34846,33 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int64]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int32(dd.DecodeInt(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37863,13 +34883,13 @@ func (_ fastpathT) DecMapInt64Int32V(v map[int64]int32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt64Int64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]int64)
+ vp := rv2i(rv.Addr()).(*map[int64]int64)
v, changed := fastpathTV.DecMapInt64Int64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]int64)
+ v := rv2i(rv).(map[int64]int64)
fastpathTV.DecMapInt64Int64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37890,43 +34910,33 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int64]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -37937,13 +34947,13 @@ func (_ fastpathT) DecMapInt64Int64V(v map[int64]int64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapInt64Float32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]float32)
+ vp := rv2i(rv.Addr()).(*map[int64]float32)
v, changed := fastpathTV.DecMapInt64Float32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]float32)
+ v := rv2i(rv).(map[int64]float32)
fastpathTV.DecMapInt64Float32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -37964,43 +34974,33 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 12)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 12)
v = make(map[int64]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = float32(dd.DecodeFloat(true))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38011,13 +35011,13 @@ func (_ fastpathT) DecMapInt64Float32V(v map[int64]float32, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt64Float64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]float64)
+ vp := rv2i(rv.Addr()).(*map[int64]float64)
v, changed := fastpathTV.DecMapInt64Float64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]float64)
+ v := rv2i(rv).(map[int64]float64)
fastpathTV.DecMapInt64Float64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38038,43 +35038,33 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canCh
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 16)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 16)
v = make(map[int64]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38085,13 +35075,13 @@ func (_ fastpathT) DecMapInt64Float64V(v map[int64]float64, checkNil bool, canCh
func (f *decFnInfo) fastpathDecMapInt64BoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[int64]bool)
+ vp := rv2i(rv.Addr()).(*map[int64]bool)
v, changed := fastpathTV.DecMapInt64BoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[int64]bool)
+ v := rv2i(rv).(map[int64]bool)
fastpathTV.DecMapInt64BoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38112,43 +35102,33 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[int64]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeInt(64)
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38159,13 +35139,13 @@ func (_ fastpathT) DecMapInt64BoolV(v map[int64]bool, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapBoolIntfR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]interface{})
+ vp := rv2i(rv.Addr()).(*map[bool]interface{})
v, changed := fastpathTV.DecMapBoolIntfV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]interface{})
+ v := rv2i(rv).(map[bool]interface{})
fastpathTV.DecMapBoolIntfV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38186,53 +35166,38 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canCha
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[bool]interface{}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ 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 {
@@ -38243,13 +35208,13 @@ func (_ fastpathT) DecMapBoolIntfV(v map[bool]interface{}, checkNil bool, canCha
func (f *decFnInfo) fastpathDecMapBoolStringR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]string)
+ vp := rv2i(rv.Addr()).(*map[bool]string)
v, changed := fastpathTV.DecMapBoolStringV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]string)
+ v := rv2i(rv).(map[bool]string)
fastpathTV.DecMapBoolStringV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38270,43 +35235,33 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 17)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 17)
v = make(map[bool]string, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeString()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38317,13 +35272,13 @@ func (_ fastpathT) DecMapBoolStringV(v map[bool]string, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapBoolUintR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]uint)
+ vp := rv2i(rv.Addr()).(*map[bool]uint)
v, changed := fastpathTV.DecMapBoolUintV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]uint)
+ v := rv2i(rv).(map[bool]uint)
fastpathTV.DecMapBoolUintV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38344,43 +35299,33 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[bool]uint, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38391,13 +35336,13 @@ func (_ fastpathT) DecMapBoolUintV(v map[bool]uint, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapBoolUint8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]uint8)
+ vp := rv2i(rv.Addr()).(*map[bool]uint8)
v, changed := fastpathTV.DecMapBoolUint8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]uint8)
+ v := rv2i(rv).(map[bool]uint8)
fastpathTV.DecMapBoolUint8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38418,43 +35363,33 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[bool]uint8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint8(dd.DecodeUint(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38465,13 +35400,13 @@ func (_ fastpathT) DecMapBoolUint8V(v map[bool]uint8, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapBoolUint16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]uint16)
+ vp := rv2i(rv.Addr()).(*map[bool]uint16)
v, changed := fastpathTV.DecMapBoolUint16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]uint16)
+ v := rv2i(rv).(map[bool]uint16)
fastpathTV.DecMapBoolUint16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38492,43 +35427,33 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[bool]uint16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint16(dd.DecodeUint(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38539,13 +35464,13 @@ func (_ fastpathT) DecMapBoolUint16V(v map[bool]uint16, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapBoolUint32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]uint32)
+ vp := rv2i(rv.Addr()).(*map[bool]uint32)
v, changed := fastpathTV.DecMapBoolUint32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]uint32)
+ v := rv2i(rv).(map[bool]uint32)
fastpathTV.DecMapBoolUint32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38566,43 +35491,33 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[bool]uint32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uint32(dd.DecodeUint(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38613,13 +35528,13 @@ func (_ fastpathT) DecMapBoolUint32V(v map[bool]uint32, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapBoolUint64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]uint64)
+ vp := rv2i(rv.Addr()).(*map[bool]uint64)
v, changed := fastpathTV.DecMapBoolUint64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]uint64)
+ v := rv2i(rv).(map[bool]uint64)
fastpathTV.DecMapBoolUint64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38640,43 +35555,33 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[bool]uint64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeUint(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38687,13 +35592,13 @@ func (_ fastpathT) DecMapBoolUint64V(v map[bool]uint64, checkNil bool, canChange
func (f *decFnInfo) fastpathDecMapBoolUintptrR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]uintptr)
+ vp := rv2i(rv.Addr()).(*map[bool]uintptr)
v, changed := fastpathTV.DecMapBoolUintptrV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]uintptr)
+ v := rv2i(rv).(map[bool]uintptr)
fastpathTV.DecMapBoolUintptrV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38714,43 +35619,33 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[bool]uintptr, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = uintptr(dd.DecodeUint(uintBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38761,13 +35656,13 @@ func (_ fastpathT) DecMapBoolUintptrV(v map[bool]uintptr, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapBoolIntR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]int)
+ vp := rv2i(rv.Addr()).(*map[bool]int)
v, changed := fastpathTV.DecMapBoolIntV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]int)
+ v := rv2i(rv).(map[bool]int)
fastpathTV.DecMapBoolIntV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38788,43 +35683,33 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool,
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[bool]int, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int(dd.DecodeInt(intBitsize))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38835,13 +35720,13 @@ func (_ fastpathT) DecMapBoolIntV(v map[bool]int, checkNil bool, canChange bool,
func (f *decFnInfo) fastpathDecMapBoolInt8R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]int8)
+ vp := rv2i(rv.Addr()).(*map[bool]int8)
v, changed := fastpathTV.DecMapBoolInt8V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]int8)
+ v := rv2i(rv).(map[bool]int8)
fastpathTV.DecMapBoolInt8V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38862,43 +35747,33 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[bool]int8, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int8(dd.DecodeInt(8))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38909,13 +35784,13 @@ func (_ fastpathT) DecMapBoolInt8V(v map[bool]int8, checkNil bool, canChange boo
func (f *decFnInfo) fastpathDecMapBoolInt16R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]int16)
+ vp := rv2i(rv.Addr()).(*map[bool]int16)
v, changed := fastpathTV.DecMapBoolInt16V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]int16)
+ v := rv2i(rv).(map[bool]int16)
fastpathTV.DecMapBoolInt16V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -38936,43 +35811,33 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 3)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 3)
v = make(map[bool]int16, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int16(dd.DecodeInt(16))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -38983,13 +35848,13 @@ func (_ fastpathT) DecMapBoolInt16V(v map[bool]int16, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapBoolInt32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]int32)
+ vp := rv2i(rv.Addr()).(*map[bool]int32)
v, changed := fastpathTV.DecMapBoolInt32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]int32)
+ v := rv2i(rv).(map[bool]int32)
fastpathTV.DecMapBoolInt32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -39010,43 +35875,33 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[bool]int32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = int32(dd.DecodeInt(32))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -39057,13 +35912,13 @@ func (_ fastpathT) DecMapBoolInt32V(v map[bool]int32, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapBoolInt64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]int64)
+ vp := rv2i(rv.Addr()).(*map[bool]int64)
v, changed := fastpathTV.DecMapBoolInt64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]int64)
+ v := rv2i(rv).(map[bool]int64)
fastpathTV.DecMapBoolInt64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -39084,43 +35939,33 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange b
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[bool]int64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeInt(64)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -39131,13 +35976,13 @@ func (_ fastpathT) DecMapBoolInt64V(v map[bool]int64, checkNil bool, canChange b
func (f *decFnInfo) fastpathDecMapBoolFloat32R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]float32)
+ vp := rv2i(rv.Addr()).(*map[bool]float32)
v, changed := fastpathTV.DecMapBoolFloat32V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]float32)
+ v := rv2i(rv).(map[bool]float32)
fastpathTV.DecMapBoolFloat32V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -39158,43 +36003,33 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 5)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 5)
v = make(map[bool]float32, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = float32(dd.DecodeFloat(true))
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -39205,13 +36040,13 @@ func (_ fastpathT) DecMapBoolFloat32V(v map[bool]float32, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapBoolFloat64R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]float64)
+ vp := rv2i(rv.Addr()).(*map[bool]float64)
v, changed := fastpathTV.DecMapBoolFloat64V(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]float64)
+ v := rv2i(rv).(map[bool]float64)
fastpathTV.DecMapBoolFloat64V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -39232,43 +36067,33 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChan
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 9)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 9)
v = make(map[bool]float64, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeFloat(false)
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
@@ -39279,13 +36104,13 @@ func (_ fastpathT) DecMapBoolFloat64V(v map[bool]float64, checkNil bool, canChan
func (f *decFnInfo) fastpathDecMapBoolBoolR(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[bool]bool)
+ vp := rv2i(rv.Addr()).(*map[bool]bool)
v, changed := fastpathTV.DecMapBoolBoolV(*vp, fastpathCheckNilFalse, true, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().(map[bool]bool)
+ v := rv2i(rv).(map[bool]bool)
fastpathTV.DecMapBoolBoolV(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -39306,43 +36131,33 @@ func (_ fastpathT) DecMapBoolBoolV(v map[bool]bool, checkNil bool, canChange boo
}
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, 2)
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, 2)
v = make(map[bool]bool, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil {
+ cr.sendContainerState(containerMapEnd)
+ }
+ return v, changed
+ }
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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || dd.CheckBreak()); j++ {
+ if cr != nil {
+ cr.sendContainerState(containerMapKey)
}
- } 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
- }
+ mk = dd.DecodeBool()
+ if cr != nil {
+ cr.sendContainerState(containerMapValue)
+ }
+ mv = dd.DecodeBool()
+ if v != nil {
+ v[mk] = mv
}
}
if cr != nil {
diff --git a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
index c3ffdf93d..0ce15ded0 100644
--- a/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
+++ b/vendor/github.com/ugorji/go/codec/fast-path.go.tmpl
@@ -86,7 +86,7 @@ func init() {
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()
+ xptr := rt2id(xrt)
fastpathAV[i] = fastpathE{xptr, xrt, fe, fd}
i++
return
@@ -156,9 +156,9 @@ func fastpathEncodeTypeSwitchMap(iv interface{}, e *Encoder) bool {
func (f *encFnInfo) {{ .MethodNamePfx "fastpathEnc" false }}R(rv reflect.Value) {
if f.ti.mbs {
- fastpathTV.{{ .MethodNamePfx "EncAsMap" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e)
+ fastpathTV.{{ .MethodNamePfx "EncAsMap" false }}V(rv2i(rv).([]{{ .Elem }}), fastpathCheckNilFalse, f.e)
} else {
- fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv.Interface().([]{{ .Elem }}), fastpathCheckNilFalse, f.e)
+ fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).([]{{ .Elem }}), fastpathCheckNilFalse, f.e)
}
}
func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v []{{ .Elem }}, checkNil bool, e *Encoder) {
@@ -206,7 +206,7 @@ func (_ fastpathT) {{ .MethodNamePfx "EncAsMap" false }}V(v []{{ .Elem }}, check
{{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)
+ fastpathTV.{{ .MethodNamePfx "Enc" false }}V(rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }}), fastpathCheckNilFalse, f.e)
}
func (_ fastpathT) {{ .MethodNamePfx "Enc" false }}V(v map[{{ .MapKey }}]{{ .Elem }}, checkNil bool, e *Encoder) {
ee := e.e
@@ -306,13 +306,13 @@ Slices can change if they
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 }})
+ vp := rv2i(rv.Addr()).(*[]{{ .Elem }})
v, changed := fastpathTV.{{ .MethodNamePfx "Dec" false }}V(*vp, fastpathCheckNilFalse, !array, f.d)
if changed {
*vp = v
}
} else {
- v := rv.Interface().([]{{ .Elem }})
+ v := rv2i(rv).([]{{ .Elem }})
fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -327,16 +327,13 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil b
dd := d.d
{{/* // if dd.isContainerType(valueTypeNil) { dd.TryDecodeAsNil() */}}
if checkNil && dd.TryDecodeAsNil() {
- if v != nil {
- changed = true
- }
+ if v != nil { changed = true }
return nil, changed
}
-
slh, containerLenS := d.decSliceHelperStart()
if containerLenS == 0 {
if canChange {
- if v == nil {
+ if v == nil {
v = []{{ .Elem }}{}
} else if len(v) != 0 {
v = v[:0]
@@ -346,98 +343,62 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v []{{ .Elem }}, checkNil b
slh.End()
return v, changed
}
-
- if containerLenS > 0 {
- x2read := containerLenS
- var xtrunc bool
+
+ hasLen := containerLenS > 0
+ var xlen int
+ if hasLen && canChange {
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
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }})
+ if xlen <= cap(v) {
+ v = v[:xlen]
} else {
- d.arrayCannotExpand(len(v), containerLenS)
+ v = make([]{{ .Elem }}, xlen)
}
- x2read = len(v)
+ changed = true
} 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 v, changed
- }
- 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]
+ v = v[:containerLenS]
changed = true
}
}
- slh.End()
+ j := 0
+ for ; (hasLen && j < containerLenS) || !(hasLen || dd.CheckBreak()); j++ {
+ if j == 0 && len(v) == 0 {
+ if hasLen {
+ xlen = decInferLen(containerLenS, d.h.MaxInitLen, {{ .Size }})
+ } else {
+ xlen = 8
+ }
+ v = make([]{{ .Elem }}, xlen)
+ changed = true
+ }
+ // if indefinite, etc, then expand the slice if necessary
+ var decodeIntoBlank bool
+ if j >= len(v) {
+ if canChange {
+ v = append(v, {{ zerocmd .Elem }})
+ changed = true
+ } else {
+ d.arrayCannotExpand(len(v), j+1)
+ decodeIntoBlank = true
+ }
+ }
+ slh.ElemContainerState(j)
+ if decodeIntoBlank {
+ d.swallow()
+ } else {
+ {{ if eq .Elem "interface{}" }}d.decode(&v[j]){{ else }}v[j] = {{ decmd .Elem }}{{ end }}
+ }
+ }
+ if canChange {
+ if j < len(v) {
+ v = v[:j]
+ changed = true
+ } else if j == 0 && v == nil {
+ v = make([]{{ .Elem }}, 0)
+ changed = true
+ }
+ }
+ slh.End()
return v, changed
}
@@ -452,13 +413,13 @@ Maps can change if they are
*/}}
func (f *decFnInfo) {{ .MethodNamePfx "fastpathDec" false }}R(rv reflect.Value) {
if rv.CanAddr() {
- vp := rv.Addr().Interface().(*map[{{ .MapKey }}]{{ .Elem }})
+ vp := rv2i(rv.Addr()).(*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 }})
+ v := rv2i(rv).(map[{{ .MapKey }}]{{ .Elem }})
fastpathTV.{{ .MethodNamePfx "Dec" false }}V(v, fastpathCheckNilFalse, false, f.d)
}
}
@@ -474,50 +435,35 @@ func (_ fastpathT) {{ .MethodNamePfx "Dec" false }}V(v map[{{ .MapKey }}]{{ .Ele
cr := d.cr
{{/* // if dd.isContainerType(valueTypeNil) {dd.TryDecodeAsNil() */}}
if checkNil && dd.TryDecodeAsNil() {
- if v != nil {
- changed = true
- }
+ if v != nil { changed = true }
return nil, changed
}
-
containerLen := dd.ReadMapStart()
if canChange && v == nil {
- xlen, _ := decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }})
+ xlen := decInferLen(containerLen, d.h.MaxInitLen, {{ .Size }})
v = make(map[{{ .MapKey }}]{{ .Elem }}, xlen)
changed = true
}
+ if containerLen == 0 {
+ if cr != nil { cr.sendContainerState(containerMapEnd) }
+ return v, changed
+ }
{{ 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
- }
+ hasLen := containerLen > 0
+ for j := 0; (hasLen && j < containerLen) || !(hasLen || 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) }
diff --git a/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl
index 32df54144..f4f0cdd27 100644
--- a/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl
+++ b/vendor/github.com/ugorji/go/codec/gen-dec-array.go.tmpl
@@ -13,92 +13,58 @@ if {{var "l"}} == 0 {
{{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 */}}
- _, _ = {{var "rl"}}, {{var "rt"}}
- {{var "rr"}} = {{var "l"}} // len({{var "v"}})
+} else {
+ {{var "hl"}} := {{var "l"}} > 0
+ var {{var "rl"}} int
+ {{if isSlice }} if {{var "hl"}} {
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"}})
- }
+ {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }})
+ if {{var "rl"}} <= cap({{var "v"}}) {
+ {{var "v"}} = {{var "v"}}[:{{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"}}) {
+ } else if {{var "l"}} != len({{var "v"}}) {
{{var "v"}} = {{var "v"}}[:{{var "l"}}]
{{var "c"}} = true
- } {{end}} {{/* end isSlice:47 */}}
+ }
+ } {{end}}
{{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 }}
+ for ; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ {
+ if {{var "j"}} == 0 && len({{var "v"}}) == 0 {
+ if {{var "hl"}} {
+ {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }})
+ } else {
+ {{var "rl"}} = 8
+ }
+ {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}})
+ {{var "c"}} = true
}
- } {{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 indefinite, etc, then expand the slice if necessary
+ var {{var "db"}} bool
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}}
+ {{if isSlice }} {{var "v"}} = append({{var "v"}}, {{ zero }}); {{var "c"}} = true
+ {{end}} {{if isArray}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = 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 {
+ if {{var "db"}} {
z.DecSwallow()
+ } else {
+ {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }}
}
- {{end}}
}
- {{if isSlice }}if {{var "j"}} < len({{var "v"}}) {
+ {{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 "v"}} = make([]{{ .Typ }}, 0)
{{var "c"}} = true
- }{{end}}
+ } {{end}}
}
{{var "h"}}.End()
{{if not isArray }}if {{var "c"}} {
*{{ .Varname }} = {{var "v"}}
}{{end}}
+
diff --git a/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl
index 77400e0a1..423d63852 100644
--- a/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl
+++ b/vendor/github.com/ugorji/go/codec/gen-dec-map.go.tmpl
@@ -2,7 +2,7 @@
{{var "l"}} := r.ReadMapStart()
{{var "bh"}} := z.DecBasicHandle()
if {{var "v"}} == nil {
- {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }})
+ {{var "rl"}} := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }})
{{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}})
*{{ .Varname }} = {{var "v"}}
}
@@ -14,8 +14,9 @@ if {{var "bh"}}.MapValueReset {
{{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"}}++ {
+if {{var "l"}} != 0 {
+{{var "hl"}} := {{var "l"}} > 0
+ for {{var "j"}} := 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || 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"}} {
@@ -34,25 +35,5 @@ for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ {
{{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/vendor/github.com/ugorji/go/codec/gen-helper.generated.go b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go
index eb0bdad35..fee017a2a 100644
--- a/vendor/github.com/ugorji/go/codec/gen-helper.generated.go
+++ b/vendor/github.com/ugorji/go/codec/gen-helper.generated.go
@@ -15,6 +15,9 @@ import (
"reflect"
)
+// GenVersion is the current version of codecgen.
+const GenVersion = 6
+
// 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 continuously and without notice.
@@ -26,12 +29,14 @@ import (
// 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
@@ -112,7 +117,7 @@ func (f genHelperEncoder) EncExt(v interface{}) (r bool) {
if rt.Kind() == reflect.Ptr {
rt = rt.Elem()
}
- rtid := reflect.ValueOf(rt).Pointer()
+ rtid := rt2id(rt)
if xfFn := f.e.h.getExt(rtid); xfFn != nil {
f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e)
return true
@@ -172,7 +177,7 @@ func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) {
// 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))
+ fnerr := tm.UnmarshalText(f.d.d.DecodeStringAsBytes())
if fnerr != nil {
panic(fnerr)
}
@@ -180,7 +185,7 @@ func (f genHelperDecoder) DecTextUnmarshal(tm encoding.TextUnmarshaler) {
// 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)
+ // bs := f.dd.DecodeStringAsBytes()
// 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 {
@@ -190,7 +195,7 @@ func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) {
// 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))
+ fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, true))
if fnerr != nil {
panic(fnerr)
}
@@ -222,7 +227,7 @@ func (f genHelperDecoder) HasExtensions() bool {
// 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()
+ rtid := rt2id(rt)
if xfFn := f.d.h.getExt(rtid); xfFn != nil {
f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext)
return true
@@ -231,10 +236,15 @@ func (f genHelperDecoder) DecExt(v interface{}) (r bool) {
}
// 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) {
+func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) {
return decInferLen(clen, maxlen, unit)
}
+// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) StringView(v []byte) string {
+ return stringView(v)
+}
+
// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
func (f genHelperDecoder) DecSendContainerState(c containerState) {
if f.d.cr != nil {
diff --git a/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl
index ad99f6671..2d801c817 100644
--- a/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl
+++ b/vendor/github.com/ugorji/go/codec/gen-helper.go.tmpl
@@ -15,6 +15,9 @@ import (
"reflect"
)
+// GenVersion is the current version of codecgen.
+const GenVersion = {{ .Version }}
+
// 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 continuously and without notice.
@@ -26,12 +29,14 @@ import (
// 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
@@ -103,7 +108,7 @@ func (f genHelperEncoder) EncExt(v interface{}) (r bool) {
if rt.Kind() == reflect.Ptr {
rt = rt.Elem()
}
- rtid := reflect.ValueOf(rt).Pointer()
+ rtid := rt2id(rt)
if xfFn := f.e.h.getExt(rtid); xfFn != nil {
f.e.e.EncodeExt(v, xfFn.tag, xfFn.ext, f.e)
return true
@@ -154,14 +159,14 @@ func (f genHelperDecoder) DecArrayCannotExpand(sliceLen, streamLen int) {
}
// 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))
+ fnerr := tm.UnmarshalText(f.d.d.DecodeStringAsBytes())
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)
+ // bs := f.dd.DecodeStringAsBytes()
// 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 {
@@ -170,7 +175,7 @@ func (f genHelperDecoder) DecJSONUnmarshal(tm jsonUnmarshaler) {
}
// 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))
+ fnerr := bm.UnmarshalBinary(f.d.d.DecodeBytes(nil, true))
if fnerr != nil {
panic(fnerr)
}
@@ -197,7 +202,7 @@ func (f genHelperDecoder) HasExtensions() bool {
// 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()
+ rtid := rt2id(rt)
if xfFn := f.d.h.getExt(rtid); xfFn != nil {
f.d.d.DecodeExt(v, xfFn.tag, xfFn.ext)
return true
@@ -205,10 +210,14 @@ func (f genHelperDecoder) DecExt(v interface{}) (r bool) {
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) {
+func (f genHelperDecoder) DecInferLen(clen, maxlen, unit int) (rvlen int) {
return decInferLen(clen, maxlen, unit)
}
// FOR USE BY CODECGEN ONLY. IT *WILL* CHANGE WITHOUT NOTICE. *DO NOT USE*
+func (f genHelperDecoder) StringView(v []byte) string {
+ return stringView(v)
+}
+// 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/vendor/github.com/ugorji/go/codec/gen.generated.go b/vendor/github.com/ugorji/go/codec/gen.generated.go
index 2ace97b78..2a6123da8 100644
--- a/vendor/github.com/ugorji/go/codec/gen.generated.go
+++ b/vendor/github.com/ugorji/go/codec/gen.generated.go
@@ -10,7 +10,7 @@ const genDecMapTmpl = `
{{var "l"}} := r.ReadMapStart()
{{var "bh"}} := z.DecBasicHandle()
if {{var "v"}} == nil {
- {{var "rl"}}, _ := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }})
+ {{var "rl"}} := z.DecInferLen({{var "l"}}, {{var "bh"}}.MaxInitLen, {{ .Size }})
{{var "v"}} = make(map[{{ .KTyp }}]{{ .Typ }}, {{var "rl"}})
*{{ .Varname }} = {{var "v"}}
}
@@ -22,8 +22,9 @@ if {{var "bh"}}.MapValueReset {
{{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"}}++ {
+if {{var "l"}} != 0 {
+{{var "hl"}} := {{var "l"}} > 0
+ for {{var "j"}} := 0; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || 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"}} {
@@ -42,26 +43,6 @@ for {{var "j"}} := 0; {{var "j"}} < {{var "l"}}; {{var "j"}}++ {
{{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 }})
`
@@ -82,94 +63,60 @@ if {{var "l"}} == 0 {
{{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 */}}
- _, _ = {{var "rl"}}, {{var "rt"}}
- {{var "rr"}} = {{var "l"}} // len({{var "v"}})
+} else {
+ {{var "hl"}} := {{var "l"}} > 0
+ var {{var "rl"}} int
+ {{if isSlice }} if {{var "hl"}} {
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"}})
- }
+ {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }})
+ if {{var "rl"}} <= cap({{var "v"}}) {
+ {{var "v"}} = {{var "v"}}[:{{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"}}) {
+ } else if {{var "l"}} != len({{var "v"}}) {
{{var "v"}} = {{var "v"}}[:{{var "l"}}]
{{var "c"}} = true
- } {{end}} {{/* end isSlice:47 */}}
+ }
+ } {{end}}
{{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 }}
+ for ; ({{var "hl"}} && {{var "j"}} < {{var "l"}}) || !({{var "hl"}} || r.CheckBreak()); {{var "j"}}++ {
+ if {{var "j"}} == 0 && len({{var "v"}}) == 0 {
+ if {{var "hl"}} {
+ {{var "rl"}} = z.DecInferLen({{var "l"}}, z.DecBasicHandle().MaxInitLen, {{ .Size }})
+ } else {
+ {{var "rl"}} = 8
+ }
+ {{var "v"}} = make([]{{ .Typ }}, {{var "rl"}})
+ {{var "c"}} = true
}
- } {{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 indefinite, etc, then expand the slice if necessary
+ var {{var "db"}} bool
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}}
+ {{if isSlice }} {{var "v"}} = append({{var "v"}}, {{ zero }}); {{var "c"}} = true
+ {{end}} {{if isArray}} z.DecArrayCannotExpand(len(v), {{var "j"}}+1); {{var "db"}} = 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 {
+ if {{var "db"}} {
z.DecSwallow()
+ } else {
+ {{ $x := printf "%[1]vv%[2]v[%[1]vj%[2]v]" .TempVar .Rand }}{{ decLineVar $x }}
}
- {{end}}
}
- {{if isSlice }}if {{var "j"}} < len({{var "v"}}) {
+ {{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 "v"}} = make([]{{ .Typ }}, 0)
{{var "c"}} = true
- }{{end}}
+ } {{end}}
}
{{var "h"}}.End()
{{if not isArray }}if {{var "c"}} {
*{{ .Varname }} = {{var "v"}}
}{{end}}
+
`
diff --git a/vendor/github.com/ugorji/go/codec/gen.go b/vendor/github.com/ugorji/go/codec/gen.go
index da66921a6..8f1fd4f64 100644
--- a/vendor/github.com/ugorji/go/codec/gen.go
+++ b/vendor/github.com/ugorji/go/codec/gen.go
@@ -1,3 +1,5 @@
+// +build codecgen.exec
+
// 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.
@@ -80,6 +82,10 @@ import (
// Note:
// It was a conscious 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.
+//
+// Note:
+// codecgen-generated code depends on the variables defined by fast-path.generated.go.
+// consequently, you cannot run with tags "codecgen notfastpath".
// GenVersion is the current version of codecgen.
//
@@ -94,7 +100,8 @@ import (
// 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
+// v6: removed unsafe from gen, and now uses codecgen.exec tag
+const genVersion = 6
const (
genCodecPkg = "codec1978"
@@ -126,7 +133,6 @@ var (
genExpectArrayOrMapErr = errors.New("unexpected type. Expecting array/map/slice")
genBase64enc = base64.NewEncoding("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789__")
genQNameRegex = regexp.MustCompile(`[A-Za-z_.]+`)
- genCheckVendor bool
)
// genRunner holds some state used during a Gen run.
@@ -147,8 +153,7 @@ type genRunner struct {
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?
+ cpfx string // codec package prefix
tm map[reflect.Type]struct{} // types for which enc/dec must be generated
ts []reflect.Type // types for which enc/dec must be generated
@@ -163,8 +168,8 @@ type genRunner struct {
// 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) {
+// Library users: DO NOT USE IT DIRECTLY. IT WILL CHANGE CONTINOUSLY WITHOUT NOTICE.
+func Gen(w io.Writer, buildTags, pkgName, uid string, ti *TypeInfos, typ ...reflect.Type) {
// All types passed to this method do not have a codec.Selfer method implemented directly.
// codecgen already checks the AST and skips any types that define the codec.Selfer methods.
// Consequently, there's no need to check and trim them if they implement codec.Selfer
@@ -173,19 +178,18 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeIn
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,
+ 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
@@ -234,11 +238,8 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeIn
x.linef("%s \"%s\"", x.imn[k], k)
}
// add required packages
- for _, k := range [...]string{"reflect", "unsafe", "runtime", "fmt", "errors"} {
+ for _, k := range [...]string{"reflect", "runtime", "fmt", "errors"} {
if _, ok := x.im[k]; !ok {
- if k == "unsafe" && !x.unsafe {
- continue
- }
x.line("\"" + k + "\"")
}
}
@@ -265,20 +266,16 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeIn
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.varsfxreset()
x.line("func init() {")
- x.linef("if %sGenVersion != %v {", x.cpfx, GenVersion)
+ 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.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")
@@ -289,10 +286,6 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeIn
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++ {
@@ -315,7 +308,7 @@ func Gen(w io.Writer, buildTags, pkgName, uid string, useUnsafe bool, ti *TypeIn
}
for _, t := range x.ts {
- rtid := reflect.ValueOf(t).Pointer()
+ rtid := rt2id(t)
// generate enc functions for all these slice/map types.
x.varsfxreset()
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)
@@ -545,21 +538,21 @@ func (x *genRunner) selfer(encode bool) {
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.decStructMap(genTopLevelVarName, "l", rt2id(t0), 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.decStructMap(genTopLevelVarName, "l", rt2id(t0), 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.decStructMap(genTopLevelVarName, "l", rt2id(t0), t0, genStructMapStyleCheckBreak)
x.line("}")
x.line("")
}
@@ -568,7 +561,7 @@ func (x *genRunner) selfer(encode bool) {
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.decStructArray(genTopLevelVarName, "l", "return", rt2id(t0), t0)
x.line("}")
x.line("")
@@ -645,7 +638,7 @@ func (x *genRunner) encVar(varname string, t reflect.Type) {
// enc will encode a variable (varname) of type t,
// except t is of kind reflect.Struct or reflect.Array, wherein varname is of type ptrTo(T) (to prevent copying)
func (x *genRunner) enc(varname string, t reflect.Type) {
- rtid := reflect.ValueOf(t).Pointer()
+ rtid := rt2id(t)
// 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
@@ -1098,7 +1091,7 @@ 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()
+ rtid := rt2id(t)
tptr := reflect.PtrTo(t)
if x.checkForSelfer(t, varname) {
if t.Implements(selferTyp) || tptr.Implements(selferTyp) {
@@ -1231,7 +1224,7 @@ func (x *genRunner) dec(varname string, t reflect.Type) {
// - 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)")
+ x.line("*" + varname + " = r.DecodeBytes(*(*[]byte)(" + varname + "), false)")
} else if fastpathAV.index(rtid) != -1 {
g := x.newGenV(t)
x.line("z.F." + g.MethodNamePfx("Dec", false) + "X(" + varname + ", false, d)")
@@ -1318,11 +1311,11 @@ func (x *genRunner) decTryAssignPrimitive(varname string, t reflect.Type) (tryAs
func (x *genRunner) decListFallback(varname string, rtid uintptr, t reflect.Type) {
if t.AssignableTo(uint8SliceTyp) {
- x.line("*" + varname + " = r.DecodeBytes(*((*[]byte)(" + varname + ")), false, false)")
+ x.line("*" + varname + " = r.DecodeBytes(*((*[]byte)(" + varname + ")), false)")
return
}
if t.Kind() == reflect.Array && t.Elem().Kind() == reflect.Uint8 {
- x.linef("r.DecodeBytes( ((*[%s]byte)(%s))[:], false, true)", t.Len(), varname)
+ x.linef("r.DecodeBytes( ((*[%s]byte)(%s))[:], true)", t.Len(), varname)
return
}
type tstruc struct {
@@ -1469,17 +1462,6 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref
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).
@@ -1499,15 +1481,9 @@ func (x *genRunner) decStructMap(varname, lenvarname string, rtid uintptr, t ref
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)")
+ x.line(kName + "Slc = r.DecodeStringAsBytes()")
// 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.line(kName + " := string(" + kName + "Slc)")
x.linef("z.DecSendContainerState(codecSelfer_containerMapValue%s)", x.xs)
x.decStructMapSwitch(kName, varname, rtid, t)
@@ -1776,8 +1752,8 @@ func genIsImmutable(t reflect.Type) (v bool) {
}
type genInternal struct {
- Values []genV
- Unsafe bool
+ Version int
+ Values []genV
}
func (x genInternal) FastpathLen() (l int) {
@@ -1891,7 +1867,7 @@ func stripVendor(s string) string {
}
// var genInternalMu sync.Mutex
-var genInternalV genInternal
+var genInternalV = genInternal{Version: genVersion}
var genInternalTmplFuncs template.FuncMap
var genInternalOnce sync.Once
@@ -1954,7 +1930,7 @@ func genInternalInit() {
"float64": 8,
"bool": 1,
}
- var gt genInternal
+ var gt = genInternal{Version: genVersion}
// For each slice or map type, there must be a (symmetrical) Encode and Decode fast-path function
for _, s := range types {
@@ -1986,11 +1962,10 @@ func genInternalInit() {
// 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) {
+func genInternalGoFile(r io.Reader, w io.Writer) (err error) {
genInternalOnce.Do(genInternalInit)
gt := genInternalV
- gt.Unsafe = !safe
t := template.New("").Funcs(genInternalTmplFuncs)
diff --git a/vendor/github.com/ugorji/go/codec/decode_go.go b/vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go
similarity index 59%
rename from vendor/github.com/ugorji/go/codec/decode_go.go
rename to vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go
index ba289cef6..7567e2c07 100644
--- a/vendor/github.com/ugorji/go/codec/decode_go.go
+++ b/vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go
@@ -9,8 +9,6 @@ import "reflect"
const reflectArrayOfSupported = true
-func reflectArrayOf(rvn reflect.Value) (rvn2 reflect.Value) {
- rvn2 = reflect.New(reflect.ArrayOf(rvn.Len(), intfTyp)).Elem()
- reflect.Copy(rvn2, rvn)
- return
+func reflectArrayOf(count int, elem reflect.Type) reflect.Type {
+ return reflect.ArrayOf(count, elem)
}
diff --git a/vendor/github.com/ugorji/go/codec/decode_go14.go b/vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go
similarity index 64%
rename from vendor/github.com/ugorji/go/codec/decode_go14.go
rename to vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go
index 50063bc8f..ec94bd0c0 100644
--- a/vendor/github.com/ugorji/go/codec/decode_go14.go
+++ b/vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go
@@ -9,6 +9,6 @@ import "reflect"
const reflectArrayOfSupported = false
-func reflectArrayOf(rvn reflect.Value) (rvn2 reflect.Value) {
- panic("reflect.ArrayOf unsupported")
+func reflectArrayOf(count int, elem reflect.Type) reflect.Type {
+ panic("codec: reflect.ArrayOf unsupported in this go version")
}
diff --git a/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go b/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go
new file mode 100644
index 000000000..51fe40e5b
--- /dev/null
+++ b/vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go
@@ -0,0 +1,15 @@
+// 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.
+
+// +build go1.9
+
+package codec
+
+import "reflect"
+
+func makeMapReflect(t reflect.Type, size int) reflect.Value {
+ if size < 0 {
+ return reflect.MakeMapWithSize(t, 4)
+ }
+ return reflect.MakeMapWithSize(t, size)
+}
diff --git a/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go b/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go
new file mode 100644
index 000000000..d4b9c2c8d
--- /dev/null
+++ b/vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go
@@ -0,0 +1,12 @@
+// 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.
+
+// +build !go1.9
+
+package codec
+
+import "reflect"
+
+func makeMapReflect(t reflect.Type, size int) reflect.Value {
+ return reflect.MakeMap(t)
+}
diff --git a/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go b/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go
new file mode 100644
index 000000000..dcd8c3d11
--- /dev/null
+++ b/vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go
@@ -0,0 +1,17 @@
+// 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.
+
+// +build !go1.4
+
+package codec
+
+// This codec package will only work for go1.4 and above.
+// This is for the following reasons:
+// - go 1.4 was released in 2014
+// - go runtime is written fully in go
+// - interface only holds pointers
+// - reflect.Value is stabilized as 3 words
+
+func init() {
+ panic("codec: go 1.3 and below are not supported")
+}
diff --git a/vendor/github.com/ugorji/go/codec/gen_15.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go
similarity index 72%
rename from vendor/github.com/ugorji/go/codec/gen_15.go
rename to vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go
index ab76c3102..68626e1ce 100644
--- a/vendor/github.com/ugorji/go/codec/gen_15.go
+++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go
@@ -7,6 +7,4 @@ package codec
import "os"
-func init() {
- genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1"
-}
+var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1"
diff --git a/vendor/github.com/ugorji/go/codec/gen_16.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go
similarity index 65%
rename from vendor/github.com/ugorji/go/codec/gen_16.go
rename to vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go
index 87c04e2e1..344f5967b 100644
--- a/vendor/github.com/ugorji/go/codec/gen_16.go
+++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go
@@ -1,12 +1,10 @@
// 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.
-// +build go1.6
+// +build go1.6,!go1.7
package codec
import "os"
-func init() {
- genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0"
-}
+var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0"
diff --git a/vendor/github.com/ugorji/go/codec/gen_17.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go
similarity index 82%
rename from vendor/github.com/ugorji/go/codec/gen_17.go
rename to vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go
index 3881a43ce..de91d2940 100644
--- a/vendor/github.com/ugorji/go/codec/gen_17.go
+++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go
@@ -5,6 +5,4 @@
package codec
-func init() {
- genCheckVendor = true
-}
+const genCheckVendor = true
diff --git a/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go b/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go
new file mode 100644
index 000000000..9d007bfed
--- /dev/null
+++ b/vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go
@@ -0,0 +1,8 @@
+// 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.
+
+// +build !go1.5
+
+package codec
+
+var genCheckVendor = false
diff --git a/vendor/github.com/ugorji/go/codec/helper.go b/vendor/github.com/ugorji/go/codec/helper.go
index 8b94fc1e4..541256cb8 100644
--- a/vendor/github.com/ugorji/go/codec/helper.go
+++ b/vendor/github.com/ugorji/go/codec/helper.go
@@ -133,11 +133,11 @@ const (
// Note that this will always cause rpc tests to fail, since they need io.EOF sent via panic.
recoverPanicToErr = true
- // 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.
+ // resetSliceElemToZeroValue: on decoding a slice, reset the element to a zero value first.
+ // concern: 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
+ resetSliceElemToZeroValue = false
)
var (
@@ -250,6 +250,8 @@ type jsonUnmarshaler interface {
UnmarshalJSON([]byte) error
}
+// type byteAccepter func(byte) bool
+
var (
bigen = binary.BigEndian
structInfoFieldName = "_struct"
@@ -278,17 +280,17 @@ var (
selferTyp = reflect.TypeOf((*Selfer)(nil)).Elem()
- uint8SliceTypId = reflect.ValueOf(uint8SliceTyp).Pointer()
- rawExtTypId = reflect.ValueOf(rawExtTyp).Pointer()
- rawTypId = reflect.ValueOf(rawTyp).Pointer()
- intfTypId = reflect.ValueOf(intfTyp).Pointer()
- timeTypId = reflect.ValueOf(timeTyp).Pointer()
- stringTypId = reflect.ValueOf(stringTyp).Pointer()
+ uint8SliceTypId = rt2id(uint8SliceTyp)
+ rawExtTypId = rt2id(rawExtTyp)
+ rawTypId = rt2id(rawTyp)
+ intfTypId = rt2id(intfTyp)
+ timeTypId = rt2id(timeTyp)
+ stringTypId = rt2id(stringTyp)
- mapStrIntfTypId = reflect.ValueOf(mapStrIntfTyp).Pointer()
- mapIntfIntfTypId = reflect.ValueOf(mapIntfIntfTyp).Pointer()
- intfSliceTypId = reflect.ValueOf(intfSliceTyp).Pointer()
- // mapBySliceTypId = reflect.ValueOf(mapBySliceTyp).Pointer()
+ mapStrIntfTypId = rt2id(mapStrIntfTyp)
+ mapIntfIntfTypId = rt2id(mapIntfIntfTyp)
+ intfSliceTypId = rt2id(intfSliceTyp)
+ // mapBySliceTypId = rt2id(mapBySliceTyp)
intBitsize uint8 = uint8(reflect.TypeOf(int(0)).Bits())
uintBitsize uint8 = uint8(reflect.TypeOf(uint(0)).Bits())
@@ -303,6 +305,24 @@ var (
var defTypeInfos = NewTypeInfos([]string{"codec", "json"})
+var immutableKindsSet = [32]bool{
+ reflect.Int: true,
+ reflect.Int8: true,
+ reflect.Int16: true,
+ reflect.Int32: true,
+ reflect.Int64: true,
+ reflect.Uint: true,
+ reflect.Uint8: true,
+ reflect.Uint16: true,
+ reflect.Uint32: true,
+ reflect.Uint64: true,
+ reflect.Uintptr: true,
+ reflect.Float32: true,
+ reflect.Float64: true,
+ reflect.Bool: true,
+ reflect.String: true,
+}
+
// 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.
@@ -343,10 +363,10 @@ func (x *BasicHandle) getBasicHandle() *BasicHandle {
}
func (x *BasicHandle) getTypeInfo(rtid uintptr, rt reflect.Type) (pti *typeInfo) {
- if x.TypeInfos != nil {
- return x.TypeInfos.get(rtid, rt)
+ if x.TypeInfos == nil {
+ return defTypeInfos.get(rtid, rt)
}
- return defTypeInfos.get(rtid, rt)
+ return x.TypeInfos.get(rtid, rt)
}
// Handle is the interface for a specific encoding format.
@@ -476,9 +496,6 @@ func (x *setExtWrapper) UpdateExt(dest interface{}, v interface{}) {
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 }
@@ -559,7 +576,7 @@ func (o *extHandle) SetExt(rt reflect.Type, tag uint64, ext Ext) (err error) {
return
}
- rtid := reflect.ValueOf(rt).Pointer()
+ rtid := rt2id(rt)
for _, v := range *o {
if v.rtid == rtid {
v.tag, v.ext = tag, ext
@@ -711,6 +728,7 @@ type typeInfo struct {
rt reflect.Type
rtid uintptr
+ // rv0 reflect.Value // saved zero value, used if immutableKind
numMeth uint16 // number of methods
@@ -743,42 +761,49 @@ type typeInfo struct {
toArray bool // whether this (struct) type should be encoded as an array
}
+// linear search. faster than binary search in my testing up to 16-field structs.
+const binarySearchThreshold = 8 // similar to what python does for hashtables
+
func (ti *typeInfo) indexForEncName(name string) int {
// NOTE: name may be a stringView, so don't pass it to another function.
//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.
+ sfilen := len(ti.sfi)
+ if sfilen < binarySearchThreshold {
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
+ }
+ // 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
}
+type rtid2ti struct {
+ rtid uintptr
+ ti *typeInfo
+}
+
// 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
+ infos atomicTypeInfoSlice // formerly map[uintptr]*typeInfo, now *[]rtid2ti
+ mu sync.Mutex
tags []string
}
@@ -787,7 +812,7 @@ type TypeInfos struct {
// 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)}
+ return &TypeInfos{tags: tags}
}
func (x *TypeInfos) structTag(t reflect.StructTag) (s string) {
@@ -802,20 +827,46 @@ func (x *TypeInfos) structTag(t reflect.StructTag) (s string) {
return
}
+func (x *TypeInfos) find(sp *[]rtid2ti, rtid uintptr) (idx int, ti *typeInfo) {
+ // binary search. adapted from sort/search.go.
+ // fmt.Printf(">>>> calling typeinfos.find ... \n")
+ // if sp == nil {
+ // return -1, nil
+ // }
+ s := *sp
+ h, i, j := 0, 0, len(s)
+ for i < j {
+ h = i + (j-i)/2
+ if s[h].rtid < rtid {
+ i = h + 1
+ } else {
+ j = h
+ }
+ }
+ if i < len(s) && s[i].rtid == rtid {
+ return i, s[i].ti
+ }
+ return i, nil
+}
+
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
+ // fmt.Printf(">>>> calling typeinfos.get ... \n")
+ sp := x.infos.load()
+ var idx int
+ if sp != nil {
+ idx, pti = x.find(sp, rtid)
+ if pti != nil {
+ 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())
+ // ti.rv0 = reflect.Zero(rt)
+ ti.numMeth = uint16(rt.NumMethod())
+ var ok bool
var indir int8
if ok, indir = implementsIntf(rt, binaryMarshalerTyp); ok {
ti.bm, ti.bmIndir = true, indir
@@ -854,7 +905,7 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) {
ti.baseId = rtid
} else {
ti.base = pt
- ti.baseId = reflect.ValueOf(pt).Pointer()
+ ti.baseId = rt2id(pt)
ti.baseIndir = ptIndir
}
@@ -875,12 +926,28 @@ func (x *TypeInfos) get(rtid uintptr, rt reflect.Type) (pti *typeInfo) {
}
// sfi = sfip
+ var vs []rtid2ti
x.mu.Lock()
- if pti, ok = x.infos[rtid]; !ok {
+ sp = x.infos.load()
+ if sp == nil {
+ // fmt.Printf(">>>> in typeinfos.get: sp == nil\n")
pti = &ti
- x.infos[rtid] = pti
+ vs = []rtid2ti{{rtid, pti}}
+ x.infos.store(&vs)
+ } else {
+ idx, pti = x.find(sp, rtid)
+ if pti == nil {
+ s := *sp
+ pti = &ti
+ vs = make([]rtid2ti, len(s)+1)
+ copy(vs, s[:idx])
+ vs[idx] = rtid2ti{rtid, pti}
+ copy(vs[idx+1:], s[idx:])
+ x.infos.store(&vs)
+ }
}
x.mu.Unlock()
+ // fmt.Printf(">>>>>>> TypeInfos: Num Elements: %v\n", len(*(x.infos.load())))
return
}
@@ -932,7 +999,7 @@ LOOP:
}
if ft.Kind() == reflect.Struct {
// if etypes contains this, don't call rget again (as fields are already seen here)
- ftid := reflect.ValueOf(ft).Pointer()
+ ftid := rt2id(ft)
// We cannot recurse forever, but we need to track other field depths.
// So - we break if we see a type twice (not the first time).
// This should be sufficient to handle an embedded type that refers to its
@@ -1065,22 +1132,23 @@ func panicToErr(err *error) {
// }
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
+ return immutableKindsSet[k]
+ // 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
diff --git a/vendor/github.com/ugorji/go/codec/helper_internal.go b/vendor/github.com/ugorji/go/codec/helper_internal.go
index 5d0727f77..eb18e2cca 100644
--- a/vendor/github.com/ugorji/go/codec/helper_internal.go
+++ b/vendor/github.com/ugorji/go/codec/helper_internal.go
@@ -219,24 +219,3 @@ func growCap(oldCap, unit, num int) (newCap int) {
}
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/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go
index f254b9886..d80e18f60 100644
--- a/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go
+++ b/vendor/github.com/ugorji/go/codec/helper_not_unsafe.go
@@ -1,10 +1,15 @@
-// +build !unsafe
+// +build !go1.7 safe appengine
// 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 (
+ "reflect"
+ "sync/atomic"
+)
+
// 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.
@@ -25,12 +30,114 @@ func bytesView(v string) []byte {
return []byte(v)
}
-// keepAlive4BytesView maintains a reference to the input parameter for bytesView.
-//
-// Usage: call this at point where done with the bytes view.
-func keepAlive4BytesView(v string) {}
+// // keepAlive4BytesView maintains a reference to the input parameter for bytesView.
+// //
+// // Usage: call this at point where done with the bytes view.
+// func keepAlive4BytesView(v string) {}
-// keepAlive4BytesView maintains a reference to the input parameter for stringView.
-//
-// Usage: call this at point where done with the string view.
-func keepAlive4StringView(v []byte) {}
+// // keepAlive4BytesView maintains a reference to the input parameter for stringView.
+// //
+// // Usage: call this at point where done with the string view.
+// func keepAlive4StringView(v []byte) {}
+
+func rv2i(rv reflect.Value) interface{} {
+ return rv.Interface()
+}
+
+func rt2id(rt reflect.Type) uintptr {
+ return reflect.ValueOf(rt).Pointer()
+}
+
+// --------------------------
+type ptrToRvMap struct{}
+
+func (_ *ptrToRvMap) init() {}
+func (_ *ptrToRvMap) get(i interface{}) reflect.Value {
+ return reflect.ValueOf(i).Elem()
+}
+
+// --------------------------
+type atomicTypeInfoSlice struct {
+ v atomic.Value
+}
+
+func (x *atomicTypeInfoSlice) load() *[]rtid2ti {
+ i := x.v.Load()
+ if i == nil {
+ return nil
+ }
+ return i.(*[]rtid2ti)
+}
+
+func (x *atomicTypeInfoSlice) store(p *[]rtid2ti) {
+ x.v.Store(p)
+}
+
+// --------------------------
+func (f *decFnInfo) raw(rv reflect.Value) {
+ rv.SetBytes(f.d.raw())
+}
+
+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) 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) kInt(rv reflect.Value) {
+ rv.SetInt(f.d.d.DecodeInt(intBitsize))
+}
+
+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) kInt32(rv reflect.Value) {
+ rv.SetInt(f.d.d.DecodeInt(32))
+}
+
+func (f *decFnInfo) kInt64(rv reflect.Value) {
+ rv.SetInt(f.d.d.DecodeInt(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) kUint8(rv reflect.Value) {
+ rv.SetUint(f.d.d.DecodeUint(8))
+}
+
+func (f *decFnInfo) kUint16(rv reflect.Value) {
+ rv.SetUint(f.d.d.DecodeUint(16))
+}
+
+func (f *decFnInfo) kUint32(rv reflect.Value) {
+ rv.SetUint(f.d.d.DecodeUint(32))
+}
+
+func (f *decFnInfo) kUint64(rv reflect.Value) {
+ rv.SetUint(f.d.d.DecodeUint(64))
+}
+
+// func i2rv(i interface{}) reflect.Value {
+// return reflect.ValueOf(i)
+// }
diff --git a/vendor/github.com/ugorji/go/codec/helper_unsafe.go b/vendor/github.com/ugorji/go/codec/helper_unsafe.go
index 6c146f77c..d23e6e461 100644
--- a/vendor/github.com/ugorji/go/codec/helper_unsafe.go
+++ b/vendor/github.com/ugorji/go/codec/helper_unsafe.go
@@ -1,4 +1,6 @@
-// +build unsafe
+// +build !safe
+// +build !appengine
+// +build go1.7
// 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.
@@ -6,13 +8,16 @@
package codec
import (
- "runtime"
+ "reflect"
+ "sync/atomic"
"unsafe"
)
// This file has unsafe variants of some helper methods.
// NOTE: See helper_not_unsafe.go for the usage information.
+// var zeroRTv [4]uintptr
+
type unsafeString struct {
Data uintptr
Len int
@@ -24,6 +29,17 @@ type unsafeSlice struct {
Cap int
}
+type unsafeIntf struct {
+ typ unsafe.Pointer
+ word unsafe.Pointer
+}
+
+type unsafeReflectValue struct {
+ typ unsafe.Pointer
+ ptr unsafe.Pointer
+ flag uintptr
+}
+
func stringView(v []byte) string {
if len(v) == 0 {
return ""
@@ -44,10 +60,403 @@ func bytesView(v string) []byte {
return *(*[]byte)(unsafe.Pointer(&bx))
}
-func keepAlive4BytesView(v string) {
- runtime.KeepAlive(v)
+// func keepAlive4BytesView(v string) {
+// runtime.KeepAlive(v)
+// }
+
+// func keepAlive4StringView(v []byte) {
+// runtime.KeepAlive(v)
+// }
+
+const _unsafe_rv2i_is_safe = false
+
+// TODO: consider a more generally-known optimization for reflect.Value ==> Interface
+//
+// Currently, we use this fragile method that taps into implememtation details from
+// the source go stdlib reflect/value.go,
+// and trims the implementation.
+func rv2i(rv reflect.Value) interface{} {
+ if _unsafe_rv2i_is_safe {
+ return rv.Interface()
+ }
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ // references that are single-words (map, ptr) may be double-referenced as flagIndir
+ kk := urv.flag & (1<<5 - 1)
+ if (kk == uintptr(reflect.Map) || kk == uintptr(reflect.Ptr)) && urv.flag&(1<<7) != 0 {
+ return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ}))
+ }
+ return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ}))
}
-func keepAlive4StringView(v []byte) {
- runtime.KeepAlive(v)
+func rt2id(rt reflect.Type) uintptr {
+ return uintptr(((*unsafeIntf)(unsafe.Pointer(&rt))).word)
}
+
+// func rv0t(rt reflect.Type) reflect.Value {
+// ut := (*unsafeIntf)(unsafe.Pointer(&rt))
+// // we need to determine whether ifaceIndir, and then whether to just pass 0 as the ptr
+// uv := unsafeReflectValue{ut.word, &zeroRTv, flag(rt.Kind())}
+// return *(*reflect.Value)(unsafe.Pointer(&uv})
+// }
+
+type ptrToRVKV struct {
+ k uintptr
+ v reflect.Value
+}
+
+type ptrToRvMap struct {
+ // m map[uintptr]reflect.Value
+ a [4]ptrToRVKV
+ v []ptrToRVKV
+}
+
+func (p *ptrToRvMap) init() {
+ // fmt.Printf(">>>> new ptr to rv map\n")
+ // p.m = make(map[uintptr]reflect.Value, 32)
+ p.v = p.a[:0]
+}
+
+func (p *ptrToRvMap) get(intf interface{}) (rv reflect.Value) {
+ word := uintptr(((*unsafeIntf)(unsafe.Pointer(&intf))).word)
+ // binary search. adapted from sort/search.go.
+ h, i, j := 0, 0, len(p.v)
+ for i < j {
+ h = i + (j-i)/2
+ if p.v[h].k < word {
+ i = h + 1
+ } else {
+ j = h
+ }
+ }
+ if i < len(p.v) && p.v[i].k == word {
+ return p.v[i].v
+ }
+
+ // insert into position i
+ // fmt.Printf(">>>> resetting rv for word: %x, interface: %v\n", word, intf)
+ rv = reflect.ValueOf(intf).Elem()
+ p.v = append(p.v, ptrToRVKV{})
+ copy(p.v[i+1:len(p.v)], p.v[i:len(p.v)-1])
+ p.v[i].k, p.v[i].v = word, rv
+ return
+}
+
+// --------------------------
+type atomicTypeInfoSlice struct {
+ v unsafe.Pointer
+}
+
+func (x *atomicTypeInfoSlice) load() *[]rtid2ti {
+ return (*[]rtid2ti)(atomic.LoadPointer(&x.v))
+}
+
+func (x *atomicTypeInfoSlice) store(p *[]rtid2ti) {
+ atomic.StorePointer(&x.v, unsafe.Pointer(p))
+}
+
+// --------------------------
+func (f *decFnInfo) raw(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*[]byte)(urv.ptr) = f.d.raw()
+}
+
+func (f *decFnInfo) kString(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*string)(urv.ptr) = f.d.d.DecodeString()
+}
+
+func (f *decFnInfo) kBool(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*bool)(urv.ptr) = f.d.d.DecodeBool()
+}
+
+func (f *decFnInfo) kFloat32(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*float32)(urv.ptr) = float32(f.d.d.DecodeFloat(true))
+}
+
+func (f *decFnInfo) kFloat64(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*float64)(urv.ptr) = f.d.d.DecodeFloat(false)
+}
+
+func (f *decFnInfo) kInt(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*int)(urv.ptr) = int(f.d.d.DecodeInt(intBitsize))
+}
+
+func (f *decFnInfo) kInt8(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*int8)(urv.ptr) = int8(f.d.d.DecodeInt(8))
+}
+
+func (f *decFnInfo) kInt16(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*int16)(urv.ptr) = int16(f.d.d.DecodeInt(16))
+}
+
+func (f *decFnInfo) kInt32(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*int32)(urv.ptr) = int32(f.d.d.DecodeInt(32))
+}
+
+func (f *decFnInfo) kInt64(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*int64)(urv.ptr) = f.d.d.DecodeInt(64)
+}
+
+func (f *decFnInfo) kUint(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*uint)(urv.ptr) = uint(f.d.d.DecodeUint(uintBitsize))
+}
+
+func (f *decFnInfo) kUintptr(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*uintptr)(urv.ptr) = uintptr(f.d.d.DecodeUint(uintBitsize))
+}
+
+func (f *decFnInfo) kUint8(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*uint8)(urv.ptr) = uint8(f.d.d.DecodeUint(8))
+}
+
+func (f *decFnInfo) kUint16(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*uint16)(urv.ptr) = uint16(f.d.d.DecodeUint(16))
+}
+
+func (f *decFnInfo) kUint32(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*uint32)(urv.ptr) = uint32(f.d.d.DecodeUint(32))
+}
+func (f *decFnInfo) kUint64(rv reflect.Value) {
+ urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+ *(*uint64)(urv.ptr) = f.d.d.DecodeUint(64)
+}
+
+// func (p *ptrToRvMap) get(i interface{}) (rv reflect.Value) {
+// word := uintptr(((*unsafeIntf)(unsafe.Pointer(&i))).word)
+// rv, exists := p.m[word]
+// if !exists {
+// fmt.Printf(">>>> resetting rv for word: %x, interface: %v\n", word, i)
+// rv = reflect.ValueOf(i).Elem()
+// p.m[word] = rv
+// }
+// return
+// }
+
+// func rt2id(rt reflect.Type) uintptr {
+// return uintptr(((*unsafeIntf)(unsafe.Pointer(&rt))).word)
+// // var i interface{} = rt
+// // // ui := (*unsafeIntf)(unsafe.Pointer(&i))
+// // return ((*unsafeIntf)(unsafe.Pointer(&i))).word
+// }
+
+// func rv2i(rv reflect.Value) interface{} {
+// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+// // non-reference type: already indir
+// // reference type: depend on flagIndir property ('cos maybe was double-referenced)
+// // const (unsafeRvFlagKindMask = 1<<5 - 1 , unsafeRvFlagIndir = 1 << 7 )
+// // rvk := reflect.Kind(urv.flag & (1<<5 - 1))
+// // if (rvk == reflect.Chan ||
+// // rvk == reflect.Func ||
+// // rvk == reflect.Interface ||
+// // rvk == reflect.Map ||
+// // rvk == reflect.Ptr ||
+// // rvk == reflect.UnsafePointer) && urv.flag&(1<<8) != 0 {
+// // fmt.Printf(">>>>> ---- double indirect reference: %v, %v\n", rvk, rv.Type())
+// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ}))
+// // }
+// if urv.flag&(1<<5-1) == uintptr(reflect.Map) && urv.flag&(1<<7) != 0 {
+// // fmt.Printf(">>>>> ---- double indirect reference: %v, %v\n", rvk, rv.Type())
+// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ}))
+// }
+// // fmt.Printf(">>>>> ++++ direct reference: %v, %v\n", rvk, rv.Type())
+// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ}))
+// }
+
+// const (
+// unsafeRvFlagKindMask = 1<<5 - 1
+// unsafeRvKindDirectIface = 1 << 5
+// unsafeRvFlagIndir = 1 << 7
+// unsafeRvFlagAddr = 1 << 8
+// unsafeRvFlagMethod = 1 << 9
+
+// _USE_RV_INTERFACE bool = false
+// _UNSAFE_RV_DEBUG = true
+// )
+
+// type unsafeRtype struct {
+// _ [2]uintptr
+// _ uint32
+// _ uint8
+// _ uint8
+// _ uint8
+// kind uint8
+// _ [2]uintptr
+// _ int32
+// }
+
+// func _rv2i(rv reflect.Value) interface{} {
+// // Note: From use,
+// // - it's never an interface
+// // - the only calls here are for ifaceIndir types.
+// // (though that conditional is wrong)
+// // To know for sure, we need the value of t.kind (which is not exposed).
+// //
+// // Need to validate the path: type is indirect ==> only value is indirect ==> default (value is direct)
+// // - Type indirect, Value indirect: ==> numbers, boolean, slice, struct, array, string
+// // - Type Direct, Value indirect: ==> map???
+// // - Type Direct, Value direct: ==> pointers, unsafe.Pointer, func, chan, map
+// //
+// // TRANSLATES TO:
+// // if typeIndirect { } else if valueIndirect { } else { }
+// //
+// // Since we don't deal with funcs, then "flagNethod" is unset, and can be ignored.
+
+// if _USE_RV_INTERFACE {
+// return rv.Interface()
+// }
+// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+
+// // if urv.flag&unsafeRvFlagMethod != 0 || urv.flag&unsafeRvFlagKindMask == uintptr(reflect.Interface) {
+// // println("***** IS flag method or interface: delegating to rv.Interface()")
+// // return rv.Interface()
+// // }
+
+// // if urv.flag&unsafeRvFlagKindMask == uintptr(reflect.Interface) {
+// // println("***** IS Interface: delegate to rv.Interface")
+// // return rv.Interface()
+// // }
+// // if urv.flag&unsafeRvFlagKindMask&unsafeRvKindDirectIface == 0 {
+// // if urv.flag&unsafeRvFlagAddr == 0 {
+// // println("***** IS ifaceIndir typ")
+// // // ui := unsafeIntf{word: urv.ptr, typ: urv.typ}
+// // // return *(*interface{})(unsafe.Pointer(&ui))
+// // // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ}))
+// // }
+// // } else if urv.flag&unsafeRvFlagIndir != 0 {
+// // println("***** IS flagindir")
+// // // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ}))
+// // } else {
+// // println("***** NOT flagindir")
+// // return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ}))
+// // }
+// // println("***** default: delegate to rv.Interface")
+
+// urt := (*unsafeRtype)(unsafe.Pointer(urv.typ))
+// if _UNSAFE_RV_DEBUG {
+// fmt.Printf(">>>> start: %v: ", rv.Type())
+// fmt.Printf("%v - %v\n", *urv, *urt)
+// }
+// if urt.kind&unsafeRvKindDirectIface == 0 {
+// if _UNSAFE_RV_DEBUG {
+// fmt.Printf("**** +ifaceIndir type: %v\n", rv.Type())
+// }
+// // println("***** IS ifaceIndir typ")
+// // if true || urv.flag&unsafeRvFlagAddr == 0 {
+// // // println(" ***** IS NOT addr")
+// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ}))
+// // }
+// } else if urv.flag&unsafeRvFlagIndir != 0 {
+// if _UNSAFE_RV_DEBUG {
+// fmt.Printf("**** +flagIndir type: %v\n", rv.Type())
+// }
+// // println("***** IS flagindir")
+// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: *(*unsafe.Pointer)(urv.ptr), typ: urv.typ}))
+// } else {
+// if _UNSAFE_RV_DEBUG {
+// fmt.Printf("**** -flagIndir type: %v\n", rv.Type())
+// }
+// // println("***** NOT flagindir")
+// return *(*interface{})(unsafe.Pointer(&unsafeIntf{word: urv.ptr, typ: urv.typ}))
+// }
+// // println("***** default: delegating to rv.Interface()")
+// // return rv.Interface()
+// }
+
+// var staticM0 = make(map[string]uint64)
+// var staticI0 = (int32)(-5)
+
+// func staticRv2iTest() {
+// i0 := (int32)(-5)
+// m0 := make(map[string]uint16)
+// m0["1"] = 1
+// for _, i := range []interface{}{
+// (int)(7),
+// (uint)(8),
+// (int16)(-9),
+// (uint16)(19),
+// (uintptr)(77),
+// (bool)(true),
+// float32(-32.7),
+// float64(64.9),
+// complex(float32(19), 5),
+// complex(float64(-32), 7),
+// [4]uint64{1, 2, 3, 4},
+// (chan<- int)(nil), // chan,
+// rv2i, // func
+// io.Writer(ioutil.Discard),
+// make(map[string]uint),
+// (map[string]uint)(nil),
+// staticM0,
+// m0,
+// &m0,
+// i0,
+// &i0,
+// &staticI0,
+// &staticM0,
+// []uint32{6, 7, 8},
+// "abc",
+// Raw{},
+// RawExt{},
+// &Raw{},
+// &RawExt{},
+// unsafe.Pointer(&i0),
+// } {
+// i2 := rv2i(reflect.ValueOf(i))
+// eq := reflect.DeepEqual(i, i2)
+// fmt.Printf(">>>> %v == %v? %v\n", i, i2, eq)
+// }
+// // os.Exit(0)
+// }
+
+// func init() {
+// staticRv2iTest()
+// }
+
+// func rv2i(rv reflect.Value) interface{} {
+// if _USE_RV_INTERFACE || rv.Kind() == reflect.Interface || rv.CanAddr() {
+// return rv.Interface()
+// }
+// // var i interface{}
+// // ui := (*unsafeIntf)(unsafe.Pointer(&i))
+// var ui unsafeIntf
+// urv := (*unsafeReflectValue)(unsafe.Pointer(&rv))
+// // fmt.Printf("urv: flag: %b, typ: %b, ptr: %b\n", urv.flag, uintptr(urv.typ), uintptr(urv.ptr))
+// if (urv.flag&unsafeRvFlagKindMask)&unsafeRvKindDirectIface == 0 {
+// if urv.flag&unsafeRvFlagAddr != 0 {
+// println("***** indirect and addressable! Needs typed move - delegate to rv.Interface()")
+// return rv.Interface()
+// }
+// println("****** indirect type/kind")
+// ui.word = urv.ptr
+// } else if urv.flag&unsafeRvFlagIndir != 0 {
+// println("****** unsafe rv flag indir")
+// ui.word = *(*unsafe.Pointer)(urv.ptr)
+// } else {
+// println("****** default: assign prt to word directly")
+// ui.word = urv.ptr
+// }
+// // ui.word = urv.ptr
+// ui.typ = urv.typ
+// // fmt.Printf("(pointers) ui.typ: %p, word: %p\n", ui.typ, ui.word)
+// // fmt.Printf("(binary) ui.typ: %b, word: %b\n", uintptr(ui.typ), uintptr(ui.word))
+// return *(*interface{})(unsafe.Pointer(&ui))
+// // return i
+// }
+
+// func i2rv(i interface{}) reflect.Value {
+// // u := *(*unsafeIntf)(unsafe.Pointer(&i))
+// return reflect.ValueOf(i)
+// }
diff --git a/vendor/github.com/ugorji/go/codec/json.go b/vendor/github.com/ugorji/go/codec/json.go
index df67d68ce..06e882d4c 100644
--- a/vendor/github.com/ugorji/go/codec/json.go
+++ b/vendor/github.com/ugorji/go/codec/json.go
@@ -34,7 +34,6 @@ package codec
import (
"bytes"
"encoding/base64"
- "fmt"
"reflect"
"strconv"
"unicode/utf16"
@@ -59,6 +58,11 @@ var (
// jsonTabs and jsonSpaces are used as caches for indents
jsonTabs, jsonSpaces string
+
+ jsonCharHtmlSafeSet [utf8.RuneSelf]bool
+ jsonCharSafeSet [utf8.RuneSelf]bool
+ jsonCharWhitespaceSet [256]bool
+ jsonNumSet [256]bool
)
const (
@@ -78,19 +82,6 @@ const (
// 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< &
+ for i := 32; i < utf8.RuneSelf; i++ {
+ switch i {
+ case '"', '\\':
+ jsonCharSafeSet[i] = false
+ jsonCharHtmlSafeSet[i] = false
+ case '<', '>', '&':
+ jsonCharHtmlSafeSet[i] = false
+ jsonCharSafeSet[i] = true
+ default:
+ jsonCharSafeSet[i] = true
+ jsonCharHtmlSafeSet[i] = true
+ }
+ }
+ for i := 0; i < 256; i++ {
+ switch i {
+ case ' ', '\t', '\r', '\n':
+ jsonCharWhitespaceSet[i] = true
+ case '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'e', 'E', '.', '+', '-':
+ jsonNumSet[i] = true
+ }
+ }
}
type jsonEncDriver struct {
@@ -214,6 +230,7 @@ func (e *jsonEncDriver) encodeFloat(f float64, numbits int) {
}
func (e *jsonEncDriver) EncodeInt(v int64) {
+ // if e.h.IntegerAsString == 'A' || e.h.IntegerAsString == 'L' && (v > 1<<53 || v < -(1<<53)) {
if x := e.h.IntegerAsString; x == 'A' || x == 'L' && (v > 1<<53 || v < -(1<<53)) {
e.w.writen1('"')
e.w.writeb(strconv.AppendInt(e.b[:0], v, 10))
@@ -224,6 +241,7 @@ func (e *jsonEncDriver) EncodeInt(v int64) {
}
func (e *jsonEncDriver) EncodeUint(v uint64) {
+ // if e.h.IntegerAsString == 'A' || e.h.IntegerAsString == 'L' && v > 1<<53 {
if x := e.h.IntegerAsString; x == 'A' || x == 'L' && v > 1<<53 {
e.w.writen1('"')
e.w.writeb(strconv.AppendUint(e.b[:0], v, 10))
@@ -313,7 +331,8 @@ func (e *jsonEncDriver) quoteStr(s string) {
// encode all bytes < 0x20 (except \r, \n).
// also encode < > & to prevent security holes when served to some browsers.
if b := s[i]; b < utf8.RuneSelf {
- if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' {
+ // if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' {
+ if jsonCharHtmlSafeSet[b] || (e.h.HTMLCharsAsIs && jsonCharSafeSet[b]) {
i++
continue
}
@@ -333,13 +352,6 @@ func (e *jsonEncDriver) quoteStr(s string) {
w.writen2('\\', 'f')
case '\t':
w.writen2('\\', 't')
- case '<', '>', '&':
- if e.h.HTMLCharsAsIs {
- w.writen1(b)
- } else {
- w.writestr(`\u00`)
- w.writen2(hex[b>>4], hex[b&0xF])
- }
default:
w.writestr(`\u00`)
w.writen2(hex[b>>4], hex[b&0xF])
@@ -378,88 +390,6 @@ func (e *jsonEncDriver) quoteStr(s string) {
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
@@ -477,26 +407,14 @@ type jsonDecDriver struct {
se setExtWrapper
- n jsonNum
+ // n jsonNum
}
func jsonIsWS(b byte) bool {
- return b == ' ' || b == '\t' || b == '\r' || b == '\n'
+ // return b == ' ' || b == '\t' || b == '\r' || b == '\n'
+ return jsonCharWhitespaceSet[b]
}
-// // 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()
@@ -506,11 +424,7 @@ func (d *jsonDecDriver) uncacheRead() {
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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
var xc uint8 // char expected
if c == containerMapKey {
@@ -539,37 +453,23 @@ func (d *jsonDecDriver) sendContainerState(c containerState) {
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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
- if d.tok == '}' || d.tok == ']' {
- // d.tok = 0 // only checking, not consuming
- return true
- }
- return false
+ return d.tok == '}' || d.tok == ']'
}
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
- }
+ if jsonValidateSymbols && !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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
if d.tok == 'n' {
d.readStrIdx(10, 13) // ull
@@ -580,11 +480,7 @@ func (d *jsonDecDriver) TryDecodeAsNil() bool {
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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
if d.tok == 'f' {
d.readStrIdx(5, 9) // alse
@@ -600,11 +496,7 @@ func (d *jsonDecDriver) DecodeBool() bool {
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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
if d.tok != '{' {
d.d.errorf("json: expect char '%c' but got char '%c'", '{', d.tok)
@@ -616,11 +508,7 @@ func (d *jsonDecDriver) ReadMapStart() int {
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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
if d.tok != '[' {
d.d.errorf("json: expect char '%c' but got char '%c'", '[', d.tok)
@@ -633,11 +521,7 @@ func (d *jsonDecDriver) ReadArrayStart() int {
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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
if b := d.tok; b == '{' {
return valueTypeMap
@@ -653,264 +537,57 @@ func (d *jsonDecDriver) ContainerType() (vt valueType) {
// 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.
+func (d *jsonDecDriver) decNumBytes() (bs []byte) {
+ // stores num bytes in d.bs
if d.tok == 0 {
- var b byte
- r := d.r
- for b = r.readn1(); jsonIsWS(b); b = r.readn1() {
- }
- d.tok = b
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
- b := d.tok
- var str bool
- if b == '"' {
- str = true
- b = d.r.readn1()
- }
- if !(b == '+' || b == '-' || b == '.' || (b >= '0' && b <= '9')) {
- d.d.errorf("json: decNum: got first char '%c'", b)
- return
+ if d.tok == '"' {
+ bs = d.r.readUntil(d.b2[:0], '"')
+ bs = bs[:len(bs)-1]
+ } else {
+ d.r.unreadn1()
+ bs = d.r.readTo(d.bs[:0], &jsonNumSet)
+ // bs = d.r.readbUntilAny(d.bs[:0], " \t\n:,{}[]")
}
d.tok = 0
+ // fmt.Printf(">>>> decNumBytes: returning: '%s'\n", bs)
+ return bs
+}
- 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
- }
- case '"':
- if str {
- if storeBytes {
- d.bs = append(d.bs, '"')
- }
- b, eof = r.readn1eof()
- }
- 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)
+ bs := d.decNumBytes()
+ // if bytes.ContainsAny(bs, ".eE") {
+ // d.d.errorf("json: decoding int, but found one or more of the chars: .eE: %s", bs)
+ // return
+ // }
+ i, err := strconv.ParseInt(stringView(bs), 10, int(bitsize))
+ if err != nil {
+ d.d.errorf("json: decode int from %s: %v", bs, err)
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)
+ bs := d.decNumBytes()
+ bitsize := 64
+ if chkOverflow32 {
+ bitsize = 32
+ }
+ f, err := strconv.ParseFloat(stringView(bs), bitsize)
+ if err != nil {
+ d.d.errorf("json: decode float from %s: %v", bs, err)
return
}
return
@@ -929,19 +606,14 @@ func (d *jsonDecDriver) DecodeExt(rv interface{}, xtag uint64, ext Ext) (realxta
return
}
-func (d *jsonDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
+func (d *jsonDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) {
// if decoding into raw bytes, and the RawBytesExt is configured, use it to decode.
- if !isstring && d.se.i != nil {
+ if 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
- }
// if appendStringAsBytes returned a zero-len slice, then treat as nil.
// This should only happen for null, and "".
if len(d.bs) == 0 {
@@ -967,22 +639,25 @@ func (d *jsonDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut [
return
}
+const jsonAlwaysReturnInternString = false
+
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 {
+ if jsonAlwaysReturnInternString || d.c == containerMapKey {
return d.d.string(d.bs)
}
return string(d.bs)
}
+func (d *jsonDecDriver) DecodeStringAsBytes() (s []byte) {
+ d.appendStringAsBytes()
+ return 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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
if d.tok != '"' {
@@ -1002,63 +677,72 @@ func (d *jsonDecDriver) appendStringAsBytes() {
copy(d.bs, "true")
default:
// try to parse a valid number
- d.decNum(true)
+ bs := d.decNumBytes()
+ d.bs = d.bs[:len(bs)]
+ copy(d.bs, bs)
}
return
}
d.tok = 0
-
- v := d.bs[:0]
- var c uint8
r := d.r
- for {
- c = r.readn1()
- if c == '"' {
+ var cs []byte
+ v := d.bs[:0]
+ // var c uint8
+ for i := 0; ; i++ {
+ if i == len(cs) {
+ cs = r.readUntil(d.b2[:0], '"')
+ i = 0
+ }
+ if cs[i] == '"' {
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))
+ }
+ if cs[i] != '\\' {
+ v = append(v, cs[i])
+ continue
+ }
+ // cs[i] == '\\'
+ i++
+ switch cs[i] {
+ case '"', '\\', '/', '\'':
+ v = append(v, cs[i])
+ 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.jsonU4Arr([4]byte{cs[i+1], cs[i+2], cs[i+3], cs[i+4]})
+ i += 4
+ // fmt.Printf("$$$$$$$$$: is surrogate: %v\n", utf16.IsSurrogate(rr))
+ if utf16.IsSurrogate(rr) {
+ // fmt.Printf(">>>> checking utf16 surrogate\n")
+ if !(cs[i+1] == '\\' && cs[i+2] == 'u') {
+ d.d.errorf(`json: unquoteStr: invalid unicode sequence. Expecting \u`)
+ return
}
- w2 := utf8.EncodeRune(d.bstr[:], rr)
- v = append(v, d.bstr[:w2]...)
- default:
- d.d.errorf("json: unsupported escaped value: %c", c)
+ i += 2
+ rr = utf16.DecodeRune(rr, d.jsonU4Arr([4]byte{cs[i+1], cs[i+2], cs[i+3], cs[i+4]}))
+ i += 4
}
- } else {
- v = append(v, c)
+ w2 := utf8.EncodeRune(d.bstr[:], rr)
+ v = append(v, d.bstr[:w2]...)
+ default:
+ d.d.errorf("json: unsupported escaped value: %c", cs[i])
}
}
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
- }
+func (d *jsonDecDriver) jsonU4Arr(bs [4]byte) (r rune) {
// u, _ := strconv.ParseUint(string(d.bstr[:4]), 16, 64)
var u uint32
- for i := 0; i < 4; i++ {
- v := r.readn1()
+ for _, v := range bs {
if '0' <= v && v <= '9' {
v = v - '0'
} else if 'a' <= v && v <= 'z' {
@@ -1071,6 +755,7 @@ func (d *jsonDecDriver) jsonU4(checkSlashU bool) rune {
}
u = u*16 + uint32(v)
}
+ // fmt.Printf(">>>>>>>> jsonU4Arr: %v, %s\n", rune(u), string(rune(u)))
return rune(u)
}
@@ -1079,11 +764,7 @@ func (d *jsonDecDriver) DecodeNaked() {
// 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
+ d.tok = d.r.skip(&jsonCharWhitespaceSet)
}
switch d.tok {
case 'n':
@@ -1109,41 +790,35 @@ func (d *jsonDecDriver) DecodeNaked() {
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:
+ bs := d.decNumBytes()
+ var err error
+ if len(bs) == 0 {
+ d.d.errorf("json: decode number from empty string")
+ return
+ } else if d.h.PreferFloat ||
+ bytes.IndexByte(bs, '.') != -1 ||
+ bytes.IndexByte(bs, 'e') != -1 ||
+ bytes.IndexByte(bs, 'E') != -1 {
+ // } else if d.h.PreferFloat || bytes.ContainsAny(bs, ".eE") {
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
+ z.f, err = strconv.ParseFloat(stringView(bs), 64)
+ } else if d.h.SignedInteger || bs[0] == '-' {
+ z.v = valueTypeInt
+ z.i, err = strconv.ParseInt(stringView(bs), 10, 64)
+ } else {
+ z.v = valueTypeUint
+ z.u, err = strconv.ParseUint(stringView(bs), 10, 64)
+ }
+ if err != nil {
+ if z.v == valueTypeInt || z.v == valueTypeUint {
+ if v, ok := err.(*strconv.NumError); ok && (v.Err == strconv.ErrRange || v.Err == strconv.ErrSyntax) {
+ z.v = valueTypeFloat
+ z.f, err = strconv.ParseFloat(stringView(bs), 64)
+ }
}
- 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
+ if err != nil {
+ d.d.errorf("json: decode number from %s: %v", bs, err)
+ return
}
}
// fmt.Printf("DecodeNaked: Number: %T, %v\n", v, v)
@@ -1154,6 +829,14 @@ func (d *jsonDecDriver) DecodeNaked() {
return
}
+// func jsonAcceptNonWS(b byte) bool {
+// return !jsonCharWhitespaceSet[b]
+// }
+
+// func jsonAcceptDQuote(b byte) bool {
+// return b == '"'
+// }
+
//----------------------
// JsonHandle is a handle for JSON encoding format.
@@ -1203,6 +886,11 @@ type JsonHandle struct {
// By default, we encode them as \uXXX
// to prevent security holes when served from some browsers.
HTMLCharsAsIs bool
+
+ // PreferFloat says that we will default to decoding a number as a float.
+ // If not set, we will examine the characters of the number and decode as an
+ // integer type if it doesn't have any of the characters [.eE].
+ PreferFloat bool
}
func (h *JsonHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) {
@@ -1251,7 +939,7 @@ func (d *jsonDecDriver) reset() {
d.bs = d.bs[:0]
}
d.c, d.tok = 0, 0
- d.n.reset()
+ // d.n.reset()
}
var jsonEncodeTerminate = []byte{' '}
diff --git a/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl b/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl
new file mode 100644
index 000000000..6d716972a
--- /dev/null
+++ b/vendor/github.com/ugorji/go/codec/mammoth-test.go.tmpl
@@ -0,0 +1,33 @@
+// 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 mammoth-test.go.tmpl
+// ************************************************************
+
+package codec
+
+// TestMammoth has all the different paths optimized in fast-path
+// It has all the primitives, slices and maps.
+//
+// For each of those types, it has a pointer and a non-pointer field.
+
+type TestMammoth struct {
+
+{{range .Values }}{{if .Primitive }}{{/*
+*/}}{{ .MethodNamePfx "F" true }} {{ .Primitive }}
+{{ .MethodNamePfx "Fptr" true }} *{{ .Primitive }}
+{{end}}{{end}}
+
+{{range .Values }}{{if not .Primitive }}{{if not .MapKey }}{{/*
+*/}}{{ .MethodNamePfx "F" false }} []{{ .Elem }}
+{{ .MethodNamePfx "Fptr" false }} *[]{{ .Elem }}
+{{end}}{{end}}{{end}}
+
+{{range .Values }}{{if not .Primitive }}{{if .MapKey }}{{/*
+*/}}{{ .MethodNamePfx "F" false }} map[{{ .MapKey }}]{{ .Elem }}
+{{ .MethodNamePfx "Fptr" false }} *map[{{ .MapKey }}]{{ .Elem }}
+{{end}}{{end}}{{end}}
+
+}
diff --git a/vendor/github.com/ugorji/go/codec/mammoth_generated_test.go b/vendor/github.com/ugorji/go/codec/mammoth_generated_test.go
new file mode 100644
index 000000000..73c2a7c15
--- /dev/null
+++ b/vendor/github.com/ugorji/go/codec/mammoth_generated_test.go
@@ -0,0 +1,593 @@
+// 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 mammoth-test.go.tmpl
+// ************************************************************
+
+package codec
+
+// TestMammoth has all the different paths optimized in fast-path
+// It has all the primitives, slices and maps.
+//
+// For each of those types, it has a pointer and a non-pointer field.
+
+type TestMammoth struct {
+ FIntf interface{}
+ FptrIntf *interface{}
+ FString string
+ FptrString *string
+ FFloat32 float32
+ FptrFloat32 *float32
+ FFloat64 float64
+ FptrFloat64 *float64
+ FUint uint
+ FptrUint *uint
+ FUint8 uint8
+ FptrUint8 *uint8
+ FUint16 uint16
+ FptrUint16 *uint16
+ FUint32 uint32
+ FptrUint32 *uint32
+ FUint64 uint64
+ FptrUint64 *uint64
+ FUintptr uintptr
+ FptrUintptr *uintptr
+ FInt int
+ FptrInt *int
+ FInt8 int8
+ FptrInt8 *int8
+ FInt16 int16
+ FptrInt16 *int16
+ FInt32 int32
+ FptrInt32 *int32
+ FInt64 int64
+ FptrInt64 *int64
+ FBool bool
+ FptrBool *bool
+
+ FSliceIntf []interface{}
+ FptrSliceIntf *[]interface{}
+ FSliceString []string
+ FptrSliceString *[]string
+ FSliceFloat32 []float32
+ FptrSliceFloat32 *[]float32
+ FSliceFloat64 []float64
+ FptrSliceFloat64 *[]float64
+ FSliceUint []uint
+ FptrSliceUint *[]uint
+ FSliceUint16 []uint16
+ FptrSliceUint16 *[]uint16
+ FSliceUint32 []uint32
+ FptrSliceUint32 *[]uint32
+ FSliceUint64 []uint64
+ FptrSliceUint64 *[]uint64
+ FSliceUintptr []uintptr
+ FptrSliceUintptr *[]uintptr
+ FSliceInt []int
+ FptrSliceInt *[]int
+ FSliceInt8 []int8
+ FptrSliceInt8 *[]int8
+ FSliceInt16 []int16
+ FptrSliceInt16 *[]int16
+ FSliceInt32 []int32
+ FptrSliceInt32 *[]int32
+ FSliceInt64 []int64
+ FptrSliceInt64 *[]int64
+ FSliceBool []bool
+ FptrSliceBool *[]bool
+
+ FMapIntfIntf map[interface{}]interface{}
+ FptrMapIntfIntf *map[interface{}]interface{}
+ FMapIntfString map[interface{}]string
+ FptrMapIntfString *map[interface{}]string
+ FMapIntfUint map[interface{}]uint
+ FptrMapIntfUint *map[interface{}]uint
+ FMapIntfUint8 map[interface{}]uint8
+ FptrMapIntfUint8 *map[interface{}]uint8
+ FMapIntfUint16 map[interface{}]uint16
+ FptrMapIntfUint16 *map[interface{}]uint16
+ FMapIntfUint32 map[interface{}]uint32
+ FptrMapIntfUint32 *map[interface{}]uint32
+ FMapIntfUint64 map[interface{}]uint64
+ FptrMapIntfUint64 *map[interface{}]uint64
+ FMapIntfUintptr map[interface{}]uintptr
+ FptrMapIntfUintptr *map[interface{}]uintptr
+ FMapIntfInt map[interface{}]int
+ FptrMapIntfInt *map[interface{}]int
+ FMapIntfInt8 map[interface{}]int8
+ FptrMapIntfInt8 *map[interface{}]int8
+ FMapIntfInt16 map[interface{}]int16
+ FptrMapIntfInt16 *map[interface{}]int16
+ FMapIntfInt32 map[interface{}]int32
+ FptrMapIntfInt32 *map[interface{}]int32
+ FMapIntfInt64 map[interface{}]int64
+ FptrMapIntfInt64 *map[interface{}]int64
+ FMapIntfFloat32 map[interface{}]float32
+ FptrMapIntfFloat32 *map[interface{}]float32
+ FMapIntfFloat64 map[interface{}]float64
+ FptrMapIntfFloat64 *map[interface{}]float64
+ FMapIntfBool map[interface{}]bool
+ FptrMapIntfBool *map[interface{}]bool
+ FMapStringIntf map[string]interface{}
+ FptrMapStringIntf *map[string]interface{}
+ FMapStringString map[string]string
+ FptrMapStringString *map[string]string
+ FMapStringUint map[string]uint
+ FptrMapStringUint *map[string]uint
+ FMapStringUint8 map[string]uint8
+ FptrMapStringUint8 *map[string]uint8
+ FMapStringUint16 map[string]uint16
+ FptrMapStringUint16 *map[string]uint16
+ FMapStringUint32 map[string]uint32
+ FptrMapStringUint32 *map[string]uint32
+ FMapStringUint64 map[string]uint64
+ FptrMapStringUint64 *map[string]uint64
+ FMapStringUintptr map[string]uintptr
+ FptrMapStringUintptr *map[string]uintptr
+ FMapStringInt map[string]int
+ FptrMapStringInt *map[string]int
+ FMapStringInt8 map[string]int8
+ FptrMapStringInt8 *map[string]int8
+ FMapStringInt16 map[string]int16
+ FptrMapStringInt16 *map[string]int16
+ FMapStringInt32 map[string]int32
+ FptrMapStringInt32 *map[string]int32
+ FMapStringInt64 map[string]int64
+ FptrMapStringInt64 *map[string]int64
+ FMapStringFloat32 map[string]float32
+ FptrMapStringFloat32 *map[string]float32
+ FMapStringFloat64 map[string]float64
+ FptrMapStringFloat64 *map[string]float64
+ FMapStringBool map[string]bool
+ FptrMapStringBool *map[string]bool
+ FMapFloat32Intf map[float32]interface{}
+ FptrMapFloat32Intf *map[float32]interface{}
+ FMapFloat32String map[float32]string
+ FptrMapFloat32String *map[float32]string
+ FMapFloat32Uint map[float32]uint
+ FptrMapFloat32Uint *map[float32]uint
+ FMapFloat32Uint8 map[float32]uint8
+ FptrMapFloat32Uint8 *map[float32]uint8
+ FMapFloat32Uint16 map[float32]uint16
+ FptrMapFloat32Uint16 *map[float32]uint16
+ FMapFloat32Uint32 map[float32]uint32
+ FptrMapFloat32Uint32 *map[float32]uint32
+ FMapFloat32Uint64 map[float32]uint64
+ FptrMapFloat32Uint64 *map[float32]uint64
+ FMapFloat32Uintptr map[float32]uintptr
+ FptrMapFloat32Uintptr *map[float32]uintptr
+ FMapFloat32Int map[float32]int
+ FptrMapFloat32Int *map[float32]int
+ FMapFloat32Int8 map[float32]int8
+ FptrMapFloat32Int8 *map[float32]int8
+ FMapFloat32Int16 map[float32]int16
+ FptrMapFloat32Int16 *map[float32]int16
+ FMapFloat32Int32 map[float32]int32
+ FptrMapFloat32Int32 *map[float32]int32
+ FMapFloat32Int64 map[float32]int64
+ FptrMapFloat32Int64 *map[float32]int64
+ FMapFloat32Float32 map[float32]float32
+ FptrMapFloat32Float32 *map[float32]float32
+ FMapFloat32Float64 map[float32]float64
+ FptrMapFloat32Float64 *map[float32]float64
+ FMapFloat32Bool map[float32]bool
+ FptrMapFloat32Bool *map[float32]bool
+ FMapFloat64Intf map[float64]interface{}
+ FptrMapFloat64Intf *map[float64]interface{}
+ FMapFloat64String map[float64]string
+ FptrMapFloat64String *map[float64]string
+ FMapFloat64Uint map[float64]uint
+ FptrMapFloat64Uint *map[float64]uint
+ FMapFloat64Uint8 map[float64]uint8
+ FptrMapFloat64Uint8 *map[float64]uint8
+ FMapFloat64Uint16 map[float64]uint16
+ FptrMapFloat64Uint16 *map[float64]uint16
+ FMapFloat64Uint32 map[float64]uint32
+ FptrMapFloat64Uint32 *map[float64]uint32
+ FMapFloat64Uint64 map[float64]uint64
+ FptrMapFloat64Uint64 *map[float64]uint64
+ FMapFloat64Uintptr map[float64]uintptr
+ FptrMapFloat64Uintptr *map[float64]uintptr
+ FMapFloat64Int map[float64]int
+ FptrMapFloat64Int *map[float64]int
+ FMapFloat64Int8 map[float64]int8
+ FptrMapFloat64Int8 *map[float64]int8
+ FMapFloat64Int16 map[float64]int16
+ FptrMapFloat64Int16 *map[float64]int16
+ FMapFloat64Int32 map[float64]int32
+ FptrMapFloat64Int32 *map[float64]int32
+ FMapFloat64Int64 map[float64]int64
+ FptrMapFloat64Int64 *map[float64]int64
+ FMapFloat64Float32 map[float64]float32
+ FptrMapFloat64Float32 *map[float64]float32
+ FMapFloat64Float64 map[float64]float64
+ FptrMapFloat64Float64 *map[float64]float64
+ FMapFloat64Bool map[float64]bool
+ FptrMapFloat64Bool *map[float64]bool
+ FMapUintIntf map[uint]interface{}
+ FptrMapUintIntf *map[uint]interface{}
+ FMapUintString map[uint]string
+ FptrMapUintString *map[uint]string
+ FMapUintUint map[uint]uint
+ FptrMapUintUint *map[uint]uint
+ FMapUintUint8 map[uint]uint8
+ FptrMapUintUint8 *map[uint]uint8
+ FMapUintUint16 map[uint]uint16
+ FptrMapUintUint16 *map[uint]uint16
+ FMapUintUint32 map[uint]uint32
+ FptrMapUintUint32 *map[uint]uint32
+ FMapUintUint64 map[uint]uint64
+ FptrMapUintUint64 *map[uint]uint64
+ FMapUintUintptr map[uint]uintptr
+ FptrMapUintUintptr *map[uint]uintptr
+ FMapUintInt map[uint]int
+ FptrMapUintInt *map[uint]int
+ FMapUintInt8 map[uint]int8
+ FptrMapUintInt8 *map[uint]int8
+ FMapUintInt16 map[uint]int16
+ FptrMapUintInt16 *map[uint]int16
+ FMapUintInt32 map[uint]int32
+ FptrMapUintInt32 *map[uint]int32
+ FMapUintInt64 map[uint]int64
+ FptrMapUintInt64 *map[uint]int64
+ FMapUintFloat32 map[uint]float32
+ FptrMapUintFloat32 *map[uint]float32
+ FMapUintFloat64 map[uint]float64
+ FptrMapUintFloat64 *map[uint]float64
+ FMapUintBool map[uint]bool
+ FptrMapUintBool *map[uint]bool
+ FMapUint8Intf map[uint8]interface{}
+ FptrMapUint8Intf *map[uint8]interface{}
+ FMapUint8String map[uint8]string
+ FptrMapUint8String *map[uint8]string
+ FMapUint8Uint map[uint8]uint
+ FptrMapUint8Uint *map[uint8]uint
+ FMapUint8Uint8 map[uint8]uint8
+ FptrMapUint8Uint8 *map[uint8]uint8
+ FMapUint8Uint16 map[uint8]uint16
+ FptrMapUint8Uint16 *map[uint8]uint16
+ FMapUint8Uint32 map[uint8]uint32
+ FptrMapUint8Uint32 *map[uint8]uint32
+ FMapUint8Uint64 map[uint8]uint64
+ FptrMapUint8Uint64 *map[uint8]uint64
+ FMapUint8Uintptr map[uint8]uintptr
+ FptrMapUint8Uintptr *map[uint8]uintptr
+ FMapUint8Int map[uint8]int
+ FptrMapUint8Int *map[uint8]int
+ FMapUint8Int8 map[uint8]int8
+ FptrMapUint8Int8 *map[uint8]int8
+ FMapUint8Int16 map[uint8]int16
+ FptrMapUint8Int16 *map[uint8]int16
+ FMapUint8Int32 map[uint8]int32
+ FptrMapUint8Int32 *map[uint8]int32
+ FMapUint8Int64 map[uint8]int64
+ FptrMapUint8Int64 *map[uint8]int64
+ FMapUint8Float32 map[uint8]float32
+ FptrMapUint8Float32 *map[uint8]float32
+ FMapUint8Float64 map[uint8]float64
+ FptrMapUint8Float64 *map[uint8]float64
+ FMapUint8Bool map[uint8]bool
+ FptrMapUint8Bool *map[uint8]bool
+ FMapUint16Intf map[uint16]interface{}
+ FptrMapUint16Intf *map[uint16]interface{}
+ FMapUint16String map[uint16]string
+ FptrMapUint16String *map[uint16]string
+ FMapUint16Uint map[uint16]uint
+ FptrMapUint16Uint *map[uint16]uint
+ FMapUint16Uint8 map[uint16]uint8
+ FptrMapUint16Uint8 *map[uint16]uint8
+ FMapUint16Uint16 map[uint16]uint16
+ FptrMapUint16Uint16 *map[uint16]uint16
+ FMapUint16Uint32 map[uint16]uint32
+ FptrMapUint16Uint32 *map[uint16]uint32
+ FMapUint16Uint64 map[uint16]uint64
+ FptrMapUint16Uint64 *map[uint16]uint64
+ FMapUint16Uintptr map[uint16]uintptr
+ FptrMapUint16Uintptr *map[uint16]uintptr
+ FMapUint16Int map[uint16]int
+ FptrMapUint16Int *map[uint16]int
+ FMapUint16Int8 map[uint16]int8
+ FptrMapUint16Int8 *map[uint16]int8
+ FMapUint16Int16 map[uint16]int16
+ FptrMapUint16Int16 *map[uint16]int16
+ FMapUint16Int32 map[uint16]int32
+ FptrMapUint16Int32 *map[uint16]int32
+ FMapUint16Int64 map[uint16]int64
+ FptrMapUint16Int64 *map[uint16]int64
+ FMapUint16Float32 map[uint16]float32
+ FptrMapUint16Float32 *map[uint16]float32
+ FMapUint16Float64 map[uint16]float64
+ FptrMapUint16Float64 *map[uint16]float64
+ FMapUint16Bool map[uint16]bool
+ FptrMapUint16Bool *map[uint16]bool
+ FMapUint32Intf map[uint32]interface{}
+ FptrMapUint32Intf *map[uint32]interface{}
+ FMapUint32String map[uint32]string
+ FptrMapUint32String *map[uint32]string
+ FMapUint32Uint map[uint32]uint
+ FptrMapUint32Uint *map[uint32]uint
+ FMapUint32Uint8 map[uint32]uint8
+ FptrMapUint32Uint8 *map[uint32]uint8
+ FMapUint32Uint16 map[uint32]uint16
+ FptrMapUint32Uint16 *map[uint32]uint16
+ FMapUint32Uint32 map[uint32]uint32
+ FptrMapUint32Uint32 *map[uint32]uint32
+ FMapUint32Uint64 map[uint32]uint64
+ FptrMapUint32Uint64 *map[uint32]uint64
+ FMapUint32Uintptr map[uint32]uintptr
+ FptrMapUint32Uintptr *map[uint32]uintptr
+ FMapUint32Int map[uint32]int
+ FptrMapUint32Int *map[uint32]int
+ FMapUint32Int8 map[uint32]int8
+ FptrMapUint32Int8 *map[uint32]int8
+ FMapUint32Int16 map[uint32]int16
+ FptrMapUint32Int16 *map[uint32]int16
+ FMapUint32Int32 map[uint32]int32
+ FptrMapUint32Int32 *map[uint32]int32
+ FMapUint32Int64 map[uint32]int64
+ FptrMapUint32Int64 *map[uint32]int64
+ FMapUint32Float32 map[uint32]float32
+ FptrMapUint32Float32 *map[uint32]float32
+ FMapUint32Float64 map[uint32]float64
+ FptrMapUint32Float64 *map[uint32]float64
+ FMapUint32Bool map[uint32]bool
+ FptrMapUint32Bool *map[uint32]bool
+ FMapUint64Intf map[uint64]interface{}
+ FptrMapUint64Intf *map[uint64]interface{}
+ FMapUint64String map[uint64]string
+ FptrMapUint64String *map[uint64]string
+ FMapUint64Uint map[uint64]uint
+ FptrMapUint64Uint *map[uint64]uint
+ FMapUint64Uint8 map[uint64]uint8
+ FptrMapUint64Uint8 *map[uint64]uint8
+ FMapUint64Uint16 map[uint64]uint16
+ FptrMapUint64Uint16 *map[uint64]uint16
+ FMapUint64Uint32 map[uint64]uint32
+ FptrMapUint64Uint32 *map[uint64]uint32
+ FMapUint64Uint64 map[uint64]uint64
+ FptrMapUint64Uint64 *map[uint64]uint64
+ FMapUint64Uintptr map[uint64]uintptr
+ FptrMapUint64Uintptr *map[uint64]uintptr
+ FMapUint64Int map[uint64]int
+ FptrMapUint64Int *map[uint64]int
+ FMapUint64Int8 map[uint64]int8
+ FptrMapUint64Int8 *map[uint64]int8
+ FMapUint64Int16 map[uint64]int16
+ FptrMapUint64Int16 *map[uint64]int16
+ FMapUint64Int32 map[uint64]int32
+ FptrMapUint64Int32 *map[uint64]int32
+ FMapUint64Int64 map[uint64]int64
+ FptrMapUint64Int64 *map[uint64]int64
+ FMapUint64Float32 map[uint64]float32
+ FptrMapUint64Float32 *map[uint64]float32
+ FMapUint64Float64 map[uint64]float64
+ FptrMapUint64Float64 *map[uint64]float64
+ FMapUint64Bool map[uint64]bool
+ FptrMapUint64Bool *map[uint64]bool
+ FMapUintptrIntf map[uintptr]interface{}
+ FptrMapUintptrIntf *map[uintptr]interface{}
+ FMapUintptrString map[uintptr]string
+ FptrMapUintptrString *map[uintptr]string
+ FMapUintptrUint map[uintptr]uint
+ FptrMapUintptrUint *map[uintptr]uint
+ FMapUintptrUint8 map[uintptr]uint8
+ FptrMapUintptrUint8 *map[uintptr]uint8
+ FMapUintptrUint16 map[uintptr]uint16
+ FptrMapUintptrUint16 *map[uintptr]uint16
+ FMapUintptrUint32 map[uintptr]uint32
+ FptrMapUintptrUint32 *map[uintptr]uint32
+ FMapUintptrUint64 map[uintptr]uint64
+ FptrMapUintptrUint64 *map[uintptr]uint64
+ FMapUintptrUintptr map[uintptr]uintptr
+ FptrMapUintptrUintptr *map[uintptr]uintptr
+ FMapUintptrInt map[uintptr]int
+ FptrMapUintptrInt *map[uintptr]int
+ FMapUintptrInt8 map[uintptr]int8
+ FptrMapUintptrInt8 *map[uintptr]int8
+ FMapUintptrInt16 map[uintptr]int16
+ FptrMapUintptrInt16 *map[uintptr]int16
+ FMapUintptrInt32 map[uintptr]int32
+ FptrMapUintptrInt32 *map[uintptr]int32
+ FMapUintptrInt64 map[uintptr]int64
+ FptrMapUintptrInt64 *map[uintptr]int64
+ FMapUintptrFloat32 map[uintptr]float32
+ FptrMapUintptrFloat32 *map[uintptr]float32
+ FMapUintptrFloat64 map[uintptr]float64
+ FptrMapUintptrFloat64 *map[uintptr]float64
+ FMapUintptrBool map[uintptr]bool
+ FptrMapUintptrBool *map[uintptr]bool
+ FMapIntIntf map[int]interface{}
+ FptrMapIntIntf *map[int]interface{}
+ FMapIntString map[int]string
+ FptrMapIntString *map[int]string
+ FMapIntUint map[int]uint
+ FptrMapIntUint *map[int]uint
+ FMapIntUint8 map[int]uint8
+ FptrMapIntUint8 *map[int]uint8
+ FMapIntUint16 map[int]uint16
+ FptrMapIntUint16 *map[int]uint16
+ FMapIntUint32 map[int]uint32
+ FptrMapIntUint32 *map[int]uint32
+ FMapIntUint64 map[int]uint64
+ FptrMapIntUint64 *map[int]uint64
+ FMapIntUintptr map[int]uintptr
+ FptrMapIntUintptr *map[int]uintptr
+ FMapIntInt map[int]int
+ FptrMapIntInt *map[int]int
+ FMapIntInt8 map[int]int8
+ FptrMapIntInt8 *map[int]int8
+ FMapIntInt16 map[int]int16
+ FptrMapIntInt16 *map[int]int16
+ FMapIntInt32 map[int]int32
+ FptrMapIntInt32 *map[int]int32
+ FMapIntInt64 map[int]int64
+ FptrMapIntInt64 *map[int]int64
+ FMapIntFloat32 map[int]float32
+ FptrMapIntFloat32 *map[int]float32
+ FMapIntFloat64 map[int]float64
+ FptrMapIntFloat64 *map[int]float64
+ FMapIntBool map[int]bool
+ FptrMapIntBool *map[int]bool
+ FMapInt8Intf map[int8]interface{}
+ FptrMapInt8Intf *map[int8]interface{}
+ FMapInt8String map[int8]string
+ FptrMapInt8String *map[int8]string
+ FMapInt8Uint map[int8]uint
+ FptrMapInt8Uint *map[int8]uint
+ FMapInt8Uint8 map[int8]uint8
+ FptrMapInt8Uint8 *map[int8]uint8
+ FMapInt8Uint16 map[int8]uint16
+ FptrMapInt8Uint16 *map[int8]uint16
+ FMapInt8Uint32 map[int8]uint32
+ FptrMapInt8Uint32 *map[int8]uint32
+ FMapInt8Uint64 map[int8]uint64
+ FptrMapInt8Uint64 *map[int8]uint64
+ FMapInt8Uintptr map[int8]uintptr
+ FptrMapInt8Uintptr *map[int8]uintptr
+ FMapInt8Int map[int8]int
+ FptrMapInt8Int *map[int8]int
+ FMapInt8Int8 map[int8]int8
+ FptrMapInt8Int8 *map[int8]int8
+ FMapInt8Int16 map[int8]int16
+ FptrMapInt8Int16 *map[int8]int16
+ FMapInt8Int32 map[int8]int32
+ FptrMapInt8Int32 *map[int8]int32
+ FMapInt8Int64 map[int8]int64
+ FptrMapInt8Int64 *map[int8]int64
+ FMapInt8Float32 map[int8]float32
+ FptrMapInt8Float32 *map[int8]float32
+ FMapInt8Float64 map[int8]float64
+ FptrMapInt8Float64 *map[int8]float64
+ FMapInt8Bool map[int8]bool
+ FptrMapInt8Bool *map[int8]bool
+ FMapInt16Intf map[int16]interface{}
+ FptrMapInt16Intf *map[int16]interface{}
+ FMapInt16String map[int16]string
+ FptrMapInt16String *map[int16]string
+ FMapInt16Uint map[int16]uint
+ FptrMapInt16Uint *map[int16]uint
+ FMapInt16Uint8 map[int16]uint8
+ FptrMapInt16Uint8 *map[int16]uint8
+ FMapInt16Uint16 map[int16]uint16
+ FptrMapInt16Uint16 *map[int16]uint16
+ FMapInt16Uint32 map[int16]uint32
+ FptrMapInt16Uint32 *map[int16]uint32
+ FMapInt16Uint64 map[int16]uint64
+ FptrMapInt16Uint64 *map[int16]uint64
+ FMapInt16Uintptr map[int16]uintptr
+ FptrMapInt16Uintptr *map[int16]uintptr
+ FMapInt16Int map[int16]int
+ FptrMapInt16Int *map[int16]int
+ FMapInt16Int8 map[int16]int8
+ FptrMapInt16Int8 *map[int16]int8
+ FMapInt16Int16 map[int16]int16
+ FptrMapInt16Int16 *map[int16]int16
+ FMapInt16Int32 map[int16]int32
+ FptrMapInt16Int32 *map[int16]int32
+ FMapInt16Int64 map[int16]int64
+ FptrMapInt16Int64 *map[int16]int64
+ FMapInt16Float32 map[int16]float32
+ FptrMapInt16Float32 *map[int16]float32
+ FMapInt16Float64 map[int16]float64
+ FptrMapInt16Float64 *map[int16]float64
+ FMapInt16Bool map[int16]bool
+ FptrMapInt16Bool *map[int16]bool
+ FMapInt32Intf map[int32]interface{}
+ FptrMapInt32Intf *map[int32]interface{}
+ FMapInt32String map[int32]string
+ FptrMapInt32String *map[int32]string
+ FMapInt32Uint map[int32]uint
+ FptrMapInt32Uint *map[int32]uint
+ FMapInt32Uint8 map[int32]uint8
+ FptrMapInt32Uint8 *map[int32]uint8
+ FMapInt32Uint16 map[int32]uint16
+ FptrMapInt32Uint16 *map[int32]uint16
+ FMapInt32Uint32 map[int32]uint32
+ FptrMapInt32Uint32 *map[int32]uint32
+ FMapInt32Uint64 map[int32]uint64
+ FptrMapInt32Uint64 *map[int32]uint64
+ FMapInt32Uintptr map[int32]uintptr
+ FptrMapInt32Uintptr *map[int32]uintptr
+ FMapInt32Int map[int32]int
+ FptrMapInt32Int *map[int32]int
+ FMapInt32Int8 map[int32]int8
+ FptrMapInt32Int8 *map[int32]int8
+ FMapInt32Int16 map[int32]int16
+ FptrMapInt32Int16 *map[int32]int16
+ FMapInt32Int32 map[int32]int32
+ FptrMapInt32Int32 *map[int32]int32
+ FMapInt32Int64 map[int32]int64
+ FptrMapInt32Int64 *map[int32]int64
+ FMapInt32Float32 map[int32]float32
+ FptrMapInt32Float32 *map[int32]float32
+ FMapInt32Float64 map[int32]float64
+ FptrMapInt32Float64 *map[int32]float64
+ FMapInt32Bool map[int32]bool
+ FptrMapInt32Bool *map[int32]bool
+ FMapInt64Intf map[int64]interface{}
+ FptrMapInt64Intf *map[int64]interface{}
+ FMapInt64String map[int64]string
+ FptrMapInt64String *map[int64]string
+ FMapInt64Uint map[int64]uint
+ FptrMapInt64Uint *map[int64]uint
+ FMapInt64Uint8 map[int64]uint8
+ FptrMapInt64Uint8 *map[int64]uint8
+ FMapInt64Uint16 map[int64]uint16
+ FptrMapInt64Uint16 *map[int64]uint16
+ FMapInt64Uint32 map[int64]uint32
+ FptrMapInt64Uint32 *map[int64]uint32
+ FMapInt64Uint64 map[int64]uint64
+ FptrMapInt64Uint64 *map[int64]uint64
+ FMapInt64Uintptr map[int64]uintptr
+ FptrMapInt64Uintptr *map[int64]uintptr
+ FMapInt64Int map[int64]int
+ FptrMapInt64Int *map[int64]int
+ FMapInt64Int8 map[int64]int8
+ FptrMapInt64Int8 *map[int64]int8
+ FMapInt64Int16 map[int64]int16
+ FptrMapInt64Int16 *map[int64]int16
+ FMapInt64Int32 map[int64]int32
+ FptrMapInt64Int32 *map[int64]int32
+ FMapInt64Int64 map[int64]int64
+ FptrMapInt64Int64 *map[int64]int64
+ FMapInt64Float32 map[int64]float32
+ FptrMapInt64Float32 *map[int64]float32
+ FMapInt64Float64 map[int64]float64
+ FptrMapInt64Float64 *map[int64]float64
+ FMapInt64Bool map[int64]bool
+ FptrMapInt64Bool *map[int64]bool
+ FMapBoolIntf map[bool]interface{}
+ FptrMapBoolIntf *map[bool]interface{}
+ FMapBoolString map[bool]string
+ FptrMapBoolString *map[bool]string
+ FMapBoolUint map[bool]uint
+ FptrMapBoolUint *map[bool]uint
+ FMapBoolUint8 map[bool]uint8
+ FptrMapBoolUint8 *map[bool]uint8
+ FMapBoolUint16 map[bool]uint16
+ FptrMapBoolUint16 *map[bool]uint16
+ FMapBoolUint32 map[bool]uint32
+ FptrMapBoolUint32 *map[bool]uint32
+ FMapBoolUint64 map[bool]uint64
+ FptrMapBoolUint64 *map[bool]uint64
+ FMapBoolUintptr map[bool]uintptr
+ FptrMapBoolUintptr *map[bool]uintptr
+ FMapBoolInt map[bool]int
+ FptrMapBoolInt *map[bool]int
+ FMapBoolInt8 map[bool]int8
+ FptrMapBoolInt8 *map[bool]int8
+ FMapBoolInt16 map[bool]int16
+ FptrMapBoolInt16 *map[bool]int16
+ FMapBoolInt32 map[bool]int32
+ FptrMapBoolInt32 *map[bool]int32
+ FMapBoolInt64 map[bool]int64
+ FptrMapBoolInt64 *map[bool]int64
+ FMapBoolFloat32 map[bool]float32
+ FptrMapBoolFloat32 *map[bool]float32
+ FMapBoolFloat64 map[bool]float64
+ FptrMapBoolFloat64 *map[bool]float64
+ FMapBoolBool map[bool]bool
+ FptrMapBoolBool *map[bool]bool
+}
diff --git a/vendor/github.com/ugorji/go/codec/msgpack.go b/vendor/github.com/ugorji/go/codec/msgpack.go
index 730976973..3c58daf3f 100644
--- a/vendor/github.com/ugorji/go/codec/msgpack.go
+++ b/vendor/github.com/ugorji/go/codec/msgpack.go
@@ -349,11 +349,11 @@ func (d *msgpackDecDriver) DecodeNaked() {
n.s = d.DecodeString()
} else {
n.v = valueTypeBytes
- n.l = d.DecodeBytes(nil, false, false)
+ n.l = d.DecodeBytes(nil, false)
}
case bd == mpBin8, bd == mpBin16, bd == mpBin32:
n.v = valueTypeBytes
- n.l = d.DecodeBytes(nil, false, false)
+ n.l = d.DecodeBytes(nil, false)
case bd == mpArray16, bd == mpArray32, bd >= mpFixArrayMin && bd <= mpFixArrayMax:
n.v = valueTypeArray
decodeFurther = true
@@ -525,12 +525,11 @@ func (d *msgpackDecDriver) DecodeBool() (b bool) {
return
}
-func (d *msgpackDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
+func (d *msgpackDecDriver) DecodeBytes(bs []byte, 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 {
@@ -553,7 +552,11 @@ func (d *msgpackDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOu
}
func (d *msgpackDecDriver) DecodeString() (s string) {
- return string(d.DecodeBytes(d.b[:], true, true))
+ return string(d.DecodeBytes(d.b[:], true))
+}
+
+func (d *msgpackDecDriver) DecodeStringAsBytes() (s []byte) {
+ return d.DecodeBytes(d.b[:], true)
}
func (d *msgpackDecDriver) readNextBd() {
@@ -687,10 +690,10 @@ func (d *msgpackDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs
}
xbd := d.bd
if xbd == mpBin8 || xbd == mpBin16 || xbd == mpBin32 {
- xbs = d.DecodeBytes(nil, false, true)
+ xbs = d.DecodeBytes(nil, true)
} else if xbd == mpStr8 || xbd == mpStr16 || xbd == mpStr32 ||
(xbd >= mpFixStrMin && xbd <= mpFixStrMax) {
- xbs = d.DecodeBytes(nil, true, true)
+ xbs = d.DecodeStringAsBytes()
} else {
clen := d.readExtLen()
xtag = d.r.readn1()
diff --git a/vendor/github.com/ugorji/go/codec/noop.go b/vendor/github.com/ugorji/go/codec/noop.go
index cfee3d084..a7825156d 100644
--- a/vendor/github.com/ugorji/go/codec/noop.go
+++ b/vendor/github.com/ugorji/go/codec/noop.go
@@ -105,10 +105,9 @@ func (h *noopDrv) DecodeUint(bitsize uint8) (ui uint64) { return uint64(h.
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() []byte { return h.DecodeBytes(nil, true) }
-// 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) DecodeBytes(bs []byte, zerocopy bool) []byte { return h.B[h.m(len(h.B))] }
func (h *noopDrv) ReadEnd() { h.end() }
diff --git a/vendor/github.com/ugorji/go/codec/prebuild.go b/vendor/github.com/ugorji/go/codec/prebuild.go
deleted file mode 100644
index 2353263e8..000000000
--- a/vendor/github.com/ugorji/go/codec/prebuild.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package codec
-
-//go:generate bash prebuild.sh
diff --git a/vendor/github.com/ugorji/go/codec/prebuild.sh b/vendor/github.com/ugorji/go/codec/prebuild.sh
deleted file mode 100755
index 04c61e48f..000000000
--- a/vendor/github.com/ugorji/go/codec/prebuild.sh
+++ /dev/null
@@ -1,205 +0,0 @@
-#!/bin/bash
-
-# _needgen is a helper function to tell if we need to generate files for msgp, codecgen.
-_needgen() {
- local a="$1"
- zneedgen=0
- if [[ ! -e "$a" ]]
- then
- zneedgen=1
- echo 1
- return 0
- fi
- for i in `ls -1 *.go.tmpl gen.go values_test.go`
- do
- if [[ "$a" -ot "$i" ]]
- then
- zneedgen=1
- echo 1
- return 0
- fi
- done
- echo 0
-}
-
-# _build generates fast-path.go and gen-helper.go.
-#
-# It is needed because there is some dependency between the generated code
-# and the other classes. Consequently, we have to totally remove the
-# generated files and put stubs in place, before calling "go run" again
-# to recreate them.
-_build() {
- if ! [[ "${zforce}" == "1" ||
- "1" == $( _needgen "fast-path.generated.go" ) ||
- "1" == $( _needgen "gen-helper.generated.go" ) ||
- "1" == $( _needgen "gen.generated.go" ) ||
- 1 == 0 ]]
- then
- return 0
- fi
-
- # echo "Running prebuild"
- if [ "${zbak}" == "1" ]
- then
- # echo "Backing up old generated files"
- _zts=`date '+%m%d%Y_%H%M%S'`
- _gg=".generated.go"
- [ -e "gen-helper${_gg}" ] && mv gen-helper${_gg} gen-helper${_gg}__${_zts}.bak
- [ -e "fast-path${_gg}" ] && mv fast-path${_gg} fast-path${_gg}__${_zts}.bak
- [ -e "gen${_gg}" ] && mv gen${_gg} gen${_gg}__${_zts}.bak
- # [ -e "safe${_gg}" ] && mv safe${_gg} safe${_gg}__${_zts}.bak
- # [ -e "unsafe${_gg}" ] && mv unsafe${_gg} unsafe${_gg}__${_zts}.bak
- fi
- rm -f gen-helper.generated.go fast-path.generated.go \
- gen.generated.go \
- *safe.generated.go *_generated_test.go *.generated_ffjson_expose.go
-
- cat > gen.generated.go <> gen.generated.go < gen-dec-map.go.tmpl
-
- cat >> gen.generated.go <> gen.generated.go < gen-dec-array.go.tmpl
-
- cat >> gen.generated.go < gen-from-tmpl.codec.generated.go < gen-from-tmpl.generated.go <
+// go test "-tags=x codecgen" -bench=.
//
// To fully test everything:
// go test -tags=x -benchtime=100ms -tv -bg -bi -brw -bu -v -run=. -bench=.
@@ -88,6 +88,7 @@ var (
testMaxInitLen int
testJsonHTMLCharsAsIs bool
+ testJsonPreferFloat bool
)
// flag variables used by bench
@@ -127,6 +128,7 @@ func testInitFlags() {
flag.BoolVar(&testUseMust, "tm", true, "Use Must(En|De)code")
flag.BoolVar(&testCheckCircRef, "tl", false, "Use Check Circular Ref")
flag.BoolVar(&testJsonHTMLCharsAsIs, "tas", false, "Set JSON HTMLCharsAsIs")
+ flag.BoolVar(&testJsonPreferFloat, "tjf", false, "Prefer Float in json")
}
func benchInitFlags() {
@@ -149,8 +151,16 @@ func testHEDGet(h Handle) *testHED {
return &testHEDs[len(testHEDs)-1]
}
+func testReinit() {
+ testOnce = sync.Once{}
+ testHEDs = nil
+}
+
func testInitAll() {
- flag.Parse()
+ // only parse it once.
+ if !flag.Parsed() {
+ flag.Parse()
+ }
for _, f := range testPreInitFns {
f()
}
diff --git a/vendor/github.com/ugorji/go/codec/simple.go b/vendor/github.com/ugorji/go/codec/simple.go
index 656bc691b..209e9887f 100644
--- a/vendor/github.com/ugorji/go/codec/simple.go
+++ b/vendor/github.com/ugorji/go/codec/simple.go
@@ -361,10 +361,14 @@ func (d *simpleDecDriver) decLen() int {
}
func (d *simpleDecDriver) DecodeString() (s string) {
- return string(d.DecodeBytes(d.b[:], true, true))
+ return string(d.DecodeBytes(d.b[:], true))
}
-func (d *simpleDecDriver) DecodeBytes(bs []byte, isstring, zerocopy bool) (bsOut []byte) {
+func (d *simpleDecDriver) DecodeStringAsBytes() (s []byte) {
+ return d.DecodeBytes(d.b[:], true)
+}
+
+func (d *simpleDecDriver) DecodeBytes(bs []byte, zerocopy bool) (bsOut []byte) {
if !d.bdRead {
d.readNextBd()
}
@@ -415,7 +419,7 @@ func (d *simpleDecDriver) decodeExtV(verifyTag bool, tag byte) (xtag byte, xbs [
}
xbs = d.r.readx(l)
case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4:
- xbs = d.DecodeBytes(nil, false, true)
+ xbs = d.DecodeBytes(nil, true)
default:
d.d.errorf("Invalid d.bd for extensions (Expecting extensions or byte array). Got: 0x%x", d.bd)
return
@@ -463,7 +467,7 @@ func (d *simpleDecDriver) DecodeNaked() {
n.s = d.DecodeString()
case simpleVdByteArray, simpleVdByteArray + 1, simpleVdByteArray + 2, simpleVdByteArray + 3, simpleVdByteArray + 4:
n.v = valueTypeBytes
- n.l = d.DecodeBytes(nil, false, false)
+ n.l = d.DecodeBytes(nil, false)
case simpleVdExt, simpleVdExt + 1, simpleVdExt + 2, simpleVdExt + 3, simpleVdExt + 4:
n.v = valueTypeExt
l := d.decLen()
diff --git a/vendor/github.com/ugorji/go/codec/tests.sh b/vendor/github.com/ugorji/go/codec/tests.sh
deleted file mode 100755
index fc9f5dee3..000000000
--- a/vendor/github.com/ugorji/go/codec/tests.sh
+++ /dev/null
@@ -1,107 +0,0 @@
-#!/bin/bash
-
-# Run all the different permutations of all the tests.
-# This helps ensure that nothing gets broken.
-
-_run() {
- # 1. VARIATIONS: regular (t), canonical (c), IO R/W (i),
- # binc-nosymbols (n), struct2array (s), intern string (e),
- # json-indent (d), circular (l)
- # 2. MODE: reflection (r), external (x), codecgen (g), unsafe (u), notfastpath (f)
- # 3. OPTIONS: verbose (v), reset (z), must (m),
- #
- # Use combinations of mode to get exactly what you want,
- # and then pass the variations you need.
-
- ztags=""
- zargs=""
- local OPTIND
- OPTIND=1
- # "_xurtcinsvgzmefdl" === "_cdefgilmnrtsuvxz"
- while getopts "_cdefgilmnrtsuvwxz" flag
- do
- case "x$flag" in
- 'xr') ;;
- 'xf') ztags="$ztags notfastpath" ;;
- 'xg') ztags="$ztags codecgen" ;;
- 'xx') ztags="$ztags x" ;;
- 'xu') ztags="$ztags unsafe" ;;
- 'xv') zargs="$zargs -tv" ;;
- 'xz') zargs="$zargs -tr" ;;
- 'xm') zargs="$zargs -tm" ;;
- 'xl') zargs="$zargs -tl" ;;
- 'xw') zargs="$zargs -tx=10" ;;
- *) ;;
- esac
- done
- # shift $((OPTIND-1))
- printf '............. TAGS: %s .............\n' "$ztags"
- # echo ">>>>>>> TAGS: $ztags"
-
- OPTIND=1
- while getopts "_cdefgilmnrtsuvwxz" flag
- do
- case "x$flag" in
- 'xt') printf ">>>>>>> REGULAR : "; go test "-tags=$ztags" $zargs ; sleep 2 ;;
- 'xc') printf ">>>>>>> CANONICAL : "; go test "-tags=$ztags" $zargs -tc; sleep 2 ;;
- 'xi') printf ">>>>>>> I/O : "; go test "-tags=$ztags" $zargs -ti; sleep 2 ;;
- 'xn') printf ">>>>>>> NO_SYMBOLS : "; go test "-tags=$ztags" -run=Binc $zargs -tn; sleep 2 ;;
- 'xs') printf ">>>>>>> TO_ARRAY : "; go test "-tags=$ztags" $zargs -ts; sleep 2 ;;
- 'xe') printf ">>>>>>> INTERN : "; go test "-tags=$ztags" $zargs -te; sleep 2 ;;
- 'xd') printf ">>>>>>> INDENT : ";
- go test "-tags=$ztags" -run=JsonCodecsTable -td=-1 $zargs;
- go test "-tags=$ztags" -run=JsonCodecsTable -td=8 $zargs;
- sleep 2 ;;
- *) ;;
- esac
- done
- shift $((OPTIND-1))
-
- OPTIND=1
-}
-
-# echo ">>>>>>> RUNNING VARIATIONS OF TESTS"
-if [[ "x$@" = "x" || "x$@" = "x-A" ]]; then
- # All: r, x, g, gu
- _run "-_tcinsed_ml" # regular
- _run "-_tcinsed_ml_z" # regular with reset
- _run "-w_tcinsed_ml" # regular with max init len
- _run "-_tcinsed_ml_f" # regular with no fastpath (notfastpath)
- _run "-x_tcinsed_ml" # external
- _run "-gx_tcinsed_ml" # codecgen: requires external
- _run "-gxu_tcinsed_ml" # codecgen + unsafe
-elif [[ "x$@" = "x-Z" ]]; then
- # Regular
- _run "-_tcinsed_ml" # regular
- _run "-_tcinsed_ml_z" # regular with reset
-elif [[ "x$@" = "x-F" ]]; then
- # regular with notfastpath
- _run "-_tcinsed_ml_f" # regular
- _run "-_tcinsed_ml_zf" # regular with reset
-elif [[ "x$@" = "x-C" ]]; then
- # codecgen
- _run "-gx_tcinsed_ml" # codecgen: requires external
- _run "-gxu_tcinsed_ml" # codecgen + unsafe
- _run "-gxuw_tcinsed_ml" # codecgen + unsafe + maxinitlen
-elif [[ "x$@" = "x-X" ]]; then
- # external
- _run "-x_tcinsed_ml" # external
-elif [[ "x$@" = "x-h" || "x$@" = "x-?" ]]; then
- cat <
+ - Entity Declarations & References
+ - XML Declaration (assume UTF-8)
+ - XML Directive i.e.
+ - Other Declarations: Notation, etc.
+ - Comment
+ - Processing Instruction
+ - schema / DTD for validation:
+ We are not a VALIDATING parser. Validation is done elsewhere.
+ However, some parts of the DTD internal subset are used (SEE BELOW).
+ For Attribute List Declarations e.g.
+
+ We considered using the ATTLIST to get "default" value, but not to validate the contents. (VETOED)
+
+The following XML features are supported
+ - Namespace
+ - Element
+ - Attribute
+ - cdata
+ - Unicode escape
+
+The following DTD (when as an internal sub-set) features are supported:
+ - Internal Entities e.g.
+ AND entities for the set: [<>&"']
+ - Parameter entities e.g.
+
+
+At decode time, a structure containing the following is kept
+ - namespace mapping
+ - default attribute values
+ - all internal entities (<>&"' and others written in the document)
+
+When decode starts, it parses XML namespace declarations and creates a map in the
+xmlDecDriver. While parsing, that map continously gets updated.
+The only problem happens when a namespace declaration happens on the node that it defines.
+e.g.
+To handle this, each Element must be fully parsed at a time,
+even if it amounts to multiple tokens which are returned one at a time on request.
+
+xmlns is a special attribute name.
+ - It is used to define namespaces, including the default
+ - It is never returned as an AttrKey or AttrVal.
+ *We may decide later to allow user to use it e.g. you want to parse the xmlns mappings into a field.*
+
+Number, bool, null, mapKey, etc can all be decoded from any xmlToken.
+This accomodates map[int]string for example.
+
+It should be possible to create a schema from the types,
+or vice versa (generate types from schema with appropriate tags).
+This is however out-of-scope from this parsing project.
+
+We should write all namespace information at the first point that it is referenced in the tree,
+and use the mapping for all child nodes and attributes. This means that state is maintained
+at a point in the tree. This also means that calls to Decode or MustDecode will reset some state.
+
+When decoding, it is important to keep track of entity references and default attribute values.
+It seems these can only be stored in the DTD components. We should honor them when decoding.
+
+Configuration for XMLHandle will look like this:
+
+ XMLHandle
+ DefaultNS string
+ // Encoding:
+ NS map[string]string // ns URI to key, used for encoding
+ // Decoding: in case ENTITY declared in external schema or dtd, store info needed here
+ Entities map[string]string // map of entity rep to character
+
+
+During encode, if a namespace mapping is not defined for a namespace found on a struct,
+then we create a mapping for it using nsN (where N is 1..1000000, and doesn't conflict
+with any other namespace mapping).
+
+Note that different fields in a struct can have different namespaces.
+However, all fields will default to the namespace on the _struct field (if defined).
+
+An XML document is a name, a map of attributes and a list of children.
+Consequently, we cannot "DecodeNaked" into a map[string]interface{} (for example).
+We have to "DecodeNaked" into something that resembles XML data.
+
+To support DecodeNaked (decode into nil interface{}) we have to define some "supporting" types:
+ type Name struct { // Prefered. Less allocations due to conversions.
+ Local string
+ Space string
+ }
+ type Element struct {
+ Name Name
+ Attrs map[Name]string
+ Children []interface{} // each child is either *Element or string
+ }
+Only two "supporting" types are exposed for XML: Name and Element.
+
+We considered 'type Name string' where Name is like "Space Local" (space-separated).
+We decided against it, because each creation of a name would lead to
+double allocation (first convert []byte to string, then concatenate them into a string).
+The benefit is that it is faster to read Attrs from a map. But given that Element is a value
+object, we want to eschew methods and have public exposed variables.
+
+We also considered the following, where xml types were not value objects, and we used
+intelligent accessor methods to extract information and for performance.
+*** WE DECIDED AGAINST THIS. ***
+ type Attr struct {
+ Name Name
+ Value string
+ }
+ // Element is a ValueObject: There are no accessor methods.
+ // Make element self-contained.
+ type Element struct {
+ Name Name
+ attrsMap map[string]string // where key is "Space Local"
+ attrs []Attr
+ childrenT []string
+ childrenE []Element
+ childrenI []int // each child is a index into T or E.
+ }
+ func (x *Element) child(i) interface{} // returns string or *Element
+
+Per XML spec and our default handling, white space is insignificant between elements,
+specifically between parent-child or siblings. White space occuring alone between start
+and end element IS significant. However, if xml:space='preserve', then we 'preserve'
+all whitespace. This is more critical when doing a DecodeNaked, but MAY not be as critical
+when decoding into a typed value.
+
+**Note: there is no xml: namespace. The xml: attributes were defined before namespaces.**
+**So treat them as just "directives" that should be interpreted to mean something**.
+
+On encoding, we don't add any prettifying markup (indenting, etc).
+
+A document or element can only be encoded/decoded from/to a struct. In this mode:
+ - struct name maps to element name (or tag-info from _struct field)
+ - fields are mapped to child elements or attributes
+
+A map is either encoded as attributes on current element, or as a set of child elements.
+Maps are encoded as attributes iff their keys and values are primitives (number, bool, string).
+
+A list is encoded as a set of child elements.
+
+Primitives (number, bool, string) are encoded as an element, attribute or text
+depending on the context.
+
+Extensions must encode themselves as a text string.
+
+Encoding is tough, specifically when encoding mappings, because we need to encode
+as either attribute or element. To do this, we need to default to encoding as attributes,
+and then let Encoder inform the Handle when to start encoding as nodes.
+i.e. Encoder does something like:
+
+ h.EncodeMapStart()
+ h.Encode(), h.Encode(), ...
+ h.EncodeMapNotAttrSignal() // this is not a bool, because it's a signal
+ h.Encode(), h.Encode(), ...
+ h.EncodeEnd()
+
+Only XMLHandle understands this, and will set itself to start encoding as elements.
+
+This support extends to maps. For example, if a struct field is a map, and it has
+the struct tag signifying it should be attr, then all its fields are encoded as attributes.
+e.g.
+
+ type X struct {
+ M map[string]int `codec:"m,attr"` // encode as attributes
+ }
+
+Question:
+ - if encoding a map, what if map keys have spaces in them???
+ Then they cannot be attributes or child elements. Error.
+
+Misc:
+
+ - For attribute values, normalize by trimming beginning and ending white space,
+ and converting every white space sequence to a single space.
+ - ATTLIST restrictions are enforced.
+ e.g. default value of xml:space, skipping xml:XYZ style attributes, etc.
+ - Consider supporting NON-STRICT mode (e.g. to handle HTML parsing).
+ Some elements e.g. br, hr, etc need not close and should be auto-closed
+ ... (see http://www.w3.org/TR/html4/loose.dtd)
+ An expansive set of entities are pre-defined.
+ - Have easy way to create a HTML parser:
+ add a HTML() method to XMLHandle, that will set Strict=false, specify AutoClose,
+ and add HTML Entities to the list.
+ - Support validating element/attribute XMLName before writing it.
+ Keep this behind a flag, which is set to false by default (for performance).
+ type XMLHandle struct {
+ CheckName bool
+ }
+
+ROADMAP (1 weeks):
+ - build encoder (1 day)
+ - build decoder (based off xmlParser) (1 day)
+ - implement xmlParser (2 days).
+ Look at encoding/xml for inspiration.
+ - integrate and TEST (1 days)
+ - write article and post it (1 day)
+
+
+*/
+
+// ----------- PARSER -------------------
+
+type xmlTokenType uint8
+
+const (
+ _ xmlTokenType = iota << 1
+ xmlTokenElemStart
+ xmlTokenElemEnd
+ xmlTokenAttrKey
+ xmlTokenAttrVal
+ xmlTokenText
+)
+
+type xmlToken struct {
+ Type xmlTokenType
+ Value string
+ Namespace string // blank for AttrVal and Text
+}
+
+type xmlParser struct {
+ r decReader
+ toks []xmlToken // list of tokens.
+ ptr int // ptr into the toks slice
+ done bool // nothing else to parse. r now returns EOF.
+}
+
+func (x *xmlParser) next() (t *xmlToken) {
+ // once x.done, or x.ptr == len(x.toks) == 0, then return nil (to signify finish)
+ if !x.done && len(x.toks) == 0 {
+ x.nextTag()
+ }
+ // parses one element at a time (into possible many tokens)
+ if x.ptr < len(x.toks) {
+ t = &(x.toks[x.ptr])
+ x.ptr++
+ if x.ptr == len(x.toks) {
+ x.ptr = 0
+ x.toks = x.toks[:0]
+ }
+ }
+ return
+}
+
+// nextTag will parses the next element and fill up toks.
+// It set done flag if/once EOF is reached.
+func (x *xmlParser) nextTag() {
+ // TODO: implement.
+}
+
+// ----------- ENCODER -------------------
+
+type xmlEncDriver struct {
+ e *Encoder
+ w encWriter
+ h *XMLHandle
+ b [64]byte // scratch
+ bs []byte // scratch
+ // s jsonStack
+ noBuiltInTypes
+}
+
+// ----------- DECODER -------------------
+
+type xmlDecDriver struct {
+ d *Decoder
+ h *XMLHandle
+ r decReader // *bytesDecReader decReader
+ ct valueType // container type. one of unset, array or map.
+ bstr [8]byte // scratch used for string \UXXX parsing
+ b [64]byte // scratch
+
+ // wsSkipped bool // whitespace skipped
+
+ // s jsonStack
+
+ noBuiltInTypes
+}
+
+// DecodeNaked will decode into an XMLNode
+
+// XMLName is a value object representing a namespace-aware NAME
+type XMLName struct {
+ Local string
+ Space string
+}
+
+// XMLNode represents a "union" of the different types of XML Nodes.
+// Only one of fields (Text or *Element) is set.
+type XMLNode struct {
+ Element *Element
+ Text string
+}
+
+// XMLElement is a value object representing an fully-parsed XML element.
+type XMLElement struct {
+ Name Name
+ Attrs map[XMLName]string
+ // Children is a list of child nodes, each being a *XMLElement or string
+ Children []XMLNode
+}
+
+// ----------- HANDLE -------------------
+
+type XMLHandle struct {
+ BasicHandle
+ textEncodingType
+
+ DefaultNS string
+ NS map[string]string // ns URI to key, for encoding
+ Entities map[string]string // entity representation to string, for encoding.
+}
+
+func (h *XMLHandle) newEncDriver(e *Encoder) encDriver {
+ return &xmlEncDriver{e: e, w: e.w, h: h}
+}
+
+func (h *XMLHandle) newDecDriver(d *Decoder) decDriver {
+ // d := xmlDecDriver{r: r.(*bytesDecReader), h: h}
+ hd := xmlDecDriver{d: d, r: d.r, h: h}
+ hd.n.bytes = d.b[:]
+ return &hd
+}
+
+func (h *XMLHandle) SetInterfaceExt(rt reflect.Type, tag uint64, ext InterfaceExt) (err error) {
+ return h.SetExt(rt, tag, &setExtWrapper{i: ext})
+}
+
+var _ decDriver = (*xmlDecDriver)(nil)
+var _ encDriver = (*xmlEncDriver)(nil)
diff --git a/vendor/github.com/ugorji/go/codec/z_all_test.go b/vendor/github.com/ugorji/go/codec/z_all_test.go
new file mode 100644
index 000000000..364cbd7e6
--- /dev/null
+++ b/vendor/github.com/ugorji/go/codec/z_all_test.go
@@ -0,0 +1,135 @@
+// +build alltests
+// +build go1.7
+
+package codec
+
+// Run this using:
+// go test -tags=alltests -run=Suite -coverprofile=cov.out
+// go tool cover -html=cov.out
+//
+// Because build tags are a build time parameter, we will have to test out the
+// different tags separately.
+// Tags: x codecgen safe appengine notfastpath
+//
+// These tags should be added to alltests, e.g.
+// go test '-tags=alltests x codecgen' -run=Suite -coverprofile=cov.out
+//
+// To run all tests before submitting code, run:
+// a=( "" "safe" "codecgen" "notfastpath" "codecgen notfastpath" "codecgen safe" "safe notfastpath" )
+// for i in "${a[@]}"; do echo ">>>> TAGS: $i"; go test "-tags=alltests $i" -run=Suite; done
+//
+// This only works on go1.7 and above. This is when subtests and suites were supported.
+
+import "testing"
+
+// func TestMain(m *testing.M) {
+// println("calling TestMain")
+// // set some parameters
+// exitcode := m.Run()
+// os.Exit(exitcode)
+// }
+
+func testSuite(t *testing.T, f func(t *testing.T)) {
+ // find . -name "*_test.go" | xargs grep -e 'flag.' | cut -d '&' -f 2 | cut -d ',' -f 1 | grep -e '^test'
+ // Disregard the following: testVerbose, testInitDebug, testSkipIntf, testJsonIndent (Need a test for it)
+
+ testReinit() // so flag.Parse() is called first, and never called again
+
+ testUseMust = false
+ testCanonical = false
+ testUseMust = false
+ testInternStr = false
+ testUseIoEncDec = false
+ testStructToArray = false
+ testWriteNoSymbols = false
+ testCheckCircRef = false
+ testJsonHTMLCharsAsIs = false
+ testUseReset = false
+ testMaxInitLen = 0
+ testJsonIndent = 0
+ testReinit()
+ t.Run("optionsFalse", f)
+
+ testMaxInitLen = 10
+ testJsonIndent = 8
+ testReinit()
+ t.Run("initLen10-jsonSpaces", f)
+
+ testReinit()
+ testMaxInitLen = 10
+ testJsonIndent = -1
+ testReinit()
+ t.Run("initLen10-jsonTabs", f)
+
+ testCanonical = true
+ testUseMust = true
+ testInternStr = true
+ testUseIoEncDec = true
+ testStructToArray = true
+ testWriteNoSymbols = true
+ testCheckCircRef = true
+ testJsonHTMLCharsAsIs = true
+ testUseReset = true
+ testReinit()
+ t.Run("optionsTrue", f)
+}
+
+/*
+z='codec_test.go'
+find . -name "$z" | xargs grep -e '^func Test' | \
+ cut -d '(' -f 1 | cut -d ' ' -f 2 | \
+ while read f; do echo "t.Run(\"$f\", $f)"; done
+*/
+
+func testCodecGroup(t *testing.T) {
+ // println("running testcodecsuite")
+ //
+ t.Run("TestBincCodecsTable", TestBincCodecsTable)
+ t.Run("TestBincCodecsMisc", TestBincCodecsMisc)
+ t.Run("TestBincCodecsEmbeddedPointer", TestBincCodecsEmbeddedPointer)
+ t.Run("TestBincStdEncIntf", TestBincStdEncIntf)
+ t.Run("TestBincMammoth", TestBincMammoth)
+ t.Run("TestSimpleCodecsTable", TestSimpleCodecsTable)
+ t.Run("TestSimpleCodecsMisc", TestSimpleCodecsMisc)
+ t.Run("TestSimpleCodecsEmbeddedPointer", TestSimpleCodecsEmbeddedPointer)
+ t.Run("TestSimpleStdEncIntf", TestSimpleStdEncIntf)
+ t.Run("TestSimpleMammoth", TestSimpleMammoth)
+ t.Run("TestMsgpackCodecsTable", TestMsgpackCodecsTable)
+ t.Run("TestMsgpackCodecsMisc", TestMsgpackCodecsMisc)
+ t.Run("TestMsgpackCodecsEmbeddedPointer", TestMsgpackCodecsEmbeddedPointer)
+ t.Run("TestMsgpackStdEncIntf", TestMsgpackStdEncIntf)
+ t.Run("TestMsgpackMammoth", TestMsgpackMammoth)
+ t.Run("TestCborCodecsTable", TestCborCodecsTable)
+ t.Run("TestCborCodecsMisc", TestCborCodecsMisc)
+ t.Run("TestCborCodecsEmbeddedPointer", TestCborCodecsEmbeddedPointer)
+ t.Run("TestCborMapEncodeForCanonical", TestCborMapEncodeForCanonical)
+ t.Run("TestCborCodecChan", TestCborCodecChan)
+ t.Run("TestCborStdEncIntf", TestCborStdEncIntf)
+ t.Run("TestCborMammoth", TestCborMammoth)
+ t.Run("TestJsonCodecsTable", TestJsonCodecsTable)
+ t.Run("TestJsonCodecsMisc", TestJsonCodecsMisc)
+ t.Run("TestJsonCodecsEmbeddedPointer", TestJsonCodecsEmbeddedPointer)
+ t.Run("TestJsonCodecChan", TestJsonCodecChan)
+ t.Run("TestJsonStdEncIntf", TestJsonStdEncIntf)
+ t.Run("TestJsonMammoth", TestJsonMammoth)
+ t.Run("TestJsonRaw", TestJsonRaw)
+ t.Run("TestBincRaw", TestBincRaw)
+ t.Run("TestMsgpackRaw", TestMsgpackRaw)
+ t.Run("TestSimpleRaw", TestSimpleRaw)
+ t.Run("TestCborRaw", TestCborRaw)
+ t.Run("TestAllEncCircularRef", TestAllEncCircularRef)
+ t.Run("TestAllAnonCycle", TestAllAnonCycle)
+ t.Run("TestBincRpcGo", TestBincRpcGo)
+ t.Run("TestSimpleRpcGo", TestSimpleRpcGo)
+ t.Run("TestMsgpackRpcGo", TestMsgpackRpcGo)
+ t.Run("TestCborRpcGo", TestCborRpcGo)
+ t.Run("TestJsonRpcGo", TestJsonRpcGo)
+ t.Run("TestMsgpackRpcSpec", TestMsgpackRpcSpec)
+ t.Run("TestBincUnderlyingType", TestBincUnderlyingType)
+ t.Run("TestJsonLargeInteger", TestJsonLargeInteger)
+ t.Run("TestJsonDecodeNonStringScalarInStringContext", TestJsonDecodeNonStringScalarInStringContext)
+ t.Run("TestJsonEncodeIndent", TestJsonEncodeIndent)
+ //
+}
+
+func TestCodecSuite(t *testing.T) { testSuite(t, testCodecGroup) }
diff --git a/vendor/golang.org/x/crypto/acme/acme.go b/vendor/golang.org/x/crypto/acme/acme.go
index d6a09dd5b..e8388b083 100644
--- a/vendor/golang.org/x/crypto/acme/acme.go
+++ b/vendor/golang.org/x/crypto/acme/acme.go
@@ -257,7 +257,7 @@ func (c *Client) RevokeCert(ctx context.Context, key crypto.Signer, cert []byte,
func AcceptTOS(tosURL string) bool { return true }
// Register creates a new account registration by following the "new-reg" flow.
-// It returns registered account. The a argument is not modified.
+// It returns registered account. The account is not modified.
//
// The registration may require the caller to agree to the CA's Terms of Service (TOS).
// If so, and the account has not indicated the acceptance of the terms (see Account for details),
diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go b/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go
index f9e8a3a2f..0f8efdbaa 100644
--- a/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go
+++ b/vendor/golang.org/x/crypto/chacha20poly1305/internal/chacha20/chacha_generic.go
@@ -167,9 +167,8 @@ func core(out *[64]byte, in *[16]byte, k *[32]byte) {
}
// XORKeyStream crypts bytes from in to out using the given key and counters.
-// In and out may be the same slice but otherwise should not overlap. Counter
-// contains the raw ChaCha20 counter bytes (i.e. block counter followed by
-// nonce).
+// In and out must overlap entirely or not at all. Counter contains the raw
+// ChaCha20 counter bytes (i.e. block counter followed by nonce).
func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
var block [64]byte
var counterCopy [16]byte
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1.go
index 166e22d7b..88ec8b4fb 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/asn1.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1.go
@@ -5,40 +5,30 @@
package cryptobyte
import (
- "encoding/asn1"
+ encoding_asn1 "encoding/asn1"
"fmt"
"math/big"
"reflect"
"time"
+
+ "golang.org/x/crypto/cryptobyte/asn1"
)
// This file contains ASN.1-related methods for String and Builder.
-// Tag represents an ASN.1 tag number and class (together also referred to as
-// identifier octets). Methods in this package only support the low-tag-number
-// form, i.e. a single identifier octet with bits 7-8 encoding the class and
-// bits 1-6 encoding the tag number.
-type Tag uint8
-
-// Contructed returns t with the context-specific class bit set.
-func (t Tag) ContextSpecific() Tag { return t | 0x80 }
-
-// Contructed returns t with the constructed class bit set.
-func (t Tag) Constructed() Tag { return t | 0x20 }
-
// Builder
// AddASN1Int64 appends a DER-encoded ASN.1 INTEGER.
func (b *Builder) AddASN1Int64(v int64) {
- b.addASN1Signed(asn1.TagInteger, v)
+ b.addASN1Signed(asn1.INTEGER, v)
}
// AddASN1Enum appends a DER-encoded ASN.1 ENUMERATION.
func (b *Builder) AddASN1Enum(v int64) {
- b.addASN1Signed(asn1.TagEnum, v)
+ b.addASN1Signed(asn1.ENUM, v)
}
-func (b *Builder) addASN1Signed(tag Tag, v int64) {
+func (b *Builder) addASN1Signed(tag asn1.Tag, v int64) {
b.AddASN1(tag, func(c *Builder) {
length := 1
for i := v; i >= 0x80 || i < -0x80; i >>= 8 {
@@ -54,7 +44,7 @@ func (b *Builder) addASN1Signed(tag Tag, v int64) {
// AddASN1Uint64 appends a DER-encoded ASN.1 INTEGER.
func (b *Builder) AddASN1Uint64(v uint64) {
- b.AddASN1(asn1.TagInteger, func(c *Builder) {
+ b.AddASN1(asn1.INTEGER, func(c *Builder) {
length := 1
for i := v; i >= 0x80; i >>= 8 {
length++
@@ -73,7 +63,7 @@ func (b *Builder) AddASN1BigInt(n *big.Int) {
return
}
- b.AddASN1(asn1.TagInteger, func(c *Builder) {
+ b.AddASN1(asn1.INTEGER, func(c *Builder) {
if n.Sign() < 0 {
// A negative number has to be converted to two's-complement form. So we
// invert and subtract 1. If the most-significant-bit isn't set then
@@ -103,7 +93,7 @@ func (b *Builder) AddASN1BigInt(n *big.Int) {
// AddASN1OctetString appends a DER-encoded ASN.1 OCTET STRING.
func (b *Builder) AddASN1OctetString(bytes []byte) {
- b.AddASN1(asn1.TagOctetString, func(c *Builder) {
+ b.AddASN1(asn1.OCTET_STRING, func(c *Builder) {
c.AddBytes(bytes)
})
}
@@ -116,27 +106,97 @@ func (b *Builder) AddASN1GeneralizedTime(t time.Time) {
b.err = fmt.Errorf("cryptobyte: cannot represent %v as a GeneralizedTime", t)
return
}
- b.AddASN1(asn1.TagGeneralizedTime, func(c *Builder) {
+ b.AddASN1(asn1.GeneralizedTime, func(c *Builder) {
c.AddBytes([]byte(t.Format(generalizedTimeFormatStr)))
})
}
-// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING.
-func (b *Builder) AddASN1BitString(s asn1.BitString) {
- // TODO(martinkr): Implement.
- b.MarshalASN1(s)
+// AddASN1BitString appends a DER-encoded ASN.1 BIT STRING. This does not
+// support BIT STRINGs that are not a whole number of bytes.
+func (b *Builder) AddASN1BitString(data []byte) {
+ b.AddASN1(asn1.BIT_STRING, func(b *Builder) {
+ b.AddUint8(0)
+ b.AddBytes(data)
+ })
}
-// MarshalASN1 calls asn1.Marshal on its input and appends the result if
+func (b *Builder) addBase128Int(n int64) {
+ var length int
+ if n == 0 {
+ length = 1
+ } else {
+ for i := n; i > 0; i >>= 7 {
+ length++
+ }
+ }
+
+ for i := length - 1; i >= 0; i-- {
+ o := byte(n >> uint(i*7))
+ o &= 0x7f
+ if i != 0 {
+ o |= 0x80
+ }
+
+ b.add(o)
+ }
+}
+
+func isValidOID(oid encoding_asn1.ObjectIdentifier) bool {
+ if len(oid) < 2 {
+ return false
+ }
+
+ if oid[0] > 2 || (oid[0] <= 1 && oid[1] >= 40) {
+ return false
+ }
+
+ for _, v := range oid {
+ if v < 0 {
+ return false
+ }
+ }
+
+ return true
+}
+
+func (b *Builder) AddASN1ObjectIdentifier(oid encoding_asn1.ObjectIdentifier) {
+ b.AddASN1(asn1.OBJECT_IDENTIFIER, func(b *Builder) {
+ if !isValidOID(oid) {
+ b.err = fmt.Errorf("cryptobyte: invalid OID: %v", oid)
+ return
+ }
+
+ b.addBase128Int(int64(oid[0])*40 + int64(oid[1]))
+ for _, v := range oid[2:] {
+ b.addBase128Int(int64(v))
+ }
+ })
+}
+
+func (b *Builder) AddASN1Boolean(v bool) {
+ b.AddASN1(asn1.BOOLEAN, func(b *Builder) {
+ if v {
+ b.AddUint8(0xff)
+ } else {
+ b.AddUint8(0)
+ }
+ })
+}
+
+func (b *Builder) AddASN1NULL() {
+ b.add(uint8(asn1.NULL), 0)
+}
+
+// MarshalASN1 calls encoding_asn1.Marshal on its input and appends the result if
// successful or records an error if one occurred.
func (b *Builder) MarshalASN1(v interface{}) {
// NOTE(martinkr): This is somewhat of a hack to allow propagation of
- // asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a
+ // encoding_asn1.Marshal errors into Builder.err. N.B. if you call MarshalASN1 with a
// value embedded into a struct, its tag information is lost.
if b.err != nil {
return
}
- bytes, err := asn1.Marshal(v)
+ bytes, err := encoding_asn1.Marshal(v)
if err != nil {
b.err = err
return
@@ -148,7 +208,7 @@ func (b *Builder) MarshalASN1(v interface{}) {
// Tags greater than 30 are not supported and result in an error (i.e.
// low-tag-number form only). The child builder passed to the
// BuilderContinuation can be used to build the content of the ASN.1 object.
-func (b *Builder) AddASN1(tag Tag, f BuilderContinuation) {
+func (b *Builder) AddASN1(tag asn1.Tag, f BuilderContinuation) {
if b.err != nil {
return
}
@@ -164,6 +224,24 @@ func (b *Builder) AddASN1(tag Tag, f BuilderContinuation) {
// String
+func (s *String) ReadASN1Boolean(out *bool) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || len(bytes) != 1 {
+ return false
+ }
+
+ switch bytes[0] {
+ case 0:
+ *out = false
+ case 0xff:
+ *out = true
+ default:
+ return false
+ }
+
+ return true
+}
+
var bigIntType = reflect.TypeOf((*big.Int)(nil)).Elem()
// ReadASN1Integer decodes an ASN.1 INTEGER into out and advances. If out does
@@ -215,7 +293,7 @@ var bigOne = big.NewInt(1)
func (s *String) readASN1BigInt(out *big.Int) bool {
var bytes String
- if !s.ReadASN1(&bytes, asn1.TagInteger) || !checkASN1Integer(bytes) {
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) {
return false
}
if bytes[0]&0x80 == 0x80 {
@@ -235,7 +313,7 @@ func (s *String) readASN1BigInt(out *big.Int) bool {
func (s *String) readASN1Int64(out *int64) bool {
var bytes String
- if !s.ReadASN1(&bytes, asn1.TagInteger) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) {
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Signed(out, bytes) {
return false
}
return true
@@ -258,7 +336,7 @@ func asn1Signed(out *int64, n []byte) bool {
func (s *String) readASN1Uint64(out *uint64) bool {
var bytes String
- if !s.ReadASN1(&bytes, asn1.TagInteger) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) {
+ if !s.ReadASN1(&bytes, asn1.INTEGER) || !checkASN1Integer(bytes) || !asn1Unsigned(out, bytes) {
return false
}
return true
@@ -286,7 +364,7 @@ func asn1Unsigned(out *uint64, n []byte) bool {
func (s *String) ReadASN1Enum(out *int) bool {
var bytes String
var i int64
- if !s.ReadASN1(&bytes, asn1.TagEnum) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) {
+ if !s.ReadASN1(&bytes, asn1.ENUM) || !checkASN1Integer(bytes) || !asn1Signed(&i, bytes) {
return false
}
if int64(int(i)) != i {
@@ -315,9 +393,9 @@ func (s *String) readBase128Int(out *int) bool {
// ReadASN1ObjectIdentifier decodes an ASN.1 OBJECT IDENTIFIER into out and
// advances. It returns true on success and false on error.
-func (s *String) ReadASN1ObjectIdentifier(out *asn1.ObjectIdentifier) bool {
+func (s *String) ReadASN1ObjectIdentifier(out *encoding_asn1.ObjectIdentifier) bool {
var bytes String
- if !s.ReadASN1(&bytes, asn1.TagOID) || len(bytes) == 0 {
+ if !s.ReadASN1(&bytes, asn1.OBJECT_IDENTIFIER) || len(bytes) == 0 {
return false
}
@@ -356,7 +434,7 @@ func (s *String) ReadASN1ObjectIdentifier(out *asn1.ObjectIdentifier) bool {
// advances. It returns true on success and false on error.
func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool {
var bytes String
- if !s.ReadASN1(&bytes, asn1.TagGeneralizedTime) {
+ if !s.ReadASN1(&bytes, asn1.GeneralizedTime) {
return false
}
t := string(bytes)
@@ -373,9 +451,9 @@ func (s *String) ReadASN1GeneralizedTime(out *time.Time) bool {
// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It
// returns true on success and false on error.
-func (s *String) ReadASN1BitString(out *asn1.BitString) bool {
+func (s *String) ReadASN1BitString(out *encoding_asn1.BitString) bool {
var bytes String
- if !s.ReadASN1(&bytes, asn1.TagBitString) || len(bytes) == 0 {
+ if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 {
return false
}
@@ -392,10 +470,27 @@ func (s *String) ReadASN1BitString(out *asn1.BitString) bool {
return true
}
+// ReadASN1BitString decodes an ASN.1 BIT STRING into out and advances. It is
+// an error if the BIT STRING is not a whole number of bytes. This function
+// returns true on success and false on error.
+func (s *String) ReadASN1BitStringAsBytes(out *[]byte) bool {
+ var bytes String
+ if !s.ReadASN1(&bytes, asn1.BIT_STRING) || len(bytes) == 0 {
+ return false
+ }
+
+ paddingBits := uint8(bytes[0])
+ if paddingBits != 0 {
+ return false
+ }
+ *out = bytes[1:]
+ return true
+}
+
// ReadASN1Bytes reads the contents of a DER-encoded ASN.1 element (not including
// tag and length bytes) into out, and advances. The element must match the
// given tag. It returns true on success and false on error.
-func (s *String) ReadASN1Bytes(out *[]byte, tag Tag) bool {
+func (s *String) ReadASN1Bytes(out *[]byte, tag asn1.Tag) bool {
return s.ReadASN1((*String)(out), tag)
}
@@ -404,8 +499,8 @@ func (s *String) ReadASN1Bytes(out *[]byte, tag Tag) bool {
// given tag. It returns true on success and false on error.
//
// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadASN1(out *String, tag Tag) bool {
- var t Tag
+func (s *String) ReadASN1(out *String, tag asn1.Tag) bool {
+ var t asn1.Tag
if !s.ReadAnyASN1(out, &t) || t != tag {
return false
}
@@ -417,8 +512,8 @@ func (s *String) ReadASN1(out *String, tag Tag) bool {
// given tag. It returns true on success and false on error.
//
// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadASN1Element(out *String, tag Tag) bool {
- var t Tag
+func (s *String) ReadASN1Element(out *String, tag asn1.Tag) bool {
+ var t asn1.Tag
if !s.ReadAnyASN1Element(out, &t) || t != tag {
return false
}
@@ -430,7 +525,7 @@ func (s *String) ReadASN1Element(out *String, tag Tag) bool {
// returns true on success and false on error.
//
// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadAnyASN1(out *String, outTag *Tag) bool {
+func (s *String) ReadAnyASN1(out *String, outTag *asn1.Tag) bool {
return s.readASN1(out, outTag, true /* skip header */)
}
@@ -439,24 +534,30 @@ func (s *String) ReadAnyASN1(out *String, outTag *Tag) bool {
// advances. It returns true on success and false on error.
//
// Tags greater than 30 are not supported (i.e. low-tag-number format only).
-func (s *String) ReadAnyASN1Element(out *String, outTag *Tag) bool {
+func (s *String) ReadAnyASN1Element(out *String, outTag *asn1.Tag) bool {
return s.readASN1(out, outTag, false /* include header */)
}
// PeekASN1Tag returns true if the next ASN.1 value on the string starts with
// the given tag.
-func (s String) PeekASN1Tag(tag Tag) bool {
+func (s String) PeekASN1Tag(tag asn1.Tag) bool {
if len(s) == 0 {
return false
}
- return Tag(s[0]) == tag
+ return asn1.Tag(s[0]) == tag
}
-// ReadOptionalASN1 attempts to read the contents of a DER-encoded ASN.Element
-// (not including tag and length bytes) tagged with the given tag into out. It
-// stores whether an element with the tag was found in outPresent, unless
-// outPresent is nil. It returns true on success and false on error.
-func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag Tag) bool {
+// SkipASN1 reads and discards an ASN.1 element with the given tag.
+func (s *String) SkipASN1(tag asn1.Tag) bool {
+ var unused String
+ return s.ReadASN1(&unused, tag)
+}
+
+// ReadOptionalASN1 attempts to read the contents of a DER-encoded ASN.1
+// element (not including tag and length bytes) tagged with the given tag into
+// out. It stores whether an element with the tag was found in outPresent,
+// unless outPresent is nil. It returns true on success and false on error.
+func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag asn1.Tag) bool {
present := s.PeekASN1Tag(tag)
if outPresent != nil {
*outPresent = present
@@ -467,12 +568,22 @@ func (s *String) ReadOptionalASN1(out *String, outPresent *bool, tag Tag) bool {
return true
}
+// SkipOptionalASN1 advances s over an ASN.1 element with the given tag, or
+// else leaves s unchanged.
+func (s *String) SkipOptionalASN1(tag asn1.Tag) bool {
+ if !s.PeekASN1Tag(tag) {
+ return true
+ }
+ var unused String
+ return s.ReadASN1(&unused, tag)
+}
+
// ReadOptionalASN1Integer attempts to read an optional ASN.1 INTEGER
// explicitly tagged with tag into out and advances. If no element with a
// matching tag is present, it writes defaultValue into out instead. If out
// does not point to an integer or to a big.Int, it panics. It returns true on
// success and false on error.
-func (s *String) ReadOptionalASN1Integer(out interface{}, tag Tag, defaultValue interface{}) bool {
+func (s *String) ReadOptionalASN1Integer(out interface{}, tag asn1.Tag, defaultValue interface{}) bool {
if reflect.TypeOf(out).Kind() != reflect.Ptr {
panic("out is not a pointer")
}
@@ -510,7 +621,7 @@ func (s *String) ReadOptionalASN1Integer(out interface{}, tag Tag, defaultValue
// explicitly tagged with tag into out and advances. If no element with a
// matching tag is present, it writes defaultValue into out instead. It returns
// true on success and false on error.
-func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag Tag) bool {
+func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag asn1.Tag) bool {
var present bool
var child String
if !s.ReadOptionalASN1(&child, &present, tag) {
@@ -521,7 +632,7 @@ func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag
}
if present {
var oct String
- if !child.ReadASN1(&oct, asn1.TagOctetString) || !child.Empty() {
+ if !child.ReadASN1(&oct, asn1.OCTET_STRING) || !child.Empty() {
return false
}
*out = oct
@@ -531,7 +642,24 @@ func (s *String) ReadOptionalASN1OctetString(out *[]byte, outPresent *bool, tag
return true
}
-func (s *String) readASN1(out *String, outTag *Tag, skipHeader bool) bool {
+// ReadOptionalASN1Boolean sets *out to the value of the next ASN.1 BOOLEAN or,
+// if the next bytes are not an ASN.1 BOOLEAN, to the value of defaultValue.
+func (s *String) ReadOptionalASN1Boolean(out *bool, defaultValue bool) bool {
+ var present bool
+ var child String
+ if !s.ReadOptionalASN1(&child, &present, asn1.BOOLEAN) {
+ return false
+ }
+
+ if !present {
+ *out = defaultValue
+ return true
+ }
+
+ return s.ReadASN1Boolean(out)
+}
+
+func (s *String) readASN1(out *String, outTag *asn1.Tag, skipHeader bool) bool {
if len(*s) < 2 {
return false
}
@@ -547,7 +675,7 @@ func (s *String) readASN1(out *String, outTag *Tag, skipHeader bool) bool {
}
if outTag != nil {
- *outTag = Tag(tag)
+ *outTag = asn1.Tag(tag)
}
// ITU-T X.690 section 8.1.3
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
new file mode 100644
index 000000000..cda8e3edf
--- /dev/null
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go
@@ -0,0 +1,46 @@
+// Copyright 2017 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 asn1 contains supporting types for parsing and building ASN.1
+// messages with the cryptobyte package.
+package asn1 // import "golang.org/x/crypto/cryptobyte/asn1"
+
+// Tag represents an ASN.1 identifier octet, consisting of a tag number
+// (indicating a type) and class (such as context-specific or constructed).
+//
+// Methods in the cryptobyte package only support the low-tag-number form, i.e.
+// a single identifier octet with bits 7-8 encoding the class and bits 1-6
+// encoding the tag number.
+type Tag uint8
+
+const (
+ classConstructed = 0x20
+ classContextSpecific = 0x80
+)
+
+// Constructed returns t with the constructed class bit set.
+func (t Tag) Constructed() Tag { return t | classConstructed }
+
+// ContextSpecific returns t with the context-specific class bit set.
+func (t Tag) ContextSpecific() Tag { return t | classContextSpecific }
+
+// The following is a list of standard tag and class combinations.
+const (
+ BOOLEAN = Tag(1)
+ INTEGER = Tag(2)
+ BIT_STRING = Tag(3)
+ OCTET_STRING = Tag(4)
+ NULL = Tag(5)
+ OBJECT_IDENTIFIER = Tag(6)
+ ENUM = Tag(10)
+ UTF8String = Tag(12)
+ SEQUENCE = Tag(16 | classConstructed)
+ SET = Tag(17 | classConstructed)
+ PrintableString = Tag(19)
+ T61String = Tag(20)
+ IA5String = Tag(22)
+ UTCTime = Tag(23)
+ GeneralizedTime = Tag(24)
+ GeneralString = Tag(27)
+)
diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go b/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go
index c8c187032..ee6674a2f 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/asn1_test.go
@@ -6,17 +6,19 @@ package cryptobyte
import (
"bytes"
- "encoding/asn1"
+ encoding_asn1 "encoding/asn1"
"math/big"
"reflect"
"testing"
"time"
+
+ "golang.org/x/crypto/cryptobyte/asn1"
)
type readASN1Test struct {
name string
in []byte
- tag Tag
+ tag asn1.Tag
ok bool
out interface{}
}
@@ -194,7 +196,7 @@ func TestReadASN1IntegerInvalid(t *testing.T) {
}
}
-func TestReadASN1ObjectIdentifier(t *testing.T) {
+func TestASN1ObjectIdentifier(t *testing.T) {
testData := []struct {
in []byte
ok bool
@@ -212,10 +214,23 @@ func TestReadASN1ObjectIdentifier(t *testing.T) {
for i, test := range testData {
in := String(test.in)
- var out asn1.ObjectIdentifier
+ var out encoding_asn1.ObjectIdentifier
ok := in.ReadASN1ObjectIdentifier(&out)
if ok != test.ok || ok && !out.Equal(test.out) {
t.Errorf("#%d: in.ReadASN1ObjectIdentifier() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out)
+ continue
+ }
+
+ var b Builder
+ b.AddASN1ObjectIdentifier(out)
+ result, err := b.Bytes()
+ if builderOk := err == nil; test.ok != builderOk {
+ t.Errorf("#%d: error from Builder.Bytes: %s", i, err)
+ continue
+ }
+ if test.ok && !bytes.Equal(result, test.in) {
+ t.Errorf("#%d: reserialisation didn't match, got %x, want %x", i, result, test.in)
+ continue
}
}
}
@@ -250,7 +265,7 @@ func TestReadASN1GeneralizedTime(t *testing.T) {
{"201001020304-10Z", false, time.Time{}},
}
for i, test := range testData {
- in := String(append([]byte{asn1.TagGeneralizedTime, byte(len(test.in))}, test.in...))
+ in := String(append([]byte{byte(asn1.GeneralizedTime), byte(len(test.in))}, test.in...))
var out time.Time
ok := in.ReadASN1GeneralizedTime(&out)
if ok != test.ok || ok && !reflect.DeepEqual(out, test.out) {
@@ -263,20 +278,20 @@ func TestReadASN1BitString(t *testing.T) {
testData := []struct {
in []byte
ok bool
- out asn1.BitString
+ out encoding_asn1.BitString
}{
- {[]byte{}, false, asn1.BitString{}},
- {[]byte{0x00}, true, asn1.BitString{}},
- {[]byte{0x07, 0x00}, true, asn1.BitString{Bytes: []byte{0}, BitLength: 1}},
- {[]byte{0x07, 0x01}, false, asn1.BitString{}},
- {[]byte{0x07, 0x40}, false, asn1.BitString{}},
- {[]byte{0x08, 0x00}, false, asn1.BitString{}},
- {[]byte{0xff}, false, asn1.BitString{}},
- {[]byte{0xfe, 0x00}, false, asn1.BitString{}},
+ {[]byte{}, false, encoding_asn1.BitString{}},
+ {[]byte{0x00}, true, encoding_asn1.BitString{}},
+ {[]byte{0x07, 0x00}, true, encoding_asn1.BitString{Bytes: []byte{0}, BitLength: 1}},
+ {[]byte{0x07, 0x01}, false, encoding_asn1.BitString{}},
+ {[]byte{0x07, 0x40}, false, encoding_asn1.BitString{}},
+ {[]byte{0x08, 0x00}, false, encoding_asn1.BitString{}},
+ {[]byte{0xff}, false, encoding_asn1.BitString{}},
+ {[]byte{0xfe, 0x00}, false, encoding_asn1.BitString{}},
}
for i, test := range testData {
in := String(append([]byte{3, byte(len(test.in))}, test.in...))
- var out asn1.BitString
+ var out encoding_asn1.BitString
ok := in.ReadASN1BitString(&out)
if ok != test.ok || ok && (!bytes.Equal(out.Bytes, test.out.Bytes) || out.BitLength != test.out.BitLength) {
t.Errorf("#%d: in.ReadASN1BitString() = %v, want %v; out = %v, want %v", i, ok, test.ok, out, test.out)
diff --git a/vendor/golang.org/x/crypto/cryptobyte/builder.go b/vendor/golang.org/x/crypto/cryptobyte/builder.go
index 9883fb3c3..29b4c7641 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/builder.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/builder.go
@@ -10,15 +10,25 @@ import (
)
// A Builder builds byte strings from fixed-length and length-prefixed values.
+// Builders either allocate space as needed, or are ‘fixed’, which means that
+// they write into a given buffer and produce an error if it's exhausted.
+//
// The zero value is a usable Builder that allocates space as needed.
+//
+// Simple values are marshaled and appended to a Builder using methods on the
+// Builder. Length-prefixed values are marshaled by providing a
+// BuilderContinuation, which is a function that writes the inner contents of
+// the value to a given Builder. See the documentation for BuilderContinuation
+// for details.
type Builder struct {
- err error
- result []byte
- fixedSize bool
- child *Builder
- offset int
- pendingLenLen int
- pendingIsASN1 bool
+ err error
+ result []byte
+ fixedSize bool
+ child *Builder
+ offset int
+ pendingLenLen int
+ pendingIsASN1 bool
+ inContinuation *bool
}
// NewBuilder creates a Builder that appends its output to the given buffer.
@@ -86,9 +96,9 @@ func (b *Builder) AddBytes(v []byte) {
// BuilderContinuation is continuation-passing interface for building
// length-prefixed byte sequences. Builder methods for length-prefixed
-// sequences (AddUint8LengthPrefixed etc.) will invoke the BuilderContinuation
+// sequences (AddUint8LengthPrefixed etc) will invoke the BuilderContinuation
// supplied to them. The child builder passed to the continuation can be used
-// to build the content of the length-prefixed sequence. Example:
+// to build the content of the length-prefixed sequence. For example:
//
// parent := cryptobyte.NewBuilder()
// parent.AddUint8LengthPrefixed(func (child *Builder) {
@@ -102,8 +112,19 @@ func (b *Builder) AddBytes(v []byte) {
// length prefix. After the continuation returns, the child must be considered
// invalid, i.e. users must not store any copies or references of the child
// that outlive the continuation.
+//
+// If the continuation panics with a value of type BuildError then the inner
+// error will be returned as the error from Bytes. If the child panics
+// otherwise then Bytes will repanic with the same value.
type BuilderContinuation func(child *Builder)
+// BuildError wraps an error. If a BuilderContinuation panics with this value,
+// the panic will be recovered and the inner error will be returned from
+// Builder.Bytes.
+type BuildError struct {
+ Err error
+}
+
// AddUint8LengthPrefixed adds a 8-bit length-prefixed byte sequence.
func (b *Builder) AddUint8LengthPrefixed(f BuilderContinuation) {
b.addLengthPrefixed(1, false, f)
@@ -119,6 +140,34 @@ func (b *Builder) AddUint24LengthPrefixed(f BuilderContinuation) {
b.addLengthPrefixed(3, false, f)
}
+// AddUint32LengthPrefixed adds a big-endian, 32-bit length-prefixed byte sequence.
+func (b *Builder) AddUint32LengthPrefixed(f BuilderContinuation) {
+ b.addLengthPrefixed(4, false, f)
+}
+
+func (b *Builder) callContinuation(f BuilderContinuation, arg *Builder) {
+ if !*b.inContinuation {
+ *b.inContinuation = true
+
+ defer func() {
+ *b.inContinuation = false
+
+ r := recover()
+ if r == nil {
+ return
+ }
+
+ if buildError, ok := r.(BuildError); ok {
+ b.err = buildError.Err
+ } else {
+ panic(r)
+ }
+ }()
+ }
+
+ f(arg)
+}
+
func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuation) {
// Subsequent writes can be ignored if the builder has encountered an error.
if b.err != nil {
@@ -128,15 +177,20 @@ func (b *Builder) addLengthPrefixed(lenLen int, isASN1 bool, f BuilderContinuati
offset := len(b.result)
b.add(make([]byte, lenLen)...)
- b.child = &Builder{
- result: b.result,
- fixedSize: b.fixedSize,
- offset: offset,
- pendingLenLen: lenLen,
- pendingIsASN1: isASN1,
+ if b.inContinuation == nil {
+ b.inContinuation = new(bool)
}
- f(b.child)
+ b.child = &Builder{
+ result: b.result,
+ fixedSize: b.fixedSize,
+ offset: offset,
+ pendingLenLen: lenLen,
+ pendingIsASN1: isASN1,
+ inContinuation: b.inContinuation,
+ }
+
+ b.callContinuation(f, b.child)
b.flushChild()
if b.child != nil {
panic("cryptobyte: internal error")
diff --git a/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go b/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go
index 49c61dca4..f294dd552 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/cryptobyte_test.go
@@ -6,6 +6,7 @@ package cryptobyte
import (
"bytes"
+ "errors"
"fmt"
"testing"
)
@@ -18,6 +19,54 @@ func builderBytesEq(b *Builder, want ...byte) error {
return nil
}
+func TestContinuationError(t *testing.T) {
+ const errorStr = "TestContinuationError"
+ var b Builder
+ b.AddUint8LengthPrefixed(func(b *Builder) {
+ b.AddUint8(1)
+ panic(BuildError{Err: errors.New(errorStr)})
+ })
+
+ ret, err := b.Bytes()
+ if ret != nil {
+ t.Error("expected nil result")
+ }
+ if err == nil {
+ t.Fatal("unexpected nil error")
+ }
+ if s := err.Error(); s != errorStr {
+ t.Errorf("expected error %q, got %v", errorStr, s)
+ }
+}
+
+func TestContinuationNonError(t *testing.T) {
+ defer func() {
+ recover()
+ }()
+
+ var b Builder
+ b.AddUint8LengthPrefixed(func(b *Builder) {
+ b.AddUint8(1)
+ panic(1)
+ })
+
+ t.Error("Builder did not panic")
+}
+
+func TestGeneratedPanic(t *testing.T) {
+ defer func() {
+ recover()
+ }()
+
+ var b Builder
+ b.AddUint8LengthPrefixed(func(b *Builder) {
+ var p *byte
+ *p = 0
+ })
+
+ t.Error("Builder did not panic")
+}
+
func TestBytes(t *testing.T) {
var b Builder
v := []byte("foobarbaz")
diff --git a/vendor/golang.org/x/crypto/cryptobyte/example_test.go b/vendor/golang.org/x/crypto/cryptobyte/example_test.go
index 7d3c06e12..86c098adf 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/example_test.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/example_test.go
@@ -5,9 +5,11 @@
package cryptobyte_test
import (
- "encoding/asn1"
+ "errors"
"fmt"
+
"golang.org/x/crypto/cryptobyte"
+ "golang.org/x/crypto/cryptobyte/asn1"
)
func ExampleString_lengthPrefixed() {
@@ -37,7 +39,7 @@ func ExampleString_lengthPrefixed() {
fmt.Printf("%#v\n", result)
}
-func ExampleString_asn1() {
+func ExampleString_aSN1() {
// This is an example of parsing ASN.1 data that looks like:
// Foo ::= SEQUENCE {
// version [6] INTEGER DEFAULT 0
@@ -51,12 +53,12 @@ func ExampleString_asn1() {
data, inner, versionBytes cryptobyte.String
haveVersion bool
)
- if !input.ReadASN1(&inner, cryptobyte.Tag(asn1.TagSequence).Constructed()) ||
+ if !input.ReadASN1(&inner, asn1.SEQUENCE) ||
!input.Empty() ||
- !inner.ReadOptionalASN1(&versionBytes, &haveVersion, cryptobyte.Tag(6).Constructed().ContextSpecific()) ||
+ !inner.ReadOptionalASN1(&versionBytes, &haveVersion, asn1.Tag(6).Constructed().ContextSpecific()) ||
(haveVersion && !versionBytes.ReadASN1Integer(&version)) ||
(haveVersion && !versionBytes.Empty()) ||
- !inner.ReadASN1(&data, asn1.TagOctetString) ||
+ !inner.ReadASN1(&data, asn1.OCTET_STRING) ||
!inner.Empty() {
panic("bad format")
}
@@ -65,7 +67,7 @@ func ExampleString_asn1() {
fmt.Printf("haveVersion: %t, version: %d, data: %s\n", haveVersion, version, string(data))
}
-func ExampleBuilder_asn1() {
+func ExampleBuilder_aSN1() {
// This is an example of building ASN.1 data that looks like:
// Foo ::= SEQUENCE {
// version [6] INTEGER DEFAULT 0
@@ -77,9 +79,9 @@ func ExampleBuilder_asn1() {
const defaultVersion = 0
var b cryptobyte.Builder
- b.AddASN1(cryptobyte.Tag(asn1.TagSequence).Constructed(), func(b *cryptobyte.Builder) {
+ b.AddASN1(asn1.SEQUENCE, func(b *cryptobyte.Builder) {
if version != defaultVersion {
- b.AddASN1(cryptobyte.Tag(6).Constructed().ContextSpecific(), func(b *cryptobyte.Builder) {
+ b.AddASN1(asn1.Tag(6).Constructed().ContextSpecific(), func(b *cryptobyte.Builder) {
b.AddASN1Int64(version)
})
}
@@ -118,3 +120,35 @@ func ExampleBuilder_lengthPrefixed() {
// Output: 000c0568656c6c6f05776f726c64
fmt.Printf("%x\n", result)
}
+
+func ExampleBuilder_lengthPrefixOverflow() {
+ // Writing more data that can be expressed by the length prefix results
+ // in an error from Bytes().
+
+ tooLarge := make([]byte, 256)
+
+ var b cryptobyte.Builder
+ b.AddUint8LengthPrefixed(func(b *cryptobyte.Builder) {
+ b.AddBytes(tooLarge)
+ })
+
+ result, err := b.Bytes()
+ fmt.Printf("len=%d err=%s\n", len(result), err)
+
+ // Output: len=0 err=cryptobyte: pending child length 256 exceeds 1-byte length prefix
+}
+
+func ExampleBuilderContinuation_errorHandling() {
+ var b cryptobyte.Builder
+ // Continuations that panic with a BuildError will cause Bytes to
+ // return the inner error.
+ b.AddUint16LengthPrefixed(func(b *cryptobyte.Builder) {
+ b.AddUint32(0)
+ panic(cryptobyte.BuildError{Err: errors.New("example error")})
+ })
+
+ result, err := b.Bytes()
+ fmt.Printf("len=%d err=%s\n", len(result), err)
+
+ // Output: len=0 err=example error
+}
diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go
index 678033611..7636fb9c8 100644
--- a/vendor/golang.org/x/crypto/cryptobyte/string.go
+++ b/vendor/golang.org/x/crypto/cryptobyte/string.go
@@ -2,9 +2,19 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Package cryptobyte implements building and parsing of byte strings for
-// DER-encoded ASN.1 and TLS messages. See the examples for the Builder and
-// String types to get started.
+// Package cryptobyte contains types that help with parsing and constructing
+// length-prefixed, binary messages, including ASN.1 DER. (The asn1 subpackage
+// contains useful ASN.1 constants.)
+//
+// The String type is for parsing. It wraps a []byte slice and provides helper
+// functions for consuming structures, value by value.
+//
+// The Builder type is for constructing messages. It providers helper functions
+// for appending values and also for appending length-prefixed submessages –
+// without having to worry about calculating the length prefix ahead of time.
+//
+// See the documentation and examples for the Builder and String types to get
+// started.
package cryptobyte // import "golang.org/x/crypto/cryptobyte"
// String represents a string of bytes. It provides methods for parsing
diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/golang.org/x/crypto/curve25519/curve25519.go
index 2d14c2a78..cb8fbc57b 100644
--- a/vendor/golang.org/x/crypto/curve25519/curve25519.go
+++ b/vendor/golang.org/x/crypto/curve25519/curve25519.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// We have a implementation in amd64 assembly so this code is only run on
+// We have an implementation in amd64 assembly so this code is only run on
// non-amd64 platforms. The amd64 assembly does not support gccgo.
// +build !amd64 gccgo appengine
diff --git a/vendor/golang.org/x/crypto/nacl/box/box.go b/vendor/golang.org/x/crypto/nacl/box/box.go
index 7ed1864f7..31b697be4 100644
--- a/vendor/golang.org/x/crypto/nacl/box/box.go
+++ b/vendor/golang.org/x/crypto/nacl/box/box.go
@@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.
/*
-Package box authenticates and encrypts messages using public-key cryptography.
+Package box authenticates and encrypts small messages using public-key cryptography.
Box uses Curve25519, XSalsa20 and Poly1305 to encrypt and authenticate
messages. The length of messages is not hidden.
@@ -13,6 +13,23 @@ example, by using nonce 1 for the first message, nonce 2 for the second
message, etc. Nonces are long enough that randomly generated nonces have
negligible risk of collision.
+Messages should be small because:
+
+1. The whole message needs to be held in memory to be processed.
+
+2. Using large messages pressures implementations on small machines to decrypt
+and process plaintext before authenticating it. This is very dangerous, and
+this API does not allow it, but a protocol that uses excessive message sizes
+might present some implementations with no other choice.
+
+3. Fixed overheads will be sufficiently amortised by messages as small as 8KB.
+
+4. Performance may be improved by working with messages that fit into data caches.
+
+Thus large amounts of data should be chunked so that each message is small.
+(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable
+chunk size.
+
This package is interoperable with NaCl: https://nacl.cr.yp.to/box.html.
*/
package box // import "golang.org/x/crypto/nacl/box"
@@ -56,7 +73,7 @@ func Precompute(sharedKey, peersPublicKey, privateKey *[32]byte) {
}
// Seal appends an encrypted and authenticated copy of message to out, which
-// will be Overhead bytes longer than the original and must not overlap. The
+// will be Overhead bytes longer than the original and must not overlap it. The
// nonce must be unique for each distinct message for a given pair of keys.
func Seal(out, message []byte, nonce *[24]byte, peersPublicKey, privateKey *[32]byte) []byte {
var sharedKey [32]byte
diff --git a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
index 1e1dff506..53ee83cfb 100644
--- a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
+++ b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go
@@ -13,6 +13,23 @@ example, by using nonce 1 for the first message, nonce 2 for the second
message, etc. Nonces are long enough that randomly generated nonces have
negligible risk of collision.
+Messages should be small because:
+
+1. The whole message needs to be held in memory to be processed.
+
+2. Using large messages pressures implementations on small machines to decrypt
+and process plaintext before authenticating it. This is very dangerous, and
+this API does not allow it, but a protocol that uses excessive message sizes
+might present some implementations with no other choice.
+
+3. Fixed overheads will be sufficiently amortised by messages as small as 8KB.
+
+4. Performance may be improved by working with messages that fit into data caches.
+
+Thus large amounts of data should be chunked so that each message is small.
+(Each message still needs a unique nonce.) If in doubt, 16KB is a reasonable
+chunk size.
+
This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html.
*/
package secretbox // import "golang.org/x/crypto/nacl/secretbox"
diff --git a/vendor/golang.org/x/crypto/openpgp/keys_test.go b/vendor/golang.org/x/crypto/openpgp/keys_test.go
index f768e68a6..76ba13ed1 100644
--- a/vendor/golang.org/x/crypto/openpgp/keys_test.go
+++ b/vendor/golang.org/x/crypto/openpgp/keys_test.go
@@ -12,7 +12,10 @@ import (
)
func TestKeyExpiry(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(expiringKeyHex))
+ kring, err := ReadKeyRing(readerFromHex(expiringKeyHex))
+ if err != nil {
+ t.Fatal(err)
+ }
entity := kring[0]
const timeFormat = "2006-01-02"
@@ -104,7 +107,10 @@ func TestGoodCrossSignature(t *testing.T) {
// TestExternallyRevokableKey attempts to load and parse a key with a third party revocation permission.
func TestExternallyRevocableKey(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(subkeyUsageHex))
+ kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex))
+ if err != nil {
+ t.Fatal(err)
+ }
// The 0xA42704B92866382A key can be revoked by 0xBE3893CB843D0FE70C
// according to this signature that appears within the key:
@@ -125,7 +131,10 @@ func TestExternallyRevocableKey(t *testing.T) {
}
func TestKeyRevocation(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(revokedKeyHex))
+ kring, err := ReadKeyRing(readerFromHex(revokedKeyHex))
+ if err != nil {
+ t.Fatal(err)
+ }
// revokedKeyHex contains these keys:
// pub 1024R/9A34F7C0 2014-03-25 [revoked: 2014-03-25]
@@ -145,7 +154,10 @@ func TestKeyRevocation(t *testing.T) {
}
func TestSubkeyRevocation(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(revokedSubkeyHex))
+ kring, err := ReadKeyRing(readerFromHex(revokedSubkeyHex))
+ if err != nil {
+ t.Fatal(err)
+ }
// revokedSubkeyHex contains these keys:
// pub 1024R/4EF7E4BECCDE97F0 2014-03-25
@@ -178,7 +190,10 @@ func TestSubkeyRevocation(t *testing.T) {
}
func TestKeyUsage(t *testing.T) {
- kring, _ := ReadKeyRing(readerFromHex(subkeyUsageHex))
+ kring, err := ReadKeyRing(readerFromHex(subkeyUsageHex))
+ if err != nil {
+ t.Fatal(err)
+ }
// subkeyUsageHex contains these keys:
// pub 1024R/2866382A created: 2014-04-01 expires: never usage: SC
diff --git a/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go b/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go
index c16ef78ab..ac651d917 100644
--- a/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go
+++ b/vendor/golang.org/x/crypto/openpgp/packet/private_key_test.go
@@ -228,7 +228,7 @@ func TestECDSASignerPrivateKey(t *testing.T) {
priv := NewSignerPrivateKey(time.Now(), &ecdsaSigner{ecdsaPriv})
if priv.PubKeyAlgo != PubKeyAlgoECDSA {
- t.Fatal("NewSignerPrivateKey should have made a ECSDA private key")
+ t.Fatal("NewSignerPrivateKey should have made an ECSDA private key")
}
sig := &Signature{
diff --git a/vendor/golang.org/x/crypto/pkcs12/crypto.go b/vendor/golang.org/x/crypto/pkcs12/crypto.go
index 4bd4470ec..484ca51b7 100644
--- a/vendor/golang.org/x/crypto/pkcs12/crypto.go
+++ b/vendor/golang.org/x/crypto/pkcs12/crypto.go
@@ -124,7 +124,7 @@ func pbDecrypt(info decryptable, password []byte) (decrypted []byte, err error)
return
}
-// decryptable abstracts a object that contains ciphertext.
+// decryptable abstracts an object that contains ciphertext.
type decryptable interface {
Algorithm() pkix.AlgorithmIdentifier
Data() []byte
diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
index c34d362ee..f9269c384 100644
--- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
+++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.go
@@ -13,7 +13,7 @@ package salsa
func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte)
// XORKeyStream crypts bytes from in to out using the given key and counters.
-// In and out may be the same slice but otherwise should not overlap. Counter
+// In and out must overlap entirely or not at all. Counter
// contains the raw salsa20 counter bytes (both nonce and block counter).
func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
if len(in) == 0 {
diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go
index 95f8ca5bb..22126d17c 100644
--- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go
+++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_ref.go
@@ -203,7 +203,7 @@ func core(out *[64]byte, in *[16]byte, k *[32]byte, c *[16]byte) {
}
// XORKeyStream crypts bytes from in to out using the given key and counters.
-// In and out may be the same slice but otherwise should not overlap. Counter
+// In and out must overlap entirely or not at all. Counter
// contains the raw salsa20 counter bytes (both nonce and block counter).
func XORKeyStream(out, in []byte, counter *[16]byte, key *[32]byte) {
var block [64]byte
diff --git a/vendor/golang.org/x/crypto/salsa20/salsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa20.go
index a8ddd76e8..0ee62485a 100644
--- a/vendor/golang.org/x/crypto/salsa20/salsa20.go
+++ b/vendor/golang.org/x/crypto/salsa20/salsa20.go
@@ -27,8 +27,8 @@ import (
"golang.org/x/crypto/salsa20/salsa"
)
-// XORKeyStream crypts bytes from in to out using the given key and nonce. In
-// and out may be the same slice but otherwise should not overlap. Nonce must
+// XORKeyStream crypts bytes from in to out using the given key and nonce.
+// In and out must overlap entirely or not at all. Nonce must
// be either 8 or 24 bytes long.
func XORKeyStream(out, in []byte, nonce []byte, key *[32]byte) {
if len(out) < len(in) {
diff --git a/vendor/golang.org/x/crypto/ssh/agent/client_test.go b/vendor/golang.org/x/crypto/ssh/agent/client_test.go
index a5b20f551..266fd6d40 100644
--- a/vendor/golang.org/x/crypto/ssh/agent/client_test.go
+++ b/vendor/golang.org/x/crypto/ssh/agent/client_test.go
@@ -19,7 +19,7 @@ import (
"golang.org/x/crypto/ssh"
)
-// startOpenSSHAgent executes ssh-agent, and returns a Agent interface to it.
+// startOpenSSHAgent executes ssh-agent, and returns an Agent interface to it.
func startOpenSSHAgent(t *testing.T) (client Agent, socket string, cleanup func()) {
if testing.Short() {
// ssh-agent is not always available, and the key
diff --git a/vendor/golang.org/x/crypto/ssh/client_auth.go b/vendor/golang.org/x/crypto/ssh/client_auth.go
index b882da086..3acd8d498 100644
--- a/vendor/golang.org/x/crypto/ssh/client_auth.go
+++ b/vendor/golang.org/x/crypto/ssh/client_auth.go
@@ -349,7 +349,7 @@ func handleAuthResponse(c packetConn) (bool, []string, error) {
// both CLI and GUI environments.
type KeyboardInteractiveChallenge func(user, instruction string, questions []string, echos []bool) (answers []string, err error)
-// KeyboardInteractive returns a AuthMethod using a prompt/response
+// KeyboardInteractive returns an AuthMethod using a prompt/response
// sequence controlled by the server.
func KeyboardInteractive(challenge KeyboardInteractiveChallenge) AuthMethod {
return challenge
diff --git a/vendor/golang.org/x/crypto/ssh/keys.go b/vendor/golang.org/x/crypto/ssh/keys.go
index 7a8756a93..b682c1741 100644
--- a/vendor/golang.org/x/crypto/ssh/keys.go
+++ b/vendor/golang.org/x/crypto/ssh/keys.go
@@ -367,6 +367,17 @@ func (r *dsaPublicKey) Type() string {
return "ssh-dss"
}
+func checkDSAParams(param *dsa.Parameters) error {
+ // SSH specifies FIPS 186-2, which only provided a single size
+ // (1024 bits) DSA key. FIPS 186-3 allows for larger key
+ // sizes, which would confuse SSH.
+ if l := param.P.BitLen(); l != 1024 {
+ return fmt.Errorf("ssh: unsupported DSA key size %d", l)
+ }
+
+ return nil
+}
+
// parseDSA parses an DSA key according to RFC 4253, section 6.6.
func parseDSA(in []byte) (out PublicKey, rest []byte, err error) {
var w struct {
@@ -377,13 +388,18 @@ func parseDSA(in []byte) (out PublicKey, rest []byte, err error) {
return nil, nil, err
}
+ param := dsa.Parameters{
+ P: w.P,
+ Q: w.Q,
+ G: w.G,
+ }
+ if err := checkDSAParams(¶m); err != nil {
+ return nil, nil, err
+ }
+
key := &dsaPublicKey{
- Parameters: dsa.Parameters{
- P: w.P,
- Q: w.Q,
- G: w.G,
- },
- Y: w.Y,
+ Parameters: param,
+ Y: w.Y,
}
return key, w.Rest, nil
}
@@ -630,19 +646,28 @@ func (k *ecdsaPublicKey) CryptoPublicKey() crypto.PublicKey {
}
// NewSignerFromKey takes an *rsa.PrivateKey, *dsa.PrivateKey,
-// *ecdsa.PrivateKey or any other crypto.Signer and returns a corresponding
-// Signer instance. ECDSA keys must use P-256, P-384 or P-521.
+// *ecdsa.PrivateKey or any other crypto.Signer and returns a
+// corresponding Signer instance. ECDSA keys must use P-256, P-384 or
+// P-521. DSA keys must use parameter size L1024N160.
func NewSignerFromKey(key interface{}) (Signer, error) {
switch key := key.(type) {
case crypto.Signer:
return NewSignerFromSigner(key)
case *dsa.PrivateKey:
- return &dsaPrivateKey{key}, nil
+ return newDSAPrivateKey(key)
default:
return nil, fmt.Errorf("ssh: unsupported key type %T", key)
}
}
+func newDSAPrivateKey(key *dsa.PrivateKey) (Signer, error) {
+ if err := checkDSAParams(&key.PublicKey.Parameters); err != nil {
+ return nil, err
+ }
+
+ return &dsaPrivateKey{key}, nil
+}
+
type wrappedSigner struct {
signer crypto.Signer
pubKey PublicKey
diff --git a/vendor/golang.org/x/crypto/xts/xts.go b/vendor/golang.org/x/crypto/xts/xts.go
index a7643fdcd..92cbce99b 100644
--- a/vendor/golang.org/x/crypto/xts/xts.go
+++ b/vendor/golang.org/x/crypto/xts/xts.go
@@ -55,7 +55,7 @@ func NewCipher(cipherFunc func([]byte) (cipher.Block, error), key []byte) (c *Ci
}
// Encrypt encrypts a sector of plaintext and puts the result into ciphertext.
-// Plaintext and ciphertext may be the same slice but should not overlap.
+// Plaintext and ciphertext must overlap entirely or not at all.
// Sectors must be a multiple of 16 bytes and less than 2²⁴ bytes.
func (c *Cipher) Encrypt(ciphertext, plaintext []byte, sectorNum uint64) {
if len(ciphertext) < len(plaintext) {
@@ -86,7 +86,7 @@ func (c *Cipher) Encrypt(ciphertext, plaintext []byte, sectorNum uint64) {
}
// Decrypt decrypts a sector of ciphertext and puts the result into plaintext.
-// Plaintext and ciphertext may be the same slice but should not overlap.
+// Plaintext and ciphertext must overlap entirely or not at all.
// Sectors must be a multiple of 16 bytes and less than 2²⁴ bytes.
func (c *Cipher) Decrypt(plaintext, ciphertext []byte, sectorNum uint64) {
if len(plaintext) < len(ciphertext) {
diff --git a/vendor/golang.org/x/net/bpf/constants.go b/vendor/golang.org/x/net/bpf/constants.go
index ccf6adafb..b89ca3523 100644
--- a/vendor/golang.org/x/net/bpf/constants.go
+++ b/vendor/golang.org/x/net/bpf/constants.go
@@ -76,54 +76,54 @@ const (
// ExtLen returns the length of the packet.
ExtLen Extension = 1
// ExtProto returns the packet's L3 protocol type.
- ExtProto = 0
+ ExtProto Extension = 0
// ExtType returns the packet's type (skb->pkt_type in the kernel)
//
// TODO: better documentation. How nice an API do we want to
// provide for these esoteric extensions?
- ExtType = 4
+ ExtType Extension = 4
// ExtPayloadOffset returns the offset of the packet payload, or
// the first protocol header that the kernel does not know how to
// parse.
- ExtPayloadOffset = 52
+ ExtPayloadOffset Extension = 52
// ExtInterfaceIndex returns the index of the interface on which
// the packet was received.
- ExtInterfaceIndex = 8
+ ExtInterfaceIndex Extension = 8
// ExtNetlinkAttr returns the netlink attribute of type X at
// offset A.
- ExtNetlinkAttr = 12
+ ExtNetlinkAttr Extension = 12
// ExtNetlinkAttrNested returns the nested netlink attribute of
// type X at offset A.
- ExtNetlinkAttrNested = 16
+ ExtNetlinkAttrNested Extension = 16
// ExtMark returns the packet's mark value.
- ExtMark = 20
+ ExtMark Extension = 20
// ExtQueue returns the packet's assigned hardware queue.
- ExtQueue = 24
+ ExtQueue Extension = 24
// ExtLinkLayerType returns the packet's hardware address type
// (e.g. Ethernet, Infiniband).
- ExtLinkLayerType = 28
+ ExtLinkLayerType Extension = 28
// ExtRXHash returns the packets receive hash.
//
// TODO: figure out what this rxhash actually is.
- ExtRXHash = 32
+ ExtRXHash Extension = 32
// ExtCPUID returns the ID of the CPU processing the current
// packet.
- ExtCPUID = 36
+ ExtCPUID Extension = 36
// ExtVLANTag returns the packet's VLAN tag.
- ExtVLANTag = 44
+ ExtVLANTag Extension = 44
// ExtVLANTagPresent returns non-zero if the packet has a VLAN
// tag.
//
// TODO: I think this might be a lie: it reads bit 0x1000 of the
// VLAN header, which changed meaning in recent revisions of the
// spec - this extension may now return meaningless information.
- ExtVLANTagPresent = 48
+ ExtVLANTagPresent Extension = 48
// ExtVLANProto returns 0x8100 if the frame has a VLAN header,
// 0x88a8 if the frame has a "Q-in-Q" double VLAN header, or some
// other value if no VLAN information is present.
- ExtVLANProto = 60
+ ExtVLANProto Extension = 60
// ExtRand returns a uniformly random uint32.
- ExtRand = 56
+ ExtRand Extension = 56
)
// The following gives names to various bit patterns used in opcode construction.
diff --git a/vendor/golang.org/x/net/bpf/setter.go b/vendor/golang.org/x/net/bpf/setter.go
new file mode 100644
index 000000000..43e35f0ac
--- /dev/null
+++ b/vendor/golang.org/x/net/bpf/setter.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 bpf
+
+// A Setter is a type which can attach a compiled BPF filter to itself.
+type Setter interface {
+ SetBPF(filter []RawInstruction) error
+}
diff --git a/vendor/golang.org/x/net/bpf/vm_bpf_test.go b/vendor/golang.org/x/net/bpf/vm_bpf_test.go
index 76dd970e6..77fa8fe4a 100644
--- a/vendor/golang.org/x/net/bpf/vm_bpf_test.go
+++ b/vendor/golang.org/x/net/bpf/vm_bpf_test.go
@@ -149,9 +149,6 @@ func testOSVM(t *testing.T, filter []bpf.Instruction) (virtualMachine, func()) {
p := ipv4.NewPacketConn(l)
if err = p.SetBPF(prog); err != nil {
- if err.Error() == "operation not supported" { // TODO: gross. remove once 19051 fixed.
- t.Skip("Skipping until Issue 19051 is fixed.")
- }
t.Fatalf("failed to attach BPF program to listener: %v", err)
}
diff --git a/vendor/golang.org/x/net/context/context.go b/vendor/golang.org/x/net/context/context.go
index f143ed6a1..d3681ab42 100644
--- a/vendor/golang.org/x/net/context/context.go
+++ b/vendor/golang.org/x/net/context/context.go
@@ -36,103 +36,6 @@
// Contexts.
package context // import "golang.org/x/net/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
@@ -149,8 +52,3 @@ func Background() Context {
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/vendor/golang.org/x/net/context/go19.go b/vendor/golang.org/x/net/context/go19.go
new file mode 100644
index 000000000..d88bd1db1
--- /dev/null
+++ b/vendor/golang.org/x/net/context/go19.go
@@ -0,0 +1,20 @@
+// Copyright 2017 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.9
+
+package context
+
+import "context" // standard library's context, as of Go 1.7
+
+// 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 = context.Context
+
+// 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 = context.CancelFunc
diff --git a/vendor/golang.org/x/net/context/pre_go19.go b/vendor/golang.org/x/net/context/pre_go19.go
new file mode 100644
index 000000000..b105f80be
--- /dev/null
+++ b/vendor/golang.org/x/net/context/pre_go19.go
@@ -0,0 +1,109 @@
+// 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.9
+
+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{}
+}
+
+// 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/vendor/golang.org/x/net/context/withtimeout_test.go b/vendor/golang.org/x/net/context/withtimeout_test.go
index a6754dc36..e6f56691d 100644
--- a/vendor/golang.org/x/net/context/withtimeout_test.go
+++ b/vendor/golang.org/x/net/context/withtimeout_test.go
@@ -11,16 +11,21 @@ import (
"golang.org/x/net/context"
)
+// This example passes a context with a timeout to tell a blocking function that
+// it should abandon its work after the timeout elapses.
func ExampleWithTimeout() {
// Pass a context with a timeout to tell a blocking function that it
// should abandon its work after the timeout elapses.
- ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond)
+ ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond)
+ defer cancel()
+
select {
- case <-time.After(200 * time.Millisecond):
+ case <-time.After(1 * time.Second):
fmt.Println("overslept")
case <-ctx.Done():
fmt.Println(ctx.Err()) // prints "context deadline exceeded"
}
+
// Output:
// context deadline exceeded
}
diff --git a/vendor/golang.org/x/net/dns/dnsmessage/example_test.go b/vendor/golang.org/x/net/dns/dnsmessage/example_test.go
new file mode 100644
index 000000000..5415c2d3a
--- /dev/null
+++ b/vendor/golang.org/x/net/dns/dnsmessage/example_test.go
@@ -0,0 +1,132 @@
+// Copyright 2017 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 dnsmessage_test
+
+import (
+ "fmt"
+ "net"
+ "strings"
+
+ "golang.org/x/net/dns/dnsmessage"
+)
+
+func mustNewName(name string) dnsmessage.Name {
+ n, err := dnsmessage.NewName(name)
+ if err != nil {
+ panic(err)
+ }
+ return n
+}
+
+func ExampleParser() {
+ msg := dnsmessage.Message{
+ Header: dnsmessage.Header{Response: true, Authoritative: true},
+ Questions: []dnsmessage.Question{
+ {
+ Name: mustNewName("foo.bar.example.com."),
+ Type: dnsmessage.TypeA,
+ Class: dnsmessage.ClassINET,
+ },
+ {
+ Name: mustNewName("bar.example.com."),
+ Type: dnsmessage.TypeA,
+ Class: dnsmessage.ClassINET,
+ },
+ },
+ Answers: []dnsmessage.Resource{
+ {
+ dnsmessage.ResourceHeader{
+ Name: mustNewName("foo.bar.example.com."),
+ Type: dnsmessage.TypeA,
+ Class: dnsmessage.ClassINET,
+ },
+ &dnsmessage.AResource{[4]byte{127, 0, 0, 1}},
+ },
+ {
+ dnsmessage.ResourceHeader{
+ Name: mustNewName("bar.example.com."),
+ Type: dnsmessage.TypeA,
+ Class: dnsmessage.ClassINET,
+ },
+ &dnsmessage.AResource{[4]byte{127, 0, 0, 2}},
+ },
+ },
+ }
+
+ buf, err := msg.Pack()
+ if err != nil {
+ panic(err)
+ }
+
+ wantName := "bar.example.com."
+
+ var p dnsmessage.Parser
+ if _, err := p.Start(buf); err != nil {
+ panic(err)
+ }
+
+ for {
+ q, err := p.Question()
+ if err == dnsmessage.ErrSectionDone {
+ break
+ }
+ if err != nil {
+ panic(err)
+ }
+
+ if q.Name.String() != wantName {
+ continue
+ }
+
+ fmt.Println("Found question for name", wantName)
+ if err := p.SkipAllQuestions(); err != nil {
+ panic(err)
+ }
+ break
+ }
+
+ var gotIPs []net.IP
+ for {
+ h, err := p.AnswerHeader()
+ if err == dnsmessage.ErrSectionDone {
+ break
+ }
+ if err != nil {
+ panic(err)
+ }
+
+ if (h.Type != dnsmessage.TypeA && h.Type != dnsmessage.TypeAAAA) || h.Class != dnsmessage.ClassINET {
+ continue
+ }
+
+ if !strings.EqualFold(h.Name.String(), wantName) {
+ if err := p.SkipAnswer(); err != nil {
+ panic(err)
+ }
+ continue
+ }
+
+ switch h.Type {
+ case dnsmessage.TypeA:
+ r, err := p.AResource()
+ if err != nil {
+ panic(err)
+ }
+ gotIPs = append(gotIPs, r.A[:])
+ case dnsmessage.TypeAAAA:
+ r, err := p.AAAAResource()
+ if err != nil {
+ panic(err)
+ }
+ gotIPs = append(gotIPs, r.AAAA[:])
+ }
+ }
+
+ fmt.Printf("Found A/AAAA records for name %s: %v\n", wantName, gotIPs)
+
+ // Output:
+ // Found question for name bar.example.com.
+ // Found A/AAAA records for name bar.example.com.: [127.0.0.2]
+}
diff --git a/vendor/golang.org/x/net/dns/dnsmessage/message.go b/vendor/golang.org/x/net/dns/dnsmessage/message.go
index da43b0ba4..19b260dea 100644
--- a/vendor/golang.org/x/net/dns/dnsmessage/message.go
+++ b/vendor/golang.org/x/net/dns/dnsmessage/message.go
@@ -68,18 +68,19 @@ const (
var (
// ErrNotStarted indicates that the prerequisite information isn't
// available yet because the previous records haven't been appropriately
- // parsed or skipped.
- ErrNotStarted = errors.New("parsing of this type isn't available yet")
+ // parsed, skipped or finished.
+ ErrNotStarted = errors.New("parsing/packing of this type isn't available yet")
// ErrSectionDone indicated that all records in the section have been
- // parsed.
- ErrSectionDone = errors.New("parsing of this section has completed")
+ // parsed or finished.
+ ErrSectionDone = errors.New("parsing/packing of this section has completed")
errBaseLen = errors.New("insufficient data for base length type")
errCalcLen = errors.New("insufficient data for calculated length type")
errReserved = errors.New("segment prefix is reserved")
errTooManyPtr = errors.New("too many pointers (>10)")
errInvalidPtr = errors.New("invalid pointer")
+ errNilResouceBody = errors.New("nil resource body")
errResourceLen = errors.New("insufficient data for resource body length")
errSegTooLong = errors.New("segment length too long")
errZeroSegLen = errors.New("zero length segment")
@@ -88,6 +89,28 @@ var (
errTooManyAnswers = errors.New("too many Answers to pack (>65535)")
errTooManyAuthorities = errors.New("too many Authorities to pack (>65535)")
errTooManyAdditionals = errors.New("too many Additionals to pack (>65535)")
+ errNonCanonicalName = errors.New("name is not in canonical format (it must end with a .)")
+)
+
+// Internal constants.
+const (
+ // packStartingCap is the default initial buffer size allocated during
+ // packing.
+ //
+ // The starting capacity doesn't matter too much, but most DNS responses
+ // Will be <= 512 bytes as it is the limit for DNS over UDP.
+ packStartingCap = 512
+
+ // uint16Len is the length (in bytes) of a uint16.
+ uint16Len = 2
+
+ // uint32Len is the length (in bytes) of a uint32.
+ uint32Len = 4
+
+ // headerLen is the length (in bytes) of a DNS header.
+ //
+ // A header is comprised of 6 uint16s and no padding.
+ headerLen = 6 * uint16Len
)
type nestedError struct {
@@ -148,7 +171,8 @@ type Message struct {
type section uint8
const (
- sectionHeader section = iota
+ sectionNotStarted section = iota
+ sectionHeader
sectionQuestions
sectionAnswers
sectionAuthorities
@@ -241,10 +265,13 @@ func (h *header) header() Header {
}
// A Resource is a DNS resource record.
-type Resource interface {
- // Header return's the Resource's ResourceHeader.
- Header() *ResourceHeader
+type Resource struct {
+ Header ResourceHeader
+ Body ResourceBody
+}
+// A ResourceBody is a DNS resource record minus the header.
+type ResourceBody interface {
// pack packs a Resource except for its header.
pack(msg []byte, compression map[string]int) ([]byte, error)
@@ -253,25 +280,24 @@ type Resource interface {
realType() Type
}
-func packResource(msg []byte, resource Resource, compression map[string]int) ([]byte, error) {
+func (r *Resource) pack(msg []byte, compression map[string]int) ([]byte, error) {
+ if r.Body == nil {
+ return msg, errNilResouceBody
+ }
oldMsg := msg
- resource.Header().Type = resource.realType()
- msg, length, err := resource.Header().pack(msg, compression)
+ r.Header.Type = r.Body.realType()
+ msg, length, err := r.Header.pack(msg, compression)
if err != nil {
return msg, &nestedError{"ResourceHeader", err}
}
preLen := len(msg)
- msg, err = resource.pack(msg, compression)
+ msg, err = r.Body.pack(msg, compression)
if err != nil {
return msg, &nestedError{"content", err}
}
- conLen := len(msg) - preLen
- if conLen > int(^uint16(0)) {
- return oldMsg, errResTooLong
+ if err := r.Header.fixLen(msg, length, preLen); err != nil {
+ return oldMsg, err
}
- // Fill in the length now that we know how long the content is.
- packUint16(length[:0], uint16(conLen))
- resource.Header().Length = uint16(conLen)
return msg, nil
}
@@ -330,14 +356,15 @@ func (p *Parser) checkAdvance(sec section) error {
func (p *Parser) resource(sec section) (Resource, error) {
var r Resource
- hdr, err := p.resourceHeader(sec)
+ var err error
+ r.Header, err = p.resourceHeader(sec)
if err != nil {
return r, err
}
p.resHeaderValid = false
- r, p.off, err = unpackResource(p.msg, p.off, hdr)
+ r.Body, p.off, err = unpackResourceBody(p.msg, p.off, r.Header)
if err != nil {
- return nil, &nestedError{"unpacking " + sectionNames[sec], err}
+ return Resource{}, &nestedError{"unpacking " + sectionNames[sec], err}
}
p.index++
return r, nil
@@ -389,7 +416,8 @@ func (p *Parser) Question() (Question, error) {
if err := p.checkAdvance(sectionQuestions); err != nil {
return Question{}, err
}
- name, off, err := unpackName(p.msg, p.off)
+ var name Name
+ off, err := name.unpack(p.msg, p.off)
if err != nil {
return Question{}, &nestedError{"unpacking Question.Name", err}
}
@@ -575,6 +603,168 @@ func (p *Parser) SkipAllAdditionals() error {
}
}
+// CNAMEResource parses a single CNAMEResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) CNAMEResource() (CNAMEResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeCNAME {
+ return CNAMEResource{}, ErrNotStarted
+ }
+ r, err := unpackCNAMEResource(p.msg, p.off)
+ if err != nil {
+ return CNAMEResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// MXResource parses a single MXResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) MXResource() (MXResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeMX {
+ return MXResource{}, ErrNotStarted
+ }
+ r, err := unpackMXResource(p.msg, p.off)
+ if err != nil {
+ return MXResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// NSResource parses a single NSResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) NSResource() (NSResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeNS {
+ return NSResource{}, ErrNotStarted
+ }
+ r, err := unpackNSResource(p.msg, p.off)
+ if err != nil {
+ return NSResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// PTRResource parses a single PTRResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) PTRResource() (PTRResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypePTR {
+ return PTRResource{}, ErrNotStarted
+ }
+ r, err := unpackPTRResource(p.msg, p.off)
+ if err != nil {
+ return PTRResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// SOAResource parses a single SOAResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) SOAResource() (SOAResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeSOA {
+ return SOAResource{}, ErrNotStarted
+ }
+ r, err := unpackSOAResource(p.msg, p.off)
+ if err != nil {
+ return SOAResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// TXTResource parses a single TXTResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) TXTResource() (TXTResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeTXT {
+ return TXTResource{}, ErrNotStarted
+ }
+ r, err := unpackTXTResource(p.msg, p.off, p.resHeader.Length)
+ if err != nil {
+ return TXTResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// SRVResource parses a single SRVResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) SRVResource() (SRVResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeSRV {
+ return SRVResource{}, ErrNotStarted
+ }
+ r, err := unpackSRVResource(p.msg, p.off)
+ if err != nil {
+ return SRVResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// AResource parses a single AResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) AResource() (AResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeA {
+ return AResource{}, ErrNotStarted
+ }
+ r, err := unpackAResource(p.msg, p.off)
+ if err != nil {
+ return AResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
+// AAAAResource parses a single AAAAResource.
+//
+// One of the XXXHeader methods must have been called before calling this
+// method.
+func (p *Parser) AAAAResource() (AAAAResource, error) {
+ if !p.resHeaderValid || p.resHeader.Type != TypeAAAA {
+ return AAAAResource{}, ErrNotStarted
+ }
+ r, err := unpackAAAAResource(p.msg, p.off)
+ if err != nil {
+ return AAAAResource{}, err
+ }
+ p.off += int(p.resHeader.Length)
+ p.resHeaderValid = false
+ p.index++
+ return r, nil
+}
+
// Unpack parses a full Message.
func (m *Message) Unpack(msg []byte) error {
var p Parser
@@ -623,9 +813,7 @@ func (m *Message) Pack() ([]byte, error) {
h.authorities = uint16(len(m.Authorities))
h.additionals = uint16(len(m.Additionals))
- // The starting capacity doesn't matter too much, but most DNS responses
- // Will be <= 512 bytes as it is the limit for DNS over UDP.
- msg := make([]byte, 0, 512)
+ msg := make([]byte, 0, packStartingCap)
msg = h.pack(msg)
@@ -639,31 +827,27 @@ func (m *Message) Pack() ([]byte, error) {
// compression will help ensure compliance.
compression := map[string]int{}
- for _, q := range m.Questions {
+ for i := range m.Questions {
var err error
- msg, err = q.pack(msg, compression)
- if err != nil {
+ if msg, err = m.Questions[i].pack(msg, compression); err != nil {
return nil, &nestedError{"packing Question", err}
}
}
- for _, a := range m.Answers {
+ for i := range m.Answers {
var err error
- msg, err = packResource(msg, a, compression)
- if err != nil {
+ if msg, err = m.Answers[i].pack(msg, compression); err != nil {
return nil, &nestedError{"packing Answer", err}
}
}
- for _, a := range m.Authorities {
+ for i := range m.Authorities {
var err error
- msg, err = packResource(msg, a, compression)
- if err != nil {
+ if msg, err = m.Authorities[i].pack(msg, compression); err != nil {
return nil, &nestedError{"packing Authority", err}
}
}
- for _, a := range m.Additionals {
+ for i := range m.Additionals {
var err error
- msg, err = packResource(msg, a, compression)
- if err != nil {
+ if msg, err = m.Additionals[i].pack(msg, compression); err != nil {
return nil, &nestedError{"packing Additional", err}
}
}
@@ -671,11 +855,369 @@ func (m *Message) Pack() ([]byte, error) {
return msg, nil
}
-// An ResourceHeader is the header of a DNS resource record. There are
+// A Builder allows incrementally packing a DNS message.
+type Builder struct {
+ msg []byte
+ header header
+ section section
+ compression map[string]int
+}
+
+// Start initializes the builder.
+//
+// buf is optional (nil is fine), but if provided, Start takes ownership of buf.
+func (b *Builder) Start(buf []byte, h Header) {
+ b.StartWithoutCompression(buf, h)
+ b.compression = map[string]int{}
+}
+
+// StartWithoutCompression initializes the builder with compression disabled.
+//
+// This avoids compression related allocations, but can result in larger message
+// sizes. Be careful with this mode as it can cause messages to exceed the UDP
+// size limit.
+//
+// buf is optional (nil is fine), but if provided, Start takes ownership of buf.
+func (b *Builder) StartWithoutCompression(buf []byte, h Header) {
+ *b = Builder{msg: buf}
+ b.header.id, b.header.bits = h.pack()
+ if cap(b.msg) < headerLen {
+ b.msg = make([]byte, 0, packStartingCap)
+ }
+ b.msg = b.msg[:headerLen]
+ b.section = sectionHeader
+}
+
+func (b *Builder) startCheck(s section) error {
+ if b.section <= sectionNotStarted {
+ return ErrNotStarted
+ }
+ if b.section > s {
+ return ErrSectionDone
+ }
+ return nil
+}
+
+// StartQuestions prepares the builder for packing Questions.
+func (b *Builder) StartQuestions() error {
+ if err := b.startCheck(sectionQuestions); err != nil {
+ return err
+ }
+ b.section = sectionQuestions
+ return nil
+}
+
+// StartAnswers prepares the builder for packing Answers.
+func (b *Builder) StartAnswers() error {
+ if err := b.startCheck(sectionAnswers); err != nil {
+ return err
+ }
+ b.section = sectionAnswers
+ return nil
+}
+
+// StartAuthorities prepares the builder for packing Authorities.
+func (b *Builder) StartAuthorities() error {
+ if err := b.startCheck(sectionAuthorities); err != nil {
+ return err
+ }
+ b.section = sectionAuthorities
+ return nil
+}
+
+// StartAdditionals prepares the builder for packing Additionals.
+func (b *Builder) StartAdditionals() error {
+ if err := b.startCheck(sectionAdditionals); err != nil {
+ return err
+ }
+ b.section = sectionAdditionals
+ return nil
+}
+
+func (b *Builder) incrementSectionCount() error {
+ var count *uint16
+ var err error
+ switch b.section {
+ case sectionQuestions:
+ count = &b.header.questions
+ err = errTooManyQuestions
+ case sectionAnswers:
+ count = &b.header.answers
+ err = errTooManyAnswers
+ case sectionAuthorities:
+ count = &b.header.authorities
+ err = errTooManyAuthorities
+ case sectionAdditionals:
+ count = &b.header.additionals
+ err = errTooManyAdditionals
+ }
+ if *count == ^uint16(0) {
+ return err
+ }
+ *count++
+ return nil
+}
+
+// Question adds a single Question.
+func (b *Builder) Question(q Question) error {
+ if b.section < sectionQuestions {
+ return ErrNotStarted
+ }
+ if b.section > sectionQuestions {
+ return ErrSectionDone
+ }
+ msg, err := q.pack(b.msg, b.compression)
+ if err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+func (b *Builder) checkResourceSection() error {
+ if b.section < sectionAnswers {
+ return ErrNotStarted
+ }
+ if b.section > sectionAdditionals {
+ return ErrSectionDone
+ }
+ return nil
+}
+
+// CNAMEResource adds a single CNAMEResource.
+func (b *Builder) CNAMEResource(h ResourceHeader, r CNAMEResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"CNAMEResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// MXResource adds a single MXResource.
+func (b *Builder) MXResource(h ResourceHeader, r MXResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"MXResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// NSResource adds a single NSResource.
+func (b *Builder) NSResource(h ResourceHeader, r NSResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"NSResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// PTRResource adds a single PTRResource.
+func (b *Builder) PTRResource(h ResourceHeader, r PTRResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"PTRResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// SOAResource adds a single SOAResource.
+func (b *Builder) SOAResource(h ResourceHeader, r SOAResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"SOAResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// TXTResource adds a single TXTResource.
+func (b *Builder) TXTResource(h ResourceHeader, r TXTResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"TXTResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// SRVResource adds a single SRVResource.
+func (b *Builder) SRVResource(h ResourceHeader, r SRVResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"SRVResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// AResource adds a single AResource.
+func (b *Builder) AResource(h ResourceHeader, r AResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"AResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// AAAAResource adds a single AAAAResource.
+func (b *Builder) AAAAResource(h ResourceHeader, r AAAAResource) error {
+ if err := b.checkResourceSection(); err != nil {
+ return err
+ }
+ h.Type = r.realType()
+ msg, length, err := h.pack(b.msg, b.compression)
+ if err != nil {
+ return &nestedError{"ResourceHeader", err}
+ }
+ preLen := len(msg)
+ if msg, err = r.pack(msg, b.compression); err != nil {
+ return &nestedError{"AAAAResource body", err}
+ }
+ if err := h.fixLen(msg, length, preLen); err != nil {
+ return err
+ }
+ if err := b.incrementSectionCount(); err != nil {
+ return err
+ }
+ b.msg = msg
+ return nil
+}
+
+// Finish ends message building and generates a binary packet.
+func (b *Builder) Finish() ([]byte, error) {
+ if b.section < sectionHeader {
+ return nil, ErrNotStarted
+ }
+ b.section = sectionDone
+ b.header.pack(b.msg[:0])
+ return b.msg, nil
+}
+
+// A ResourceHeader is the header of a DNS resource record. There are
// many types of DNS resource records, but they all share the same header.
type ResourceHeader struct {
// Name is the domain name for which this resource record pertains.
- Name string
+ Name Name
// Type is the type of DNS resource record.
//
@@ -697,17 +1239,12 @@ type ResourceHeader struct {
Length uint16
}
-// Header implements Resource.Header.
-func (h *ResourceHeader) Header() *ResourceHeader {
- return h
-}
-
// pack packs all of the fields in a ResourceHeader except for the length. The
// length bytes are returned as a slice so they can be filled in after the rest
// of the Resource has been packed.
func (h *ResourceHeader) pack(oldMsg []byte, compression map[string]int) (msg []byte, length []byte, err error) {
msg = oldMsg
- if msg, err = packName(msg, h.Name, compression); err != nil {
+ if msg, err = h.Name.pack(msg, compression); err != nil {
return oldMsg, nil, &nestedError{"Name", err}
}
msg = packType(msg, h.Type)
@@ -715,13 +1252,13 @@ func (h *ResourceHeader) pack(oldMsg []byte, compression map[string]int) (msg []
msg = packUint32(msg, h.TTL)
lenBegin := len(msg)
msg = packUint16(msg, h.Length)
- return msg, msg[lenBegin:], nil
+ return msg, msg[lenBegin : lenBegin+uint16Len], nil
}
func (h *ResourceHeader) unpack(msg []byte, off int) (int, error) {
newOff := off
var err error
- if h.Name, newOff, err = unpackName(msg, newOff); err != nil {
+ if newOff, err = h.Name.unpack(msg, newOff); err != nil {
return off, &nestedError{"Name", err}
}
if h.Type, newOff, err = unpackType(msg, newOff); err != nil {
@@ -739,6 +1276,19 @@ func (h *ResourceHeader) unpack(msg []byte, off int) (int, error) {
return newOff, nil
}
+func (h *ResourceHeader) fixLen(msg []byte, length []byte, preLen int) error {
+ conLen := len(msg) - preLen
+ if conLen > int(^uint16(0)) {
+ return errResTooLong
+ }
+
+ // Fill in the length now that we know how long the content is.
+ packUint16(length[:0], uint16(conLen))
+ h.Length = uint16(conLen)
+
+ return nil
+}
+
func skipResource(msg []byte, off int) (int, error) {
newOff, err := skipName(msg, off)
if err != nil {
@@ -768,17 +1318,17 @@ func packUint16(msg []byte, field uint16) []byte {
}
func unpackUint16(msg []byte, off int) (uint16, int, error) {
- if off+2 > len(msg) {
+ if off+uint16Len > len(msg) {
return 0, off, errBaseLen
}
- return uint16(msg[off])<<8 | uint16(msg[off+1]), off + 2, nil
+ return uint16(msg[off])<<8 | uint16(msg[off+1]), off + uint16Len, nil
}
func skipUint16(msg []byte, off int) (int, error) {
- if off+2 > len(msg) {
+ if off+uint16Len > len(msg) {
return off, errBaseLen
}
- return off + 2, nil
+ return off + uint16Len, nil
}
func packType(msg []byte, field Type) []byte {
@@ -818,18 +1368,18 @@ func packUint32(msg []byte, field uint32) []byte {
}
func unpackUint32(msg []byte, off int) (uint32, int, error) {
- if off+4 > len(msg) {
+ if off+uint32Len > len(msg) {
return 0, off, errBaseLen
}
v := uint32(msg[off])<<24 | uint32(msg[off+1])<<16 | uint32(msg[off+2])<<8 | uint32(msg[off+3])
- return v, off + 4, nil
+ return v, off + uint32Len, nil
}
func skipUint32(msg []byte, off int) (int, error) {
- if off+4 > len(msg) {
+ if off+uint32Len > len(msg) {
return off, errBaseLen
}
- return off + 4, nil
+ return off + uint32Len, nil
}
func packText(msg []byte, field string) []byte {
@@ -889,30 +1439,53 @@ func skipBytes(msg []byte, off int, field []byte) (int, error) {
return newOff, nil
}
-// packName packs a domain name.
+const nameLen = 255
+
+// A Name is a non-encoded domain name. It is used instead of strings to avoid
+// allocations.
+type Name struct {
+ Data [nameLen]byte
+ Length uint8
+}
+
+// NewName creates a new Name from a string.
+func NewName(name string) (Name, error) {
+ if len([]byte(name)) > nameLen {
+ return Name{}, errCalcLen
+ }
+ n := Name{Length: uint8(len(name))}
+ copy(n.Data[:], []byte(name))
+ return n, nil
+}
+
+func (n Name) String() string {
+ return string(n.Data[:n.Length])
+}
+
+// pack packs a domain name.
//
// Domain names are a sequence of counted strings split at the dots. They end
// with a zero-length string. Compression can be used to reuse domain suffixes.
//
// The compression map will be updated with new domain suffixes. If compression
// is nil, compression will not be used.
-func packName(msg []byte, name string, compression map[string]int) ([]byte, error) {
+func (n *Name) pack(msg []byte, compression map[string]int) ([]byte, error) {
oldMsg := msg
// Add a trailing dot to canonicalize name.
- if n := len(name); n == 0 || name[n-1] != '.' {
- name += "."
+ if n.Length == 0 || n.Data[n.Length-1] != '.' {
+ return oldMsg, errNonCanonicalName
}
// Allow root domain.
- if name == "." {
+ if n.Data[0] == '.' && n.Length == 1 {
return append(msg, 0), nil
}
// Emit sequence of counted strings, chopping at dots.
- for i, begin := 0, 0; i < len(name); i++ {
+ for i, begin := 0, 0; i < int(n.Length); i++ {
// Check for the end of the segment.
- if name[i] == '.' {
+ if n.Data[i] == '.' {
// The two most significant bits have special meaning.
// It isn't allowed for segments to be long enough to
// need them.
@@ -928,7 +1501,7 @@ func packName(msg []byte, name string, compression map[string]int) ([]byte, erro
msg = append(msg, byte(i-begin))
for j := begin; j < i; j++ {
- msg = append(msg, name[j])
+ msg = append(msg, n.Data[j])
}
begin = i + 1
@@ -938,8 +1511,8 @@ func packName(msg []byte, name string, compression map[string]int) ([]byte, erro
// We can only compress domain suffixes starting with a new
// segment. A pointer is two bytes with the two most significant
// bits set to 1 to indicate that it is a pointer.
- if (i == 0 || name[i-1] == '.') && compression != nil {
- if ptr, ok := compression[name[i:]]; ok {
+ if (i == 0 || n.Data[i-1] == '.') && compression != nil {
+ if ptr, ok := compression[string(n.Data[i:])]; ok {
// Hit. Emit a pointer instead of the rest of
// the domain.
return append(msg, byte(ptr>>8|0xC0), byte(ptr)), nil
@@ -948,15 +1521,15 @@ func packName(msg []byte, name string, compression map[string]int) ([]byte, erro
// Miss. Add the suffix to the compression table if the
// offset can be stored in the available 14 bytes.
if len(msg) <= int(^uint16(0)>>2) {
- compression[name[i:]] = len(msg)
+ compression[string(n.Data[i:])] = len(msg)
}
}
}
return append(msg, 0), nil
}
-// unpackName unpacks a domain name.
-func unpackName(msg []byte, off int) (string, int, error) {
+// unpack unpacks a domain name.
+func (n *Name) unpack(msg []byte, off int) (int, error) {
// currOff is the current working offset.
currOff := off
@@ -965,15 +1538,16 @@ func unpackName(msg []byte, off int) (string, int, error) {
// the usage of this name.
newOff := off
- // name is the domain name being unpacked.
- name := make([]byte, 0, 255)
-
// ptr is the number of pointers followed.
var ptr int
+
+ // Name is a slice representation of the name data.
+ name := n.Data[:0]
+
Loop:
for {
if currOff >= len(msg) {
- return "", off, errBaseLen
+ return off, errBaseLen
}
c := int(msg[currOff])
currOff++
@@ -985,14 +1559,14 @@ Loop:
}
endOff := currOff + c
if endOff > len(msg) {
- return "", off, errCalcLen
+ return off, errCalcLen
}
name = append(name, msg[currOff:endOff]...)
name = append(name, '.')
currOff = endOff
case 0xC0: // Pointer
if currOff >= len(msg) {
- return "", off, errInvalidPtr
+ return off, errInvalidPtr
}
c1 := msg[currOff]
currOff++
@@ -1001,21 +1575,25 @@ Loop:
}
// Don't follow too many pointers, maybe there's a loop.
if ptr++; ptr > 10 {
- return "", off, errTooManyPtr
+ return off, errTooManyPtr
}
currOff = (c^0xC0)<<8 | int(c1)
default:
// Prefixes 0x80 and 0x40 are reserved.
- return "", off, errReserved
+ return off, errReserved
}
}
if len(name) == 0 {
name = append(name, '.')
}
+ if len(name) > len(n.Data) {
+ return off, errCalcLen
+ }
+ n.Length = uint8(len(name))
if ptr == 0 {
newOff = currOff
}
- return string(name), newOff, nil
+ return newOff, nil
}
func skipName(msg []byte, off int) (int, error) {
@@ -1061,13 +1639,13 @@ Loop:
// A Question is a DNS query.
type Question struct {
- Name string
+ Name Name
Type Type
Class Class
}
func (q *Question) pack(msg []byte, compression map[string]int) ([]byte, error) {
- msg, err := packName(msg, q.Name, compression)
+ msg, err := q.Name.pack(msg, compression)
if err != nil {
return msg, &nestedError{"Name", err}
}
@@ -1075,55 +1653,71 @@ func (q *Question) pack(msg []byte, compression map[string]int) ([]byte, error)
return packClass(msg, q.Class), nil
}
-func unpackResource(msg []byte, off int, hdr ResourceHeader) (Resource, int, error) {
+func unpackResourceBody(msg []byte, off int, hdr ResourceHeader) (ResourceBody, int, error) {
var (
- r Resource
+ r ResourceBody
err error
name string
)
switch hdr.Type {
case TypeA:
- r, err = unpackAResource(hdr, msg, off)
+ var rb AResource
+ rb, err = unpackAResource(msg, off)
+ r = &rb
name = "A"
case TypeNS:
- r, err = unpackNSResource(hdr, msg, off)
+ var rb NSResource
+ rb, err = unpackNSResource(msg, off)
+ r = &rb
name = "NS"
case TypeCNAME:
- r, err = unpackCNAMEResource(hdr, msg, off)
+ var rb CNAMEResource
+ rb, err = unpackCNAMEResource(msg, off)
+ r = &rb
name = "CNAME"
case TypeSOA:
- r, err = unpackSOAResource(hdr, msg, off)
+ var rb SOAResource
+ rb, err = unpackSOAResource(msg, off)
+ r = &rb
name = "SOA"
case TypePTR:
- r, err = unpackPTRResource(hdr, msg, off)
+ var rb PTRResource
+ rb, err = unpackPTRResource(msg, off)
+ r = &rb
name = "PTR"
case TypeMX:
- r, err = unpackMXResource(hdr, msg, off)
+ var rb MXResource
+ rb, err = unpackMXResource(msg, off)
+ r = &rb
name = "MX"
case TypeTXT:
- r, err = unpackTXTResource(hdr, msg, off)
+ var rb TXTResource
+ rb, err = unpackTXTResource(msg, off, hdr.Length)
+ r = &rb
name = "TXT"
case TypeAAAA:
- r, err = unpackAAAAResource(hdr, msg, off)
+ var rb AAAAResource
+ rb, err = unpackAAAAResource(msg, off)
+ r = &rb
name = "AAAA"
case TypeSRV:
- r, err = unpackSRVResource(hdr, msg, off)
+ var rb SRVResource
+ rb, err = unpackSRVResource(msg, off)
+ r = &rb
name = "SRV"
}
if err != nil {
return nil, off, &nestedError{name + " record", err}
}
- if r != nil {
- return r, off + int(hdr.Length), nil
+ if r == nil {
+ return nil, off, errors.New("invalid resource type: " + string(hdr.Type+'0'))
}
- return nil, off, errors.New("invalid resource type: " + string(hdr.Type+'0'))
+ return r, off + int(hdr.Length), nil
}
// A CNAMEResource is a CNAME Resource record.
type CNAMEResource struct {
- ResourceHeader
-
- CNAME string
+ CNAME Name
}
func (r *CNAMEResource) realType() Type {
@@ -1131,23 +1725,21 @@ func (r *CNAMEResource) realType() Type {
}
func (r *CNAMEResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return packName(msg, r.CNAME, compression)
+ return r.CNAME.pack(msg, compression)
}
-func unpackCNAMEResource(hdr ResourceHeader, msg []byte, off int) (*CNAMEResource, error) {
- cname, _, err := unpackName(msg, off)
- if err != nil {
- return nil, err
+func unpackCNAMEResource(msg []byte, off int) (CNAMEResource, error) {
+ var cname Name
+ if _, err := cname.unpack(msg, off); err != nil {
+ return CNAMEResource{}, err
}
- return &CNAMEResource{hdr, cname}, nil
+ return CNAMEResource{cname}, nil
}
// An MXResource is an MX Resource record.
type MXResource struct {
- ResourceHeader
-
Pref uint16
- MX string
+ MX Name
}
func (r *MXResource) realType() Type {
@@ -1157,30 +1749,28 @@ func (r *MXResource) realType() Type {
func (r *MXResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
oldMsg := msg
msg = packUint16(msg, r.Pref)
- msg, err := packName(msg, r.MX, compression)
+ msg, err := r.MX.pack(msg, compression)
if err != nil {
return oldMsg, &nestedError{"MXResource.MX", err}
}
return msg, nil
}
-func unpackMXResource(hdr ResourceHeader, msg []byte, off int) (*MXResource, error) {
+func unpackMXResource(msg []byte, off int) (MXResource, error) {
pref, off, err := unpackUint16(msg, off)
if err != nil {
- return nil, &nestedError{"Pref", err}
+ return MXResource{}, &nestedError{"Pref", err}
}
- mx, _, err := unpackName(msg, off)
- if err != nil {
- return nil, &nestedError{"MX", err}
+ var mx Name
+ if _, err := mx.unpack(msg, off); err != nil {
+ return MXResource{}, &nestedError{"MX", err}
}
- return &MXResource{hdr, pref, mx}, nil
+ return MXResource{pref, mx}, nil
}
// An NSResource is an NS Resource record.
type NSResource struct {
- ResourceHeader
-
- NS string
+ NS Name
}
func (r *NSResource) realType() Type {
@@ -1188,22 +1778,20 @@ func (r *NSResource) realType() Type {
}
func (r *NSResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return packName(msg, r.NS, compression)
+ return r.NS.pack(msg, compression)
}
-func unpackNSResource(hdr ResourceHeader, msg []byte, off int) (*NSResource, error) {
- ns, _, err := unpackName(msg, off)
- if err != nil {
- return nil, err
+func unpackNSResource(msg []byte, off int) (NSResource, error) {
+ var ns Name
+ if _, err := ns.unpack(msg, off); err != nil {
+ return NSResource{}, err
}
- return &NSResource{hdr, ns}, nil
+ return NSResource{ns}, nil
}
// A PTRResource is a PTR Resource record.
type PTRResource struct {
- ResourceHeader
-
- PTR string
+ PTR Name
}
func (r *PTRResource) realType() Type {
@@ -1211,23 +1799,21 @@ func (r *PTRResource) realType() Type {
}
func (r *PTRResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
- return packName(msg, r.PTR, compression)
+ return r.PTR.pack(msg, compression)
}
-func unpackPTRResource(hdr ResourceHeader, msg []byte, off int) (*PTRResource, error) {
- ptr, _, err := unpackName(msg, off)
- if err != nil {
- return nil, err
+func unpackPTRResource(msg []byte, off int) (PTRResource, error) {
+ var ptr Name
+ if _, err := ptr.unpack(msg, off); err != nil {
+ return PTRResource{}, err
}
- return &PTRResource{hdr, ptr}, nil
+ return PTRResource{ptr}, nil
}
// An SOAResource is an SOA Resource record.
type SOAResource struct {
- ResourceHeader
-
- NS string
- MBox string
+ NS Name
+ MBox Name
Serial uint32
Refresh uint32
Retry uint32
@@ -1245,11 +1831,11 @@ func (r *SOAResource) realType() Type {
func (r *SOAResource) pack(msg []byte, compression map[string]int) ([]byte, error) {
oldMsg := msg
- msg, err := packName(msg, r.NS, compression)
+ msg, err := r.NS.pack(msg, compression)
if err != nil {
return oldMsg, &nestedError{"SOAResource.NS", err}
}
- msg, err = packName(msg, r.MBox, compression)
+ msg, err = r.MBox.pack(msg, compression)
if err != nil {
return oldMsg, &nestedError{"SOAResource.MBox", err}
}
@@ -1260,42 +1846,41 @@ func (r *SOAResource) pack(msg []byte, compression map[string]int) ([]byte, erro
return packUint32(msg, r.MinTTL), nil
}
-func unpackSOAResource(hdr ResourceHeader, msg []byte, off int) (*SOAResource, error) {
- ns, off, err := unpackName(msg, off)
+func unpackSOAResource(msg []byte, off int) (SOAResource, error) {
+ var ns Name
+ off, err := ns.unpack(msg, off)
if err != nil {
- return nil, &nestedError{"NS", err}
+ return SOAResource{}, &nestedError{"NS", err}
}
- mbox, off, err := unpackName(msg, off)
- if err != nil {
- return nil, &nestedError{"MBox", err}
+ var mbox Name
+ if off, err = mbox.unpack(msg, off); err != nil {
+ return SOAResource{}, &nestedError{"MBox", err}
}
serial, off, err := unpackUint32(msg, off)
if err != nil {
- return nil, &nestedError{"Serial", err}
+ return SOAResource{}, &nestedError{"Serial", err}
}
refresh, off, err := unpackUint32(msg, off)
if err != nil {
- return nil, &nestedError{"Refresh", err}
+ return SOAResource{}, &nestedError{"Refresh", err}
}
retry, off, err := unpackUint32(msg, off)
if err != nil {
- return nil, &nestedError{"Retry", err}
+ return SOAResource{}, &nestedError{"Retry", err}
}
expire, off, err := unpackUint32(msg, off)
if err != nil {
- return nil, &nestedError{"Expire", err}
+ return SOAResource{}, &nestedError{"Expire", err}
}
minTTL, _, err := unpackUint32(msg, off)
if err != nil {
- return nil, &nestedError{"MinTTL", err}
+ return SOAResource{}, &nestedError{"MinTTL", err}
}
- return &SOAResource{hdr, ns, mbox, serial, refresh, retry, expire, minTTL}, nil
+ return SOAResource{ns, mbox, serial, refresh, retry, expire, minTTL}, nil
}
// A TXTResource is a TXT Resource record.
type TXTResource struct {
- ResourceHeader
-
Txt string // Not a domain name.
}
@@ -1307,32 +1892,30 @@ func (r *TXTResource) pack(msg []byte, compression map[string]int) ([]byte, erro
return packText(msg, r.Txt), nil
}
-func unpackTXTResource(hdr ResourceHeader, msg []byte, off int) (*TXTResource, error) {
+func unpackTXTResource(msg []byte, off int, length uint16) (TXTResource, error) {
var txt string
- for n := uint16(0); n < hdr.Length; {
+ for n := uint16(0); n < length; {
var t string
var err error
if t, off, err = unpackText(msg, off); err != nil {
- return nil, &nestedError{"text", err}
+ return TXTResource{}, &nestedError{"text", err}
}
// Check if we got too many bytes.
- if hdr.Length-n < uint16(len(t))+1 {
- return nil, errCalcLen
+ if length-n < uint16(len(t))+1 {
+ return TXTResource{}, errCalcLen
}
n += uint16(len(t)) + 1
txt += t
}
- return &TXTResource{hdr, txt}, nil
+ return TXTResource{txt}, nil
}
// An SRVResource is an SRV Resource record.
type SRVResource struct {
- ResourceHeader
-
Priority uint16
Weight uint16
Port uint16
- Target string // Not compressed as per RFC 2782.
+ Target Name // Not compressed as per RFC 2782.
}
func (r *SRVResource) realType() Type {
@@ -1344,37 +1927,35 @@ func (r *SRVResource) pack(msg []byte, compression map[string]int) ([]byte, erro
msg = packUint16(msg, r.Priority)
msg = packUint16(msg, r.Weight)
msg = packUint16(msg, r.Port)
- msg, err := packName(msg, r.Target, nil)
+ msg, err := r.Target.pack(msg, nil)
if err != nil {
return oldMsg, &nestedError{"SRVResource.Target", err}
}
return msg, nil
}
-func unpackSRVResource(hdr ResourceHeader, msg []byte, off int) (*SRVResource, error) {
+func unpackSRVResource(msg []byte, off int) (SRVResource, error) {
priority, off, err := unpackUint16(msg, off)
if err != nil {
- return nil, &nestedError{"Priority", err}
+ return SRVResource{}, &nestedError{"Priority", err}
}
weight, off, err := unpackUint16(msg, off)
if err != nil {
- return nil, &nestedError{"Weight", err}
+ return SRVResource{}, &nestedError{"Weight", err}
}
port, off, err := unpackUint16(msg, off)
if err != nil {
- return nil, &nestedError{"Port", err}
+ return SRVResource{}, &nestedError{"Port", err}
}
- target, _, err := unpackName(msg, off)
- if err != nil {
- return nil, &nestedError{"Target", err}
+ var target Name
+ if _, err := target.unpack(msg, off); err != nil {
+ return SRVResource{}, &nestedError{"Target", err}
}
- return &SRVResource{hdr, priority, weight, port, target}, nil
+ return SRVResource{priority, weight, port, target}, nil
}
// An AResource is an A Resource record.
type AResource struct {
- ResourceHeader
-
A [4]byte
}
@@ -1386,18 +1967,16 @@ func (r *AResource) pack(msg []byte, compression map[string]int) ([]byte, error)
return packBytes(msg, r.A[:]), nil
}
-func unpackAResource(hdr ResourceHeader, msg []byte, off int) (*AResource, error) {
+func unpackAResource(msg []byte, off int) (AResource, error) {
var a [4]byte
if _, err := unpackBytes(msg, off, a[:]); err != nil {
- return nil, err
+ return AResource{}, err
}
- return &AResource{hdr, a}, nil
+ return AResource{a}, nil
}
// An AAAAResource is an AAAA Resource record.
type AAAAResource struct {
- ResourceHeader
-
AAAA [16]byte
}
@@ -1409,10 +1988,10 @@ func (r *AAAAResource) pack(msg []byte, compression map[string]int) ([]byte, err
return packBytes(msg, r.AAAA[:]), nil
}
-func unpackAAAAResource(hdr ResourceHeader, msg []byte, off int) (*AAAAResource, error) {
+func unpackAAAAResource(msg []byte, off int) (AAAAResource, error) {
var aaaa [16]byte
if _, err := unpackBytes(msg, off, aaaa[:]); err != nil {
- return nil, err
+ return AAAAResource{}, err
}
- return &AAAAResource{hdr, aaaa}, nil
+ return AAAAResource{aaaa}, nil
}
diff --git a/vendor/golang.org/x/net/dns/dnsmessage/message_test.go b/vendor/golang.org/x/net/dns/dnsmessage/message_test.go
index 46edd7243..9295d36ce 100644
--- a/vendor/golang.org/x/net/dns/dnsmessage/message_test.go
+++ b/vendor/golang.org/x/net/dns/dnsmessage/message_test.go
@@ -5,13 +5,20 @@
package dnsmessage
import (
+ "bytes"
"fmt"
- "net"
"reflect"
- "strings"
"testing"
)
+func mustNewName(name string) Name {
+ n, err := NewName(name)
+ if err != nil {
+ panic(err)
+ }
+ return n
+}
+
func (m *Message) String() string {
s := fmt.Sprintf("Message: %#v\n", &m.Header)
if len(m.Questions) > 0 {
@@ -41,9 +48,17 @@ func (m *Message) String() string {
return s
}
+func TestNameString(t *testing.T) {
+ want := "foo"
+ name := mustNewName(want)
+ if got := fmt.Sprint(name); got != want {
+ t.Errorf("got fmt.Sprint(%#v) = %s, want = %s", name, got, want)
+ }
+}
+
func TestQuestionPackUnpack(t *testing.T) {
want := Question{
- Name: ".",
+ Name: mustNewName("."),
Type: TypeA,
Class: ClassINET,
}
@@ -68,16 +83,42 @@ func TestQuestionPackUnpack(t *testing.T) {
}
}
+func TestName(t *testing.T) {
+ tests := []string{
+ "",
+ ".",
+ "google..com",
+ "google.com",
+ "google..com.",
+ "google.com.",
+ ".google.com.",
+ "www..google.com.",
+ "www.google.com.",
+ }
+
+ for _, test := range tests {
+ n, err := NewName(test)
+ if err != nil {
+ t.Errorf("Creating name for %q: %v", test, err)
+ continue
+ }
+ if ns := n.String(); ns != test {
+ t.Errorf("Got %#v.String() = %q, want = %q", n, ns, test)
+ continue
+ }
+ }
+}
+
func TestNamePackUnpack(t *testing.T) {
tests := []struct {
in string
want string
err error
}{
- {"", ".", nil},
+ {"", "", errNonCanonicalName},
{".", ".", nil},
- {"google..com", "", errZeroSegLen},
- {"google.com", "google.com.", nil},
+ {"google..com", "", errNonCanonicalName},
+ {"google.com", "", errNonCanonicalName},
{"google..com.", "", errZeroSegLen},
{"google.com.", "google.com.", nil},
{".google.com.", "", errZeroSegLen},
@@ -86,29 +127,91 @@ func TestNamePackUnpack(t *testing.T) {
}
for _, test := range tests {
- buf, err := packName(make([]byte, 0, 30), test.in, map[string]int{})
+ in := mustNewName(test.in)
+ want := mustNewName(test.want)
+ buf, err := in.pack(make([]byte, 0, 30), map[string]int{})
if err != test.err {
- t.Errorf("Packing of %s: got err = %v, want err = %v", test.in, err, test.err)
+ t.Errorf("Packing of %q: got err = %v, want err = %v", test.in, err, test.err)
continue
}
if test.err != nil {
continue
}
- got, n, err := unpackName(buf, 0)
+ var got Name
+ n, err := got.unpack(buf, 0)
if err != nil {
- t.Errorf("Unpacking for %s failed: %v", test.in, err)
+ t.Errorf("Unpacking for %q failed: %v", test.in, err)
continue
}
if n != len(buf) {
t.Errorf(
- "Unpacked different amount than packed for %s: got n = %d, want = %d",
+ "Unpacked different amount than packed for %q: got n = %d, want = %d",
test.in,
n,
len(buf),
)
}
- if got != test.want {
- t.Errorf("Unpacking packing of %s: got = %s, want = %s", test.in, got, test.want)
+ if got != want {
+ t.Errorf("Unpacking packing of %q: got = %#v, want = %#v", test.in, got, want)
+ }
+ }
+}
+
+func checkErrorPrefix(err error, prefix string) bool {
+ e, ok := err.(*nestedError)
+ return ok && e.s == prefix
+}
+
+func TestHeaderUnpackError(t *testing.T) {
+ wants := []string{
+ "id",
+ "bits",
+ "questions",
+ "answers",
+ "authorities",
+ "additionals",
+ }
+ var buf []byte
+ var h header
+ for _, want := range wants {
+ n, err := h.unpack(buf, 0)
+ if n != 0 || !checkErrorPrefix(err, want) {
+ t.Errorf("got h.unpack([%d]byte, 0) = %d, %v, want = 0, %s", len(buf), n, err, want)
+ }
+ buf = append(buf, 0, 0)
+ }
+}
+
+func TestParserStart(t *testing.T) {
+ const want = "unpacking header"
+ var p Parser
+ for i := 0; i <= 1; i++ {
+ _, err := p.Start([]byte{})
+ if !checkErrorPrefix(err, want) {
+ t.Errorf("got p.Start(nil) = _, %v, want = _, %s", err, want)
+ }
+ }
+}
+
+func TestResourceNotStarted(t *testing.T) {
+ tests := []struct {
+ name string
+ fn func(*Parser) error
+ }{
+ {"CNAMEResource", func(p *Parser) error { _, err := p.CNAMEResource(); return err }},
+ {"MXResource", func(p *Parser) error { _, err := p.MXResource(); return err }},
+ {"NSResource", func(p *Parser) error { _, err := p.NSResource(); return err }},
+ {"PTRResource", func(p *Parser) error { _, err := p.PTRResource(); return err }},
+ {"SOAResource", func(p *Parser) error { _, err := p.SOAResource(); return err }},
+ {"TXTResource", func(p *Parser) error { _, err := p.TXTResource(); return err }},
+ {"SRVResource", func(p *Parser) error { _, err := p.SRVResource(); return err }},
+ {"AResource", func(p *Parser) error { _, err := p.AResource(); return err }},
+ {"AAAAResource", func(p *Parser) error { _, err := p.AAAAResource(); return err }},
+ }
+
+ for _, test := range tests {
+ if err := test.fn(&Parser{}); err != ErrNotStarted {
+ t.Errorf("got _, %v = p.%s(), want = _, %v", err, test.name, ErrNotStarted)
}
}
}
@@ -118,7 +221,7 @@ func TestDNSPackUnpack(t *testing.T) {
{
Questions: []Question{
{
- Name: ".",
+ Name: mustNewName("."),
Type: TypeAAAA,
Class: ClassINET,
},
@@ -174,6 +277,69 @@ func TestSkipAll(t *testing.T) {
}
}
+func TestSkipEach(t *testing.T) {
+ msg := smallTestMsg()
+
+ buf, err := msg.Pack()
+ if err != nil {
+ t.Fatal("Packing test message:", err)
+ }
+ var p Parser
+ if _, err := p.Start(buf); err != nil {
+ t.Fatal(err)
+ }
+
+ tests := []struct {
+ name string
+ f func() error
+ }{
+ {"SkipQuestion", p.SkipQuestion},
+ {"SkipAnswer", p.SkipAnswer},
+ {"SkipAuthority", p.SkipAuthority},
+ {"SkipAdditional", p.SkipAdditional},
+ }
+ for _, test := range tests {
+ if err := test.f(); err != nil {
+ t.Errorf("First call: got %s() = %v, want = %v", test.name, err, nil)
+ }
+ if err := test.f(); err != ErrSectionDone {
+ t.Errorf("Second call: got %s() = %v, want = %v", test.name, err, ErrSectionDone)
+ }
+ }
+}
+
+func TestSkipAfterRead(t *testing.T) {
+ msg := smallTestMsg()
+
+ buf, err := msg.Pack()
+ if err != nil {
+ t.Fatal("Packing test message:", err)
+ }
+ var p Parser
+ if _, err := p.Start(buf); err != nil {
+ t.Fatal(err)
+ }
+
+ tests := []struct {
+ name string
+ skip func() error
+ read func() error
+ }{
+ {"Question", p.SkipQuestion, func() error { _, err := p.Question(); return err }},
+ {"Answer", p.SkipAnswer, func() error { _, err := p.Answer(); return err }},
+ {"Authority", p.SkipAuthority, func() error { _, err := p.Authority(); return err }},
+ {"Additional", p.SkipAdditional, func() error { _, err := p.Additional(); return err }},
+ }
+ for _, test := range tests {
+ if err := test.read(); err != nil {
+ t.Errorf("Got %s() = _, %v, want = _, %v", test.name, err, nil)
+ }
+ if err := test.skip(); err != ErrSectionDone {
+ t.Errorf("Got Skip%s() = %v, want = %v", test.name, err, ErrSectionDone)
+ }
+ }
+}
+
func TestSkipNotStarted(t *testing.T) {
var p Parser
@@ -238,206 +404,581 @@ func TestTooManyRecords(t *testing.T) {
}
func TestVeryLongTxt(t *testing.T) {
- want := &TXTResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
+ want := Resource{
+ ResourceHeader{
+ Name: mustNewName("foo.bar.example.com."),
Type: TypeTXT,
Class: ClassINET,
},
- Txt: loremIpsum,
+ &TXTResource{loremIpsum},
}
- buf, err := packResource(make([]byte, 0, 8000), want, map[string]int{})
+ buf, err := want.pack(make([]byte, 0, 8000), map[string]int{})
if err != nil {
t.Fatal("Packing failed:", err)
}
- var hdr ResourceHeader
- off, err := hdr.unpack(buf, 0)
+ var got Resource
+ off, err := got.Header.unpack(buf, 0)
if err != nil {
t.Fatal("Unpacking ResourceHeader failed:", err)
}
- got, n, err := unpackResource(buf, off, hdr)
+ body, n, err := unpackResourceBody(buf, off, got.Header)
if err != nil {
t.Fatal("Unpacking failed:", err)
}
+ got.Body = body
if n != len(buf) {
t.Errorf("Unpacked different amount than packed: got n = %d, want = %d", n, len(buf))
}
if !reflect.DeepEqual(got, want) {
- t.Errorf("Got = %+v, want = %+v", got, want)
+ t.Errorf("Got = %#v, want = %#v", got, want)
}
}
-func ExampleHeaderSearch() {
+func TestStartError(t *testing.T) {
+ tests := []struct {
+ name string
+ fn func(*Builder) error
+ }{
+ {"Questions", func(b *Builder) error { return b.StartQuestions() }},
+ {"Answers", func(b *Builder) error { return b.StartAnswers() }},
+ {"Authorities", func(b *Builder) error { return b.StartAuthorities() }},
+ {"Additionals", func(b *Builder) error { return b.StartAdditionals() }},
+ }
+
+ envs := []struct {
+ name string
+ fn func() *Builder
+ want error
+ }{
+ {"sectionNotStarted", func() *Builder { return &Builder{section: sectionNotStarted} }, ErrNotStarted},
+ {"sectionDone", func() *Builder { return &Builder{section: sectionDone} }, ErrSectionDone},
+ }
+
+ for _, env := range envs {
+ for _, test := range tests {
+ if got := test.fn(env.fn()); got != env.want {
+ t.Errorf("got Builder{%s}.Start%s = %v, want = %v", env.name, test.name, got, env.want)
+ }
+ }
+ }
+}
+
+func TestBuilderResourceError(t *testing.T) {
+ tests := []struct {
+ name string
+ fn func(*Builder) error
+ }{
+ {"CNAMEResource", func(b *Builder) error { return b.CNAMEResource(ResourceHeader{}, CNAMEResource{}) }},
+ {"MXResource", func(b *Builder) error { return b.MXResource(ResourceHeader{}, MXResource{}) }},
+ {"NSResource", func(b *Builder) error { return b.NSResource(ResourceHeader{}, NSResource{}) }},
+ {"PTRResource", func(b *Builder) error { return b.PTRResource(ResourceHeader{}, PTRResource{}) }},
+ {"SOAResource", func(b *Builder) error { return b.SOAResource(ResourceHeader{}, SOAResource{}) }},
+ {"TXTResource", func(b *Builder) error { return b.TXTResource(ResourceHeader{}, TXTResource{}) }},
+ {"SRVResource", func(b *Builder) error { return b.SRVResource(ResourceHeader{}, SRVResource{}) }},
+ {"AResource", func(b *Builder) error { return b.AResource(ResourceHeader{}, AResource{}) }},
+ {"AAAAResource", func(b *Builder) error { return b.AAAAResource(ResourceHeader{}, AAAAResource{}) }},
+ }
+
+ envs := []struct {
+ name string
+ fn func() *Builder
+ want error
+ }{
+ {"sectionNotStarted", func() *Builder { return &Builder{section: sectionNotStarted} }, ErrNotStarted},
+ {"sectionHeader", func() *Builder { return &Builder{section: sectionHeader} }, ErrNotStarted},
+ {"sectionQuestions", func() *Builder { return &Builder{section: sectionQuestions} }, ErrNotStarted},
+ {"sectionDone", func() *Builder { return &Builder{section: sectionDone} }, ErrSectionDone},
+ }
+
+ for _, env := range envs {
+ for _, test := range tests {
+ if got := test.fn(env.fn()); got != env.want {
+ t.Errorf("got Builder{%s}.%s = %v, want = %v", env.name, test.name, got, env.want)
+ }
+ }
+ }
+}
+
+func TestFinishError(t *testing.T) {
+ var b Builder
+ want := ErrNotStarted
+ if _, got := b.Finish(); got != want {
+ t.Errorf("got Builder{}.Finish() = %v, want = %v", got, want)
+ }
+}
+
+func TestBuilder(t *testing.T) {
+ msg := largeTestMsg()
+ want, err := msg.Pack()
+ if err != nil {
+ t.Fatal("Packing without builder:", err)
+ }
+
+ var b Builder
+ b.Start(nil, msg.Header)
+
+ if err := b.StartQuestions(); err != nil {
+ t.Fatal("b.StartQuestions():", err)
+ }
+ for _, q := range msg.Questions {
+ if err := b.Question(q); err != nil {
+ t.Fatalf("b.Question(%#v): %v", q, err)
+ }
+ }
+
+ if err := b.StartAnswers(); err != nil {
+ t.Fatal("b.StartAnswers():", err)
+ }
+ for _, a := range msg.Answers {
+ switch a.Header.Type {
+ case TypeA:
+ if err := b.AResource(a.Header, *a.Body.(*AResource)); err != nil {
+ t.Fatalf("b.AResource(%#v): %v", a, err)
+ }
+ case TypeNS:
+ if err := b.NSResource(a.Header, *a.Body.(*NSResource)); err != nil {
+ t.Fatalf("b.NSResource(%#v): %v", a, err)
+ }
+ case TypeCNAME:
+ if err := b.CNAMEResource(a.Header, *a.Body.(*CNAMEResource)); err != nil {
+ t.Fatalf("b.CNAMEResource(%#v): %v", a, err)
+ }
+ case TypeSOA:
+ if err := b.SOAResource(a.Header, *a.Body.(*SOAResource)); err != nil {
+ t.Fatalf("b.SOAResource(%#v): %v", a, err)
+ }
+ case TypePTR:
+ if err := b.PTRResource(a.Header, *a.Body.(*PTRResource)); err != nil {
+ t.Fatalf("b.PTRResource(%#v): %v", a, err)
+ }
+ case TypeMX:
+ if err := b.MXResource(a.Header, *a.Body.(*MXResource)); err != nil {
+ t.Fatalf("b.MXResource(%#v): %v", a, err)
+ }
+ case TypeTXT:
+ if err := b.TXTResource(a.Header, *a.Body.(*TXTResource)); err != nil {
+ t.Fatalf("b.TXTResource(%#v): %v", a, err)
+ }
+ case TypeAAAA:
+ if err := b.AAAAResource(a.Header, *a.Body.(*AAAAResource)); err != nil {
+ t.Fatalf("b.AAAAResource(%#v): %v", a, err)
+ }
+ case TypeSRV:
+ if err := b.SRVResource(a.Header, *a.Body.(*SRVResource)); err != nil {
+ t.Fatalf("b.SRVResource(%#v): %v", a, err)
+ }
+ }
+ }
+
+ if err := b.StartAuthorities(); err != nil {
+ t.Fatal("b.StartAuthorities():", err)
+ }
+ for _, a := range msg.Authorities {
+ if err := b.NSResource(a.Header, *a.Body.(*NSResource)); err != nil {
+ t.Fatalf("b.NSResource(%#v): %v", a, err)
+ }
+ }
+
+ if err := b.StartAdditionals(); err != nil {
+ t.Fatal("b.StartAdditionals():", err)
+ }
+ for _, a := range msg.Additionals {
+ if err := b.TXTResource(a.Header, *a.Body.(*TXTResource)); err != nil {
+ t.Fatalf("b.TXTResource(%#v): %v", a, err)
+ }
+ }
+
+ got, err := b.Finish()
+ if err != nil {
+ t.Fatal("b.Finish():", err)
+ }
+ if !bytes.Equal(got, want) {
+ t.Fatalf("Got from Builder: %#v\nwant = %#v", got, want)
+ }
+}
+
+func TestResourcePack(t *testing.T) {
+ for _, tt := range []struct {
+ m Message
+ err error
+ }{
+ {
+ Message{
+ Questions: []Question{
+ {
+ Name: mustNewName("."),
+ Type: TypeAAAA,
+ Class: ClassINET,
+ },
+ },
+ Answers: []Resource{{ResourceHeader{}, nil}},
+ },
+ &nestedError{"packing Answer", errNilResouceBody},
+ },
+ {
+ Message{
+ Questions: []Question{
+ {
+ Name: mustNewName("."),
+ Type: TypeAAAA,
+ Class: ClassINET,
+ },
+ },
+ Authorities: []Resource{{ResourceHeader{}, (*NSResource)(nil)}},
+ },
+ &nestedError{"packing Authority",
+ &nestedError{"ResourceHeader",
+ &nestedError{"Name", errNonCanonicalName},
+ },
+ },
+ },
+ {
+ Message{
+ Questions: []Question{
+ {
+ Name: mustNewName("."),
+ Type: TypeA,
+ Class: ClassINET,
+ },
+ },
+ Additionals: []Resource{{ResourceHeader{}, nil}},
+ },
+ &nestedError{"packing Additional", errNilResouceBody},
+ },
+ } {
+ _, err := tt.m.Pack()
+ if !reflect.DeepEqual(err, tt.err) {
+ t.Errorf("got %v for %v; want %v", err, tt.m, tt.err)
+ }
+ }
+}
+
+func BenchmarkParsing(b *testing.B) {
+ b.ReportAllocs()
+
+ name := mustNewName("foo.bar.example.com.")
msg := Message{
Header: Header{Response: true, Authoritative: true},
Questions: []Question{
{
- Name: "foo.bar.example.com.",
- Type: TypeA,
- Class: ClassINET,
- },
- {
- Name: "bar.example.com.",
+ Name: name,
Type: TypeA,
Class: ClassINET,
},
},
Answers: []Resource{
- &AResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
- Type: TypeA,
+ {
+ ResourceHeader{
+ Name: name,
Class: ClassINET,
},
- A: [4]byte{127, 0, 0, 1},
+ &AResource{[4]byte{}},
},
- &AResource{
- ResourceHeader: ResourceHeader{
- Name: "bar.example.com.",
- Type: TypeA,
+ {
+ ResourceHeader{
+ Name: name,
Class: ClassINET,
},
- A: [4]byte{127, 0, 0, 2},
+ &AAAAResource{[16]byte{}},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Class: ClassINET,
+ },
+ &CNAMEResource{name},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Class: ClassINET,
+ },
+ &NSResource{name},
},
},
}
buf, err := msg.Pack()
if err != nil {
- panic(err)
+ b.Fatal("msg.Pack():", err)
}
- wantName := "bar.example.com."
-
- var p Parser
- if _, err := p.Start(buf); err != nil {
- panic(err)
- }
-
- for {
- q, err := p.Question()
- if err == ErrSectionDone {
- break
- }
- if err != nil {
- panic(err)
+ for i := 0; i < b.N; i++ {
+ var p Parser
+ if _, err := p.Start(buf); err != nil {
+ b.Fatal("p.Start(buf):", err)
}
- if q.Name != wantName {
- continue
+ for {
+ _, err := p.Question()
+ if err == ErrSectionDone {
+ break
+ }
+ if err != nil {
+ b.Fatal("p.Question():", err)
+ }
}
- fmt.Println("Found question for name", wantName)
- if err := p.SkipAllQuestions(); err != nil {
- panic(err)
- }
- break
- }
-
- var gotIPs []net.IP
- for {
- h, err := p.AnswerHeader()
- if err == ErrSectionDone {
- break
- }
- if err != nil {
- panic(err)
- }
-
- if (h.Type != TypeA && h.Type != TypeAAAA) || h.Class != ClassINET {
- continue
- }
-
- if !strings.EqualFold(h.Name, wantName) {
- if err := p.SkipAnswer(); err != nil {
+ for {
+ h, err := p.AnswerHeader()
+ if err == ErrSectionDone {
+ break
+ }
+ if err != nil {
panic(err)
}
- continue
- }
- a, err := p.Answer()
- if err != nil {
- panic(err)
- }
- switch r := a.(type) {
- default:
- panic(fmt.Sprintf("unknown type: %T", r))
- case *AResource:
- gotIPs = append(gotIPs, r.A[:])
- case *AAAAResource:
- gotIPs = append(gotIPs, r.AAAA[:])
+ switch h.Type {
+ case TypeA:
+ if _, err := p.AResource(); err != nil {
+ b.Fatal("p.AResource():", err)
+ }
+ case TypeAAAA:
+ if _, err := p.AAAAResource(); err != nil {
+ b.Fatal("p.AAAAResource():", err)
+ }
+ case TypeCNAME:
+ if _, err := p.CNAMEResource(); err != nil {
+ b.Fatal("p.CNAMEResource():", err)
+ }
+ case TypeNS:
+ if _, err := p.NSResource(); err != nil {
+ b.Fatal("p.NSResource():", err)
+ }
+ default:
+ b.Fatalf("unknown type: %T", h)
+ }
}
}
-
- fmt.Printf("Found A/AAAA records for name %s: %v\n", wantName, gotIPs)
-
- // Output:
- // Found question for name bar.example.com.
- // Found A/AAAA records for name bar.example.com.: [127.0.0.2]
}
-func largeTestMsg() Message {
+func BenchmarkBuilding(b *testing.B) {
+ b.ReportAllocs()
+
+ name := mustNewName("foo.bar.example.com.")
+ buf := make([]byte, 0, packStartingCap)
+
+ for i := 0; i < b.N; i++ {
+ var bld Builder
+ bld.StartWithoutCompression(buf, Header{Response: true, Authoritative: true})
+
+ if err := bld.StartQuestions(); err != nil {
+ b.Fatal("bld.StartQuestions():", err)
+ }
+ q := Question{
+ Name: name,
+ Type: TypeA,
+ Class: ClassINET,
+ }
+ if err := bld.Question(q); err != nil {
+ b.Fatalf("bld.Question(%+v): %v", q, err)
+ }
+
+ hdr := ResourceHeader{
+ Name: name,
+ Class: ClassINET,
+ }
+ if err := bld.StartAnswers(); err != nil {
+ b.Fatal("bld.StartQuestions():", err)
+ }
+
+ ar := AResource{[4]byte{}}
+ if err := bld.AResource(hdr, ar); err != nil {
+ b.Fatalf("bld.AResource(%+v, %+v): %v", hdr, ar, err)
+ }
+
+ aaar := AAAAResource{[16]byte{}}
+ if err := bld.AAAAResource(hdr, aaar); err != nil {
+ b.Fatalf("bld.AAAAResource(%+v, %+v): %v", hdr, aaar, err)
+ }
+
+ cnr := CNAMEResource{name}
+ if err := bld.CNAMEResource(hdr, cnr); err != nil {
+ b.Fatalf("bld.CNAMEResource(%+v, %+v): %v", hdr, cnr, err)
+ }
+
+ nsr := NSResource{name}
+ if err := bld.NSResource(hdr, nsr); err != nil {
+ b.Fatalf("bld.NSResource(%+v, %+v): %v", hdr, nsr, err)
+ }
+
+ if _, err := bld.Finish(); err != nil {
+ b.Fatal("bld.Finish():", err)
+ }
+ }
+}
+
+func smallTestMsg() Message {
+ name := mustNewName("example.com.")
return Message{
Header: Header{Response: true, Authoritative: true},
Questions: []Question{
{
- Name: "foo.bar.example.com.",
+ Name: name,
Type: TypeA,
Class: ClassINET,
},
},
Answers: []Resource{
- &AResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
+ {
+ ResourceHeader{
+ Name: name,
Type: TypeA,
Class: ClassINET,
},
- A: [4]byte{127, 0, 0, 1},
- },
- &AResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
- Type: TypeA,
- Class: ClassINET,
- },
- A: [4]byte{127, 0, 0, 2},
+ &AResource{[4]byte{127, 0, 0, 1}},
},
},
Authorities: []Resource{
- &NSResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
- Type: TypeNS,
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeA,
Class: ClassINET,
},
- NS: "ns1.example.com.",
- },
- &NSResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
- Type: TypeNS,
- Class: ClassINET,
- },
- NS: "ns2.example.com.",
+ &AResource{[4]byte{127, 0, 0, 1}},
},
},
Additionals: []Resource{
- &TXTResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
- Type: TypeTXT,
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeA,
Class: ClassINET,
},
- Txt: "So Long, and Thanks for All the Fish",
+ &AResource{[4]byte{127, 0, 0, 1}},
},
- &TXTResource{
- ResourceHeader: ResourceHeader{
- Name: "foo.bar.example.com.",
+ },
+ }
+}
+
+func largeTestMsg() Message {
+ name := mustNewName("foo.bar.example.com.")
+ return Message{
+ Header: Header{Response: true, Authoritative: true},
+ Questions: []Question{
+ {
+ Name: name,
+ Type: TypeA,
+ Class: ClassINET,
+ },
+ },
+ Answers: []Resource{
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeA,
+ Class: ClassINET,
+ },
+ &AResource{[4]byte{127, 0, 0, 1}},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeA,
+ Class: ClassINET,
+ },
+ &AResource{[4]byte{127, 0, 0, 2}},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeAAAA,
+ Class: ClassINET,
+ },
+ &AAAAResource{[16]byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeCNAME,
+ Class: ClassINET,
+ },
+ &CNAMEResource{mustNewName("alias.example.com.")},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeSOA,
+ Class: ClassINET,
+ },
+ &SOAResource{
+ NS: mustNewName("ns1.example.com."),
+ MBox: mustNewName("mb.example.com."),
+ Serial: 1,
+ Refresh: 2,
+ Retry: 3,
+ Expire: 4,
+ MinTTL: 5,
+ },
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypePTR,
+ Class: ClassINET,
+ },
+ &PTRResource{mustNewName("ptr.example.com.")},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeMX,
+ Class: ClassINET,
+ },
+ &MXResource{
+ 7,
+ mustNewName("mx.example.com."),
+ },
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeSRV,
+ Class: ClassINET,
+ },
+ &SRVResource{
+ 8,
+ 9,
+ 11,
+ mustNewName("srv.example.com."),
+ },
+ },
+ },
+ Authorities: []Resource{
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeNS,
+ Class: ClassINET,
+ },
+ &NSResource{mustNewName("ns1.example.com.")},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeNS,
+ Class: ClassINET,
+ },
+ &NSResource{mustNewName("ns2.example.com.")},
+ },
+ },
+ Additionals: []Resource{
+ {
+ ResourceHeader{
+ Name: name,
Type: TypeTXT,
Class: ClassINET,
},
- Txt: "Hamster Huey and the Gooey Kablooie",
+ &TXTResource{"So Long, and Thanks for All the Fish"},
+ },
+ {
+ ResourceHeader{
+ Name: name,
+ Type: TypeTXT,
+ Class: ClassINET,
+ },
+ &TXTResource{"Hamster Huey and the Gooey Kablooie"},
},
},
}
diff --git a/vendor/golang.org/x/net/http2/ciphers.go b/vendor/golang.org/x/net/http2/ciphers.go
new file mode 100644
index 000000000..698860b77
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/ciphers.go
@@ -0,0 +1,641 @@
+// Copyright 2017 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
+
+// A list of the possible cipher suite ids. Taken from
+// http://www.iana.org/assignments/tls-parameters/tls-parameters.txt
+
+const (
+ cipher_TLS_NULL_WITH_NULL_NULL uint16 = 0x0000
+ cipher_TLS_RSA_WITH_NULL_MD5 uint16 = 0x0001
+ cipher_TLS_RSA_WITH_NULL_SHA uint16 = 0x0002
+ cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5 uint16 = 0x0003
+ cipher_TLS_RSA_WITH_RC4_128_MD5 uint16 = 0x0004
+ cipher_TLS_RSA_WITH_RC4_128_SHA uint16 = 0x0005
+ cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5 uint16 = 0x0006
+ cipher_TLS_RSA_WITH_IDEA_CBC_SHA uint16 = 0x0007
+ cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0008
+ cipher_TLS_RSA_WITH_DES_CBC_SHA uint16 = 0x0009
+ cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x000A
+ cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x000B
+ cipher_TLS_DH_DSS_WITH_DES_CBC_SHA uint16 = 0x000C
+ cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0x000D
+ cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x000E
+ cipher_TLS_DH_RSA_WITH_DES_CBC_SHA uint16 = 0x000F
+ cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x0010
+ cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0011
+ cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA uint16 = 0x0012
+ cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0x0013
+ cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0014
+ cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA uint16 = 0x0015
+ cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0x0016
+ cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5 uint16 = 0x0017
+ cipher_TLS_DH_anon_WITH_RC4_128_MD5 uint16 = 0x0018
+ cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA uint16 = 0x0019
+ cipher_TLS_DH_anon_WITH_DES_CBC_SHA uint16 = 0x001A
+ cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA uint16 = 0x001B
+ // Reserved uint16 = 0x001C-1D
+ cipher_TLS_KRB5_WITH_DES_CBC_SHA uint16 = 0x001E
+ cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA uint16 = 0x001F
+ cipher_TLS_KRB5_WITH_RC4_128_SHA uint16 = 0x0020
+ cipher_TLS_KRB5_WITH_IDEA_CBC_SHA uint16 = 0x0021
+ cipher_TLS_KRB5_WITH_DES_CBC_MD5 uint16 = 0x0022
+ cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5 uint16 = 0x0023
+ cipher_TLS_KRB5_WITH_RC4_128_MD5 uint16 = 0x0024
+ cipher_TLS_KRB5_WITH_IDEA_CBC_MD5 uint16 = 0x0025
+ cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA uint16 = 0x0026
+ cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA uint16 = 0x0027
+ cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA uint16 = 0x0028
+ cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5 uint16 = 0x0029
+ cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5 uint16 = 0x002A
+ cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5 uint16 = 0x002B
+ cipher_TLS_PSK_WITH_NULL_SHA uint16 = 0x002C
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA uint16 = 0x002D
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA uint16 = 0x002E
+ cipher_TLS_RSA_WITH_AES_128_CBC_SHA uint16 = 0x002F
+ cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA uint16 = 0x0030
+ cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA uint16 = 0x0031
+ cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA uint16 = 0x0032
+ cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0x0033
+ cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA uint16 = 0x0034
+ cipher_TLS_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0035
+ cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA uint16 = 0x0036
+ cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0037
+ cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA uint16 = 0x0038
+ cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0x0039
+ cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA uint16 = 0x003A
+ cipher_TLS_RSA_WITH_NULL_SHA256 uint16 = 0x003B
+ cipher_TLS_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x003C
+ cipher_TLS_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x003D
+ cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256 uint16 = 0x003E
+ cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x003F
+ cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 uint16 = 0x0040
+ cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0041
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0042
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0043
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0044
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0045
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA uint16 = 0x0046
+ // Reserved uint16 = 0x0047-4F
+ // Reserved uint16 = 0x0050-58
+ // Reserved uint16 = 0x0059-5C
+ // Unassigned uint16 = 0x005D-5F
+ // Reserved uint16 = 0x0060-66
+ cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0x0067
+ cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256 uint16 = 0x0068
+ cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x0069
+ cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256 uint16 = 0x006A
+ cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256 uint16 = 0x006B
+ cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256 uint16 = 0x006C
+ cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256 uint16 = 0x006D
+ // Unassigned uint16 = 0x006E-83
+ cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0084
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0085
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0086
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0087
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0088
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA uint16 = 0x0089
+ cipher_TLS_PSK_WITH_RC4_128_SHA uint16 = 0x008A
+ cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x008B
+ cipher_TLS_PSK_WITH_AES_128_CBC_SHA uint16 = 0x008C
+ cipher_TLS_PSK_WITH_AES_256_CBC_SHA uint16 = 0x008D
+ cipher_TLS_DHE_PSK_WITH_RC4_128_SHA uint16 = 0x008E
+ cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x008F
+ cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA uint16 = 0x0090
+ cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA uint16 = 0x0091
+ cipher_TLS_RSA_PSK_WITH_RC4_128_SHA uint16 = 0x0092
+ cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0x0093
+ cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA uint16 = 0x0094
+ cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA uint16 = 0x0095
+ cipher_TLS_RSA_WITH_SEED_CBC_SHA uint16 = 0x0096
+ cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA uint16 = 0x0097
+ cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA uint16 = 0x0098
+ cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA uint16 = 0x0099
+ cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA uint16 = 0x009A
+ cipher_TLS_DH_anon_WITH_SEED_CBC_SHA uint16 = 0x009B
+ cipher_TLS_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x009C
+ cipher_TLS_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x009D
+ cipher_TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x009E
+ cipher_TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x009F
+ cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0x00A0
+ cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0x00A1
+ cipher_TLS_DHE_DSS_WITH_AES_128_GCM_SHA256 uint16 = 0x00A2
+ cipher_TLS_DHE_DSS_WITH_AES_256_GCM_SHA384 uint16 = 0x00A3
+ cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256 uint16 = 0x00A4
+ cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384 uint16 = 0x00A5
+ cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256 uint16 = 0x00A6
+ cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384 uint16 = 0x00A7
+ cipher_TLS_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00A8
+ cipher_TLS_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00A9
+ cipher_TLS_DHE_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00AA
+ cipher_TLS_DHE_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00AB
+ cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256 uint16 = 0x00AC
+ cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384 uint16 = 0x00AD
+ cipher_TLS_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00AE
+ cipher_TLS_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00AF
+ cipher_TLS_PSK_WITH_NULL_SHA256 uint16 = 0x00B0
+ cipher_TLS_PSK_WITH_NULL_SHA384 uint16 = 0x00B1
+ cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00B2
+ cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00B3
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA256 uint16 = 0x00B4
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA384 uint16 = 0x00B5
+ cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0x00B6
+ cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0x00B7
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA256 uint16 = 0x00B8
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA384 uint16 = 0x00B9
+ cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BA
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BB
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BC
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BD
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BE
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0x00BF
+ cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C0
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C1
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C2
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C3
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C4
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256 uint16 = 0x00C5
+ // Unassigned uint16 = 0x00C6-FE
+ cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV uint16 = 0x00FF
+ // Unassigned uint16 = 0x01-55,*
+ cipher_TLS_FALLBACK_SCSV uint16 = 0x5600
+ // Unassigned uint16 = 0x5601 - 0xC000
+ cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA uint16 = 0xC001
+ cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA uint16 = 0xC002
+ cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC003
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xC004
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xC005
+ cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA uint16 = 0xC006
+ cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA uint16 = 0xC007
+ cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC008
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA uint16 = 0xC009
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA uint16 = 0xC00A
+ cipher_TLS_ECDH_RSA_WITH_NULL_SHA uint16 = 0xC00B
+ cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA uint16 = 0xC00C
+ cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC00D
+ cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC00E
+ cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC00F
+ cipher_TLS_ECDHE_RSA_WITH_NULL_SHA uint16 = 0xC010
+ cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA uint16 = 0xC011
+ cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC012
+ cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC013
+ cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC014
+ cipher_TLS_ECDH_anon_WITH_NULL_SHA uint16 = 0xC015
+ cipher_TLS_ECDH_anon_WITH_RC4_128_SHA uint16 = 0xC016
+ cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA uint16 = 0xC017
+ cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA uint16 = 0xC018
+ cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA uint16 = 0xC019
+ cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01A
+ cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01B
+ cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA uint16 = 0xC01C
+ cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA uint16 = 0xC01D
+ cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA uint16 = 0xC01E
+ cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA uint16 = 0xC01F
+ cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA uint16 = 0xC020
+ cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA uint16 = 0xC021
+ cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA uint16 = 0xC022
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC023
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC024
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC025
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC026
+ cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC027
+ cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC028
+ cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 uint16 = 0xC029
+ cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384 uint16 = 0xC02A
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02B
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC02C
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02D
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC02E
+ cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC02F
+ cipher_TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC030
+ cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256 uint16 = 0xC031
+ cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384 uint16 = 0xC032
+ cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA uint16 = 0xC033
+ cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA uint16 = 0xC034
+ cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA uint16 = 0xC035
+ cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA uint16 = 0xC036
+ cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256 uint16 = 0xC037
+ cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384 uint16 = 0xC038
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA uint16 = 0xC039
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256 uint16 = 0xC03A
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384 uint16 = 0xC03B
+ cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC03C
+ cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC03D
+ cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC03E
+ cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC03F
+ cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC040
+ cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC041
+ cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC042
+ cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC043
+ cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC044
+ cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC045
+ cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC046
+ cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC047
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC048
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC049
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04A
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04B
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04C
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04D
+ cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC04E
+ cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC04F
+ cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC050
+ cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC051
+ cipher_TLS_DHE_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC052
+ cipher_TLS_DHE_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC053
+ cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC054
+ cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC055
+ cipher_TLS_DHE_DSS_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC056
+ cipher_TLS_DHE_DSS_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC057
+ cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC058
+ cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC059
+ cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05A
+ cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05B
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05C
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05D
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC05E
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC05F
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC060
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC061
+ cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC062
+ cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC063
+ cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC064
+ cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC065
+ cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC066
+ cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC067
+ cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC068
+ cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC069
+ cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06A
+ cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06B
+ cipher_TLS_DHE_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06C
+ cipher_TLS_DHE_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06D
+ cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256 uint16 = 0xC06E
+ cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384 uint16 = 0xC06F
+ cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256 uint16 = 0xC070
+ cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384 uint16 = 0xC071
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC072
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC073
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC074
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC075
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC076
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC077
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC078
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC079
+ cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07A
+ cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07B
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07C
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07D
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC07E
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC07F
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC080
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC081
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC082
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC083
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC084
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC085
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC086
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC087
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC088
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC089
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08A
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08B
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08C
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08D
+ cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC08E
+ cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC08F
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC090
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC091
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256 uint16 = 0xC092
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384 uint16 = 0xC093
+ cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC094
+ cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC095
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC096
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC097
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC098
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC099
+ cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256 uint16 = 0xC09A
+ cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384 uint16 = 0xC09B
+ cipher_TLS_RSA_WITH_AES_128_CCM uint16 = 0xC09C
+ cipher_TLS_RSA_WITH_AES_256_CCM uint16 = 0xC09D
+ cipher_TLS_DHE_RSA_WITH_AES_128_CCM uint16 = 0xC09E
+ cipher_TLS_DHE_RSA_WITH_AES_256_CCM uint16 = 0xC09F
+ cipher_TLS_RSA_WITH_AES_128_CCM_8 uint16 = 0xC0A0
+ cipher_TLS_RSA_WITH_AES_256_CCM_8 uint16 = 0xC0A1
+ cipher_TLS_DHE_RSA_WITH_AES_128_CCM_8 uint16 = 0xC0A2
+ cipher_TLS_DHE_RSA_WITH_AES_256_CCM_8 uint16 = 0xC0A3
+ cipher_TLS_PSK_WITH_AES_128_CCM uint16 = 0xC0A4
+ cipher_TLS_PSK_WITH_AES_256_CCM uint16 = 0xC0A5
+ cipher_TLS_DHE_PSK_WITH_AES_128_CCM uint16 = 0xC0A6
+ cipher_TLS_DHE_PSK_WITH_AES_256_CCM uint16 = 0xC0A7
+ cipher_TLS_PSK_WITH_AES_128_CCM_8 uint16 = 0xC0A8
+ cipher_TLS_PSK_WITH_AES_256_CCM_8 uint16 = 0xC0A9
+ cipher_TLS_PSK_DHE_WITH_AES_128_CCM_8 uint16 = 0xC0AA
+ cipher_TLS_PSK_DHE_WITH_AES_256_CCM_8 uint16 = 0xC0AB
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM uint16 = 0xC0AC
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM uint16 = 0xC0AD
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM_8 uint16 = 0xC0AE
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CCM_8 uint16 = 0xC0AF
+ // Unassigned uint16 = 0xC0B0-FF
+ // Unassigned uint16 = 0xC1-CB,*
+ // Unassigned uint16 = 0xCC00-A7
+ cipher_TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCA8
+ cipher_TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCA9
+ cipher_TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAA
+ cipher_TLS_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAB
+ cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAC
+ cipher_TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAD
+ cipher_TLS_RSA_PSK_WITH_CHACHA20_POLY1305_SHA256 uint16 = 0xCCAE
+)
+
+// isBadCipher reports whether the cipher is blacklisted by the HTTP/2 spec.
+// References:
+// https://tools.ietf.org/html/rfc7540#appendix-A
+// 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"
+func isBadCipher(cipher uint16) bool {
+ switch cipher {
+ case cipher_TLS_NULL_WITH_NULL_NULL,
+ cipher_TLS_RSA_WITH_NULL_MD5,
+ cipher_TLS_RSA_WITH_NULL_SHA,
+ cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5,
+ cipher_TLS_RSA_WITH_RC4_128_MD5,
+ cipher_TLS_RSA_WITH_RC4_128_SHA,
+ cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
+ cipher_TLS_RSA_WITH_IDEA_CBC_SHA,
+ cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_RSA_WITH_DES_CBC_SHA,
+ cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_DES_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_DES_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5,
+ cipher_TLS_DH_anon_WITH_RC4_128_MD5,
+ cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_DES_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_KRB5_WITH_DES_CBC_SHA,
+ cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_KRB5_WITH_RC4_128_SHA,
+ cipher_TLS_KRB5_WITH_IDEA_CBC_SHA,
+ cipher_TLS_KRB5_WITH_DES_CBC_MD5,
+ cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5,
+ cipher_TLS_KRB5_WITH_RC4_128_MD5,
+ cipher_TLS_KRB5_WITH_IDEA_CBC_MD5,
+ cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
+ cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA,
+ cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
+ cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5,
+ cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5,
+ cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5,
+ cipher_TLS_PSK_WITH_NULL_SHA,
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA,
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA,
+ cipher_TLS_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA,
+ cipher_TLS_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA,
+ cipher_TLS_RSA_WITH_NULL_SHA256,
+ cipher_TLS_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DHE_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_RSA_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_RSA_WITH_SEED_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_SEED_CBC_SHA,
+ cipher_TLS_RSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_RSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_PSK_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_PSK_WITH_NULL_SHA256,
+ cipher_TLS_PSK_WITH_NULL_SHA384,
+ cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA256,
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA384,
+ cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA256,
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA384,
+ cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
+ cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDH_RSA_WITH_NULL_SHA,
+ cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_NULL_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDH_anon_WITH_NULL_SHA,
+ cipher_TLS_ECDH_anon_WITH_RC4_128_SHA,
+ cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA,
+ cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
+ cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384,
+ cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_RSA_WITH_AES_128_CCM,
+ cipher_TLS_RSA_WITH_AES_256_CCM,
+ cipher_TLS_RSA_WITH_AES_128_CCM_8,
+ cipher_TLS_RSA_WITH_AES_256_CCM_8,
+ cipher_TLS_PSK_WITH_AES_128_CCM,
+ cipher_TLS_PSK_WITH_AES_256_CCM,
+ cipher_TLS_PSK_WITH_AES_128_CCM_8,
+ cipher_TLS_PSK_WITH_AES_256_CCM_8:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/golang.org/x/net/http2/ciphers_test.go b/vendor/golang.org/x/net/http2/ciphers_test.go
new file mode 100644
index 000000000..764bbc8c8
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/ciphers_test.go
@@ -0,0 +1,309 @@
+// Copyright 2017 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 "testing"
+
+func TestIsBadCipherBad(t *testing.T) {
+ for _, c := range badCiphers {
+ if !isBadCipher(c) {
+ t.Errorf("Wrong result for isBadCipher(%d), want true", c)
+ }
+ }
+}
+
+// verify we don't give false positives on ciphers not on blacklist
+func TestIsBadCipherGood(t *testing.T) {
+ goodCiphers := map[uint16]string{
+ cipher_TLS_DHE_RSA_WITH_AES_256_CCM: "cipher_TLS_DHE_RSA_WITH_AES_256_CCM",
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM: "cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CCM",
+ cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256: "cipher_TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256",
+ }
+ for c, name := range goodCiphers {
+ if isBadCipher(c) {
+ t.Errorf("Wrong result for isBadCipher(%d) %s, want false", c, name)
+ }
+ }
+}
+
+// copied from https://http2.github.io/http2-spec/#BadCipherSuites,
+var badCiphers = []uint16{
+ cipher_TLS_NULL_WITH_NULL_NULL,
+ cipher_TLS_RSA_WITH_NULL_MD5,
+ cipher_TLS_RSA_WITH_NULL_SHA,
+ cipher_TLS_RSA_EXPORT_WITH_RC4_40_MD5,
+ cipher_TLS_RSA_WITH_RC4_128_MD5,
+ cipher_TLS_RSA_WITH_RC4_128_SHA,
+ cipher_TLS_RSA_EXPORT_WITH_RC2_CBC_40_MD5,
+ cipher_TLS_RSA_WITH_IDEA_CBC_SHA,
+ cipher_TLS_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_RSA_WITH_DES_CBC_SHA,
+ cipher_TLS_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DH_DSS_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_DES_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DH_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_DES_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_DES_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_DES_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DH_anon_EXPORT_WITH_RC4_40_MD5,
+ cipher_TLS_DH_anon_WITH_RC4_128_MD5,
+ cipher_TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_DES_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_KRB5_WITH_DES_CBC_SHA,
+ cipher_TLS_KRB5_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_KRB5_WITH_RC4_128_SHA,
+ cipher_TLS_KRB5_WITH_IDEA_CBC_SHA,
+ cipher_TLS_KRB5_WITH_DES_CBC_MD5,
+ cipher_TLS_KRB5_WITH_3DES_EDE_CBC_MD5,
+ cipher_TLS_KRB5_WITH_RC4_128_MD5,
+ cipher_TLS_KRB5_WITH_IDEA_CBC_MD5,
+ cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA,
+ cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_SHA,
+ cipher_TLS_KRB5_EXPORT_WITH_RC4_40_SHA,
+ cipher_TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5,
+ cipher_TLS_KRB5_EXPORT_WITH_RC2_CBC_40_MD5,
+ cipher_TLS_KRB5_EXPORT_WITH_RC4_40_MD5,
+ cipher_TLS_PSK_WITH_NULL_SHA,
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA,
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA,
+ cipher_TLS_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA,
+ cipher_TLS_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA,
+ cipher_TLS_RSA_WITH_NULL_SHA256,
+ cipher_TLS_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_AES_256_CBC_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA,
+ cipher_TLS_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_DHE_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_DHE_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_RSA_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_RSA_WITH_SEED_CBC_SHA,
+ cipher_TLS_DH_DSS_WITH_SEED_CBC_SHA,
+ cipher_TLS_DH_RSA_WITH_SEED_CBC_SHA,
+ cipher_TLS_DHE_DSS_WITH_SEED_CBC_SHA,
+ cipher_TLS_DHE_RSA_WITH_SEED_CBC_SHA,
+ cipher_TLS_DH_anon_WITH_SEED_CBC_SHA,
+ cipher_TLS_RSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_RSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_DH_RSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_DH_RSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_DH_DSS_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_DH_DSS_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_DH_anon_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_DH_anon_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_PSK_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_RSA_PSK_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_RSA_PSK_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_PSK_WITH_NULL_SHA256,
+ cipher_TLS_PSK_WITH_NULL_SHA384,
+ cipher_TLS_DHE_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_DHE_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA256,
+ cipher_TLS_DHE_PSK_WITH_NULL_SHA384,
+ cipher_TLS_RSA_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_RSA_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA256,
+ cipher_TLS_RSA_PSK_WITH_NULL_SHA384,
+ cipher_TLS_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_CBC_SHA256,
+ cipher_TLS_EMPTY_RENEGOTIATION_INFO_SCSV,
+ cipher_TLS_ECDH_ECDSA_WITH_NULL_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_NULL_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDH_RSA_WITH_NULL_SHA,
+ cipher_TLS_ECDH_RSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_NULL_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_RC4_128_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDH_anon_WITH_NULL_SHA,
+ cipher_TLS_ECDH_anon_WITH_RC4_128_SHA,
+ cipher_TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDH_anon_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDH_anon_WITH_AES_256_CBC_SHA,
+ cipher_TLS_SRP_SHA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_SRP_SHA_RSA_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_SRP_SHA_DSS_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_SRP_SHA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_SRP_SHA_RSA_WITH_AES_128_CBC_SHA,
+ cipher_TLS_SRP_SHA_DSS_WITH_AES_128_CBC_SHA,
+ cipher_TLS_SRP_SHA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_SRP_SHA_RSA_WITH_AES_256_CBC_SHA,
+ cipher_TLS_SRP_SHA_DSS_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_RC4_128_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA,
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_NULL_SHA384,
+ cipher_TLS_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DH_DSS_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DH_DSS_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DH_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DH_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DHE_DSS_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DHE_DSS_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DHE_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DHE_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DH_anon_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DH_anon_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_ECDSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_RSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_RSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_DH_RSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_DH_RSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_DH_DSS_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_DH_DSS_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_DH_anon_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_DH_anon_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_DHE_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_DHE_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_RSA_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_RSA_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_PSK_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_PSK_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_RSA_PSK_WITH_ARIA_128_GCM_SHA256,
+ cipher_TLS_RSA_PSK_WITH_ARIA_256_GCM_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_ARIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_ARIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_RSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_RSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_RSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_DH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_DH_DSS_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_DH_anon_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_PSK_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_GCM_SHA256,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_GCM_SHA384,
+ cipher_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_DHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_RSA_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_128_CBC_SHA256,
+ cipher_TLS_ECDHE_PSK_WITH_CAMELLIA_256_CBC_SHA384,
+ cipher_TLS_RSA_WITH_AES_128_CCM,
+ cipher_TLS_RSA_WITH_AES_256_CCM,
+ cipher_TLS_RSA_WITH_AES_128_CCM_8,
+ cipher_TLS_RSA_WITH_AES_256_CCM_8,
+ cipher_TLS_PSK_WITH_AES_128_CCM,
+ cipher_TLS_PSK_WITH_AES_256_CCM,
+ cipher_TLS_PSK_WITH_AES_128_CCM_8,
+ cipher_TLS_PSK_WITH_AES_256_CCM_8,
+}
diff --git a/vendor/golang.org/x/net/http2/configure_transport.go b/vendor/golang.org/x/net/http2/configure_transport.go
index 4f720f530..b65fc6d42 100644
--- a/vendor/golang.org/x/net/http2/configure_transport.go
+++ b/vendor/golang.org/x/net/http2/configure_transport.go
@@ -56,7 +56,7 @@ func configureTransport(t1 *http.Transport) (*Transport, error) {
}
// registerHTTPSProtocol calls Transport.RegisterProtocol but
-// convering panics into errors.
+// converting panics into errors.
func registerHTTPSProtocol(t *http.Transport, rt http.RoundTripper) (err error) {
defer func() {
if e := recover(); e != nil {
diff --git a/vendor/golang.org/x/net/http2/databuffer_test.go b/vendor/golang.org/x/net/http2/databuffer_test.go
index ca227b528..028e12e52 100644
--- a/vendor/golang.org/x/net/http2/databuffer_test.go
+++ b/vendor/golang.org/x/net/http2/databuffer_test.go
@@ -2,6 +2,8 @@
// 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 (
@@ -69,13 +71,13 @@ func testDataBuffer(t *testing.T, wantBytes []byte, setup func(t *testing.T) *da
func TestDataBufferAllocation(t *testing.T) {
writes := [][]byte{
bytes.Repeat([]byte("a"), 1*1024-1),
- []byte{'a'},
+ []byte("a"),
bytes.Repeat([]byte("b"), 4*1024-1),
- []byte{'b'},
+ []byte("b"),
bytes.Repeat([]byte("c"), 8*1024-1),
- []byte{'c'},
+ []byte("c"),
bytes.Repeat([]byte("d"), 16*1024-1),
- []byte{'d'},
+ []byte("d"),
bytes.Repeat([]byte("e"), 32*1024),
}
var wantRead bytes.Buffer
diff --git a/vendor/golang.org/x/net/http2/errors.go b/vendor/golang.org/x/net/http2/errors.go
index 20fd7626a..71f2c4631 100644
--- a/vendor/golang.org/x/net/http2/errors.go
+++ b/vendor/golang.org/x/net/http2/errors.go
@@ -87,13 +87,16 @@ 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.
-
+// connError represents an HTTP/2 ConnectionError error code, along
+// with a string (for debugging) explaining why.
+//
// Errors of this type are only returned by the frame parser functions
-// and converted into ConnectionError(ErrCodeProtocol).
+// and converted into ConnectionError(Code), after stashing away
+// the Reason into the Framer's errDetail field, accessible via
+// the (*Framer).ErrorDetail method.
type connError struct {
- Code ErrCode
- Reason string
+ Code ErrCode // the ConnectionError error code
+ Reason string // additional reason
}
func (e connError) Error() string {
diff --git a/vendor/golang.org/x/net/http2/go16.go b/vendor/golang.org/x/net/http2/go16.go
index 2b72855f5..00b2e9e3c 100644
--- a/vendor/golang.org/x/net/http2/go16.go
+++ b/vendor/golang.org/x/net/http2/go16.go
@@ -7,7 +7,6 @@
package http2
import (
- "crypto/tls"
"net/http"
"time"
)
@@ -15,29 +14,3 @@ import (
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/vendor/golang.org/x/net/http2/go18.go b/vendor/golang.org/x/net/http2/go18.go
index 73cc2381f..4f30d228a 100644
--- a/vendor/golang.org/x/net/http2/go18.go
+++ b/vendor/golang.org/x/net/http2/go18.go
@@ -52,3 +52,5 @@ func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
func reqBodyIsNoBody(body io.ReadCloser) bool {
return body == http.NoBody
}
+
+func go18httpNoBody() io.ReadCloser { return http.NoBody } // for tests only
diff --git a/vendor/golang.org/x/net/http2/go19.go b/vendor/golang.org/x/net/http2/go19.go
new file mode 100644
index 000000000..38124ba56
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/go19.go
@@ -0,0 +1,16 @@
+// 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.9
+
+package http2
+
+import (
+ "net/http"
+)
+
+func configureServer19(s *http.Server, conf *Server) error {
+ s.RegisterOnShutdown(conf.state.startGracefulShutdown)
+ return nil
+}
diff --git a/vendor/golang.org/x/net/http2/go19_test.go b/vendor/golang.org/x/net/http2/go19_test.go
new file mode 100644
index 000000000..1675d248f
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/go19_test.go
@@ -0,0 +1,60 @@
+// Copyright 2017 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.9
+
+package http2
+
+import (
+ "context"
+ "net/http"
+ "reflect"
+ "testing"
+ "time"
+)
+
+func TestServerGracefulShutdown(t *testing.T) {
+ var st *serverTester
+ handlerDone := make(chan struct{})
+ st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
+ defer close(handlerDone)
+ go st.ts.Config.Shutdown(context.Background())
+
+ ga := st.wantGoAway()
+ if ga.ErrCode != ErrCodeNo {
+ t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode)
+ }
+ if ga.LastStreamID != 1 {
+ t.Errorf("GOAWAY LastStreamID = %v; want 1", ga.LastStreamID)
+ }
+
+ w.Header().Set("x-foo", "bar")
+ })
+ defer st.Close()
+
+ st.greet()
+ st.bodylessReq1()
+
+ select {
+ case <-handlerDone:
+ case <-time.After(5 * time.Second):
+ t.Fatalf("server did not shutdown?")
+ }
+ hf := st.wantHeaders()
+ goth := st.decodeHeader(hf.HeaderBlockFragment())
+ wanth := [][2]string{
+ {":status", "200"},
+ {"x-foo", "bar"},
+ {"content-type", "text/plain; charset=utf-8"},
+ {"content-length", "0"},
+ }
+ if !reflect.DeepEqual(goth, wanth) {
+ t.Errorf("Got headers %v; want %v", goth, wanth)
+ }
+
+ n, err := st.cc.Read([]byte{0})
+ if n != 0 || err == nil {
+ t.Errorf("Read = %v, %v; want 0, non-nil", n, err)
+ }
+}
diff --git a/vendor/golang.org/x/net/http2/h2i/h2i.go b/vendor/golang.org/x/net/http2/h2i/h2i.go
index 76c778711..62e57527c 100644
--- a/vendor/golang.org/x/net/http2/h2i/h2i.go
+++ b/vendor/golang.org/x/net/http2/h2i/h2i.go
@@ -45,6 +45,7 @@ var (
flagNextProto = flag.String("nextproto", "h2,h2-14", "Comma-separated list of NPN/ALPN protocol names to negotiate.")
flagInsecure = flag.Bool("insecure", false, "Whether to skip TLS cert validation")
flagSettings = flag.String("settings", "empty", "comma-separated list of KEY=value settings for the initial SETTINGS frame. The magic value 'empty' sends an empty initial settings frame, and the magic value 'omit' causes no initial settings frame to be sent.")
+ flagDial = flag.String("dial", "", "optional ip:port to dial, to connect to a host:port but use a different SNI name (including a SNI name without DNS)")
)
type command struct {
@@ -147,11 +148,14 @@ func (app *h2i) Main() error {
InsecureSkipVerify: *flagInsecure,
}
- hostAndPort := withPort(app.host)
+ hostAndPort := *flagDial
+ if hostAndPort == "" {
+ hostAndPort = withPort(app.host)
+ }
log.Printf("Connecting to %s ...", hostAndPort)
tc, err := tls.Dial("tcp", hostAndPort, cfg)
if err != nil {
- return fmt.Errorf("Error dialing %s: %v", withPort(app.host), err)
+ return fmt.Errorf("Error dialing %s: %v", hostAndPort, err)
}
log.Printf("Connected to %v", tc.RemoteAddr())
defer tc.Close()
@@ -460,6 +464,15 @@ func (app *h2i) readFrames() error {
app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField)
}
app.hdec.Write(f.HeaderBlockFragment())
+ case *http2.PushPromiseFrame:
+ if app.hdec == nil {
+ // TODO: if the user uses h2i to send a SETTINGS frame advertising
+ // something larger, we'll need to respect SETTINGS_HEADER_TABLE_SIZE
+ // and stuff here instead of using the 4k default. But for now:
+ tableSize := uint32(4 << 10)
+ app.hdec = hpack.NewDecoder(tableSize, app.onNewHeaderField)
+ }
+ app.hdec.Write(f.HeaderBlockFragment())
}
}
}
diff --git a/vendor/golang.org/x/net/http2/hpack/hpack_test.go b/vendor/golang.org/x/net/http2/hpack/hpack_test.go
index c2f8fd102..bc7f47678 100644
--- a/vendor/golang.org/x/net/http2/hpack/hpack_test.go
+++ b/vendor/golang.org/x/net/http2/hpack/hpack_test.go
@@ -648,6 +648,10 @@ func TestHuffmanFuzzCrash(t *testing.T) {
}
}
+func pair(name, value string) HeaderField {
+ return HeaderField{Name: name, Value: value}
+}
+
func dehex(s string) []byte {
s = strings.Replace(s, " ", "", -1)
s = strings.Replace(s, "\n", "", -1)
diff --git a/vendor/golang.org/x/net/http2/hpack/tables.go b/vendor/golang.org/x/net/http2/hpack/tables.go
index 31bd5a553..a66cfbea6 100644
--- a/vendor/golang.org/x/net/http2/hpack/tables.go
+++ b/vendor/golang.org/x/net/http2/hpack/tables.go
@@ -125,77 +125,78 @@ func (t *headerFieldTable) idToIndex(id uint64) uint64 {
return k + 1
}
-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 = newStaticTable()
+var staticTableEntries = [...]HeaderField{
+ {Name: ":authority"},
+ {Name: ":method", Value: "GET"},
+ {Name: ":method", Value: "POST"},
+ {Name: ":path", Value: "/"},
+ {Name: ":path", Value: "/index.html"},
+ {Name: ":scheme", Value: "http"},
+ {Name: ":scheme", Value: "https"},
+ {Name: ":status", Value: "200"},
+ {Name: ":status", Value: "204"},
+ {Name: ":status", Value: "206"},
+ {Name: ":status", Value: "304"},
+ {Name: ":status", Value: "400"},
+ {Name: ":status", Value: "404"},
+ {Name: ":status", Value: "500"},
+ {Name: "accept-charset"},
+ {Name: "accept-encoding", Value: "gzip, deflate"},
+ {Name: "accept-language"},
+ {Name: "accept-ranges"},
+ {Name: "accept"},
+ {Name: "access-control-allow-origin"},
+ {Name: "age"},
+ {Name: "allow"},
+ {Name: "authorization"},
+ {Name: "cache-control"},
+ {Name: "content-disposition"},
+ {Name: "content-encoding"},
+ {Name: "content-language"},
+ {Name: "content-length"},
+ {Name: "content-location"},
+ {Name: "content-range"},
+ {Name: "content-type"},
+ {Name: "cookie"},
+ {Name: "date"},
+ {Name: "etag"},
+ {Name: "expect"},
+ {Name: "expires"},
+ {Name: "from"},
+ {Name: "host"},
+ {Name: "if-match"},
+ {Name: "if-modified-since"},
+ {Name: "if-none-match"},
+ {Name: "if-range"},
+ {Name: "if-unmodified-since"},
+ {Name: "last-modified"},
+ {Name: "link"},
+ {Name: "location"},
+ {Name: "max-forwards"},
+ {Name: "proxy-authenticate"},
+ {Name: "proxy-authorization"},
+ {Name: "range"},
+ {Name: "referer"},
+ {Name: "refresh"},
+ {Name: "retry-after"},
+ {Name: "server"},
+ {Name: "set-cookie"},
+ {Name: "strict-transport-security"},
+ {Name: "transfer-encoding"},
+ {Name: "user-agent"},
+ {Name: "vary"},
+ {Name: "via"},
+ {Name: "www-authenticate"},
+}
func newStaticTable() *headerFieldTable {
t := &headerFieldTable{}
t.init()
- t.addEntry(pair(":authority", ""))
- t.addEntry(pair(":method", "GET"))
- t.addEntry(pair(":method", "POST"))
- t.addEntry(pair(":path", "/"))
- t.addEntry(pair(":path", "/index.html"))
- t.addEntry(pair(":scheme", "http"))
- t.addEntry(pair(":scheme", "https"))
- t.addEntry(pair(":status", "200"))
- t.addEntry(pair(":status", "204"))
- t.addEntry(pair(":status", "206"))
- t.addEntry(pair(":status", "304"))
- t.addEntry(pair(":status", "400"))
- t.addEntry(pair(":status", "404"))
- t.addEntry(pair(":status", "500"))
- t.addEntry(pair("accept-charset", ""))
- t.addEntry(pair("accept-encoding", "gzip, deflate"))
- t.addEntry(pair("accept-language", ""))
- t.addEntry(pair("accept-ranges", ""))
- t.addEntry(pair("accept", ""))
- t.addEntry(pair("access-control-allow-origin", ""))
- t.addEntry(pair("age", ""))
- t.addEntry(pair("allow", ""))
- t.addEntry(pair("authorization", ""))
- t.addEntry(pair("cache-control", ""))
- t.addEntry(pair("content-disposition", ""))
- t.addEntry(pair("content-encoding", ""))
- t.addEntry(pair("content-language", ""))
- t.addEntry(pair("content-length", ""))
- t.addEntry(pair("content-location", ""))
- t.addEntry(pair("content-range", ""))
- t.addEntry(pair("content-type", ""))
- t.addEntry(pair("cookie", ""))
- t.addEntry(pair("date", ""))
- t.addEntry(pair("etag", ""))
- t.addEntry(pair("expect", ""))
- t.addEntry(pair("expires", ""))
- t.addEntry(pair("from", ""))
- t.addEntry(pair("host", ""))
- t.addEntry(pair("if-match", ""))
- t.addEntry(pair("if-modified-since", ""))
- t.addEntry(pair("if-none-match", ""))
- t.addEntry(pair("if-range", ""))
- t.addEntry(pair("if-unmodified-since", ""))
- t.addEntry(pair("last-modified", ""))
- t.addEntry(pair("link", ""))
- t.addEntry(pair("location", ""))
- t.addEntry(pair("max-forwards", ""))
- t.addEntry(pair("proxy-authenticate", ""))
- t.addEntry(pair("proxy-authorization", ""))
- t.addEntry(pair("range", ""))
- t.addEntry(pair("referer", ""))
- t.addEntry(pair("refresh", ""))
- t.addEntry(pair("retry-after", ""))
- t.addEntry(pair("server", ""))
- t.addEntry(pair("set-cookie", ""))
- t.addEntry(pair("strict-transport-security", ""))
- t.addEntry(pair("transfer-encoding", ""))
- t.addEntry(pair("user-agent", ""))
- t.addEntry(pair("vary", ""))
- t.addEntry(pair("via", ""))
- t.addEntry(pair("www-authenticate", ""))
+ for _, e := range staticTableEntries[:] {
+ t.addEntry(e)
+ }
return t
}
diff --git a/vendor/golang.org/x/net/http2/http2.go b/vendor/golang.org/x/net/http2/http2.go
index b6b0f9ad1..d565f40e0 100644
--- a/vendor/golang.org/x/net/http2/http2.go
+++ b/vendor/golang.org/x/net/http2/http2.go
@@ -376,12 +376,16 @@ func (s *sorter) SortStrings(ss []string) {
// validPseudoPath reports whether v is a valid :path pseudo-header
// value. It must be either:
//
-// *) a non-empty string starting with '/', but not with with "//",
+// *) a non-empty string starting with '/'
// *) the string '*', for OPTIONS requests.
//
// For now this is only used a quick check for deciding when to clean
// up Opaque URLs before sending requests from the Transport.
// See golang.org/issue/16847
+//
+// We used to enforce that the path also didn't start with "//", but
+// Google's GFE accepts such paths and Chrome sends them, so ignore
+// that part of the spec. See golang.org/issue/19103.
func validPseudoPath(v string) bool {
- return (len(v) > 0 && v[0] == '/' && (len(v) == 1 || v[1] != '/')) || v == "*"
+ return (len(v) > 0 && v[0] == '/') || v == "*"
}
diff --git a/vendor/golang.org/x/net/http2/not_go16.go b/vendor/golang.org/x/net/http2/not_go16.go
index efd2e1282..508cebcc4 100644
--- a/vendor/golang.org/x/net/http2/not_go16.go
+++ b/vendor/golang.org/x/net/http2/not_go16.go
@@ -7,7 +7,6 @@
package http2
import (
- "crypto/tls"
"net/http"
"time"
)
@@ -20,27 +19,3 @@ 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/vendor/golang.org/x/net/http2/not_go18.go b/vendor/golang.org/x/net/http2/not_go18.go
index efbf83c32..6f8d3f86f 100644
--- a/vendor/golang.org/x/net/http2/not_go18.go
+++ b/vendor/golang.org/x/net/http2/not_go18.go
@@ -25,3 +25,5 @@ func reqGetBody(req *http.Request) func() (io.ReadCloser, error) {
}
func reqBodyIsNoBody(io.ReadCloser) bool { return false }
+
+func go18httpNoBody() io.ReadCloser { return nil } // for tests only
diff --git a/vendor/golang.org/x/net/http2/not_go19.go b/vendor/golang.org/x/net/http2/not_go19.go
new file mode 100644
index 000000000..5ae07726b
--- /dev/null
+++ b/vendor/golang.org/x/net/http2/not_go19.go
@@ -0,0 +1,16 @@
+// 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.9
+
+package http2
+
+import (
+ "net/http"
+)
+
+func configureServer19(s *http.Server, conf *Server) error {
+ // not supported prior to go1.9
+ return nil
+}
diff --git a/vendor/golang.org/x/net/http2/pipe.go b/vendor/golang.org/x/net/http2/pipe.go
index 914aaf8a7..a6140099c 100644
--- a/vendor/golang.org/x/net/http2/pipe.go
+++ b/vendor/golang.org/x/net/http2/pipe.go
@@ -15,8 +15,8 @@ import (
// 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
+ c sync.Cond // c.L lazily initialized to &p.mu
+ b pipeBuffer // nil when done reading
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
@@ -32,6 +32,9 @@ type pipeBuffer interface {
func (p *pipe) Len() int {
p.mu.Lock()
defer p.mu.Unlock()
+ if p.b == nil {
+ return 0
+ }
return p.b.Len()
}
@@ -47,7 +50,7 @@ func (p *pipe) Read(d []byte) (n int, err error) {
if p.breakErr != nil {
return 0, p.breakErr
}
- if p.b.Len() > 0 {
+ if p.b != nil && p.b.Len() > 0 {
return p.b.Read(d)
}
if p.err != nil {
@@ -55,6 +58,7 @@ func (p *pipe) Read(d []byte) (n int, err error) {
p.readFn() // e.g. copy trailers
p.readFn = nil // not sticky like p.err
}
+ p.b = nil
return 0, p.err
}
p.c.Wait()
@@ -75,6 +79,9 @@ func (p *pipe) Write(d []byte) (n int, err error) {
if p.err != nil {
return 0, errClosedPipeWrite
}
+ if p.breakErr != nil {
+ return len(d), nil // discard when there is no reader
+ }
return p.b.Write(d)
}
@@ -109,6 +116,9 @@ func (p *pipe) closeWithError(dst *error, err error, fn func()) {
return
}
p.readFn = fn
+ if dst == &p.breakErr {
+ p.b = nil
+ }
*dst = err
p.closeDoneLocked()
}
diff --git a/vendor/golang.org/x/net/http2/pipe_test.go b/vendor/golang.org/x/net/http2/pipe_test.go
index 763229999..1bf351ff6 100644
--- a/vendor/golang.org/x/net/http2/pipe_test.go
+++ b/vendor/golang.org/x/net/http2/pipe_test.go
@@ -92,6 +92,13 @@ func TestPipeCloseWithError(t *testing.T) {
if err != a {
t.Logf("read error = %v, %v", err, a)
}
+ // Read and Write should fail.
+ if n, err := p.Write([]byte("abc")); err != errClosedPipeWrite || n != 0 {
+ t.Errorf("Write(abc) after close\ngot %v, %v\nwant 0, %v", n, err, errClosedPipeWrite)
+ }
+ if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 {
+ t.Errorf("Read() after close\ngot %v, nil\nwant 0, %v", n, errClosedPipeWrite)
+ }
}
func TestPipeBreakWithError(t *testing.T) {
@@ -106,4 +113,18 @@ func TestPipeBreakWithError(t *testing.T) {
if err != a {
t.Logf("read error = %v, %v", err, a)
}
+ if p.b != nil {
+ t.Errorf("buffer should be nil after BreakWithError")
+ }
+ // Write should succeed silently.
+ if n, err := p.Write([]byte("abc")); err != nil || n != 3 {
+ t.Errorf("Write(abc) after break\ngot %v, %v\nwant 0, nil", n, err)
+ }
+ if p.b != nil {
+ t.Errorf("buffer should be nil after Write")
+ }
+ // Read should fail.
+ if n, err := p.Read(make([]byte, 1)); err == nil || n != 0 {
+ t.Errorf("Read() after close\ngot %v, nil\nwant 0, not nil", n)
+ }
}
diff --git a/vendor/golang.org/x/net/http2/server.go b/vendor/golang.org/x/net/http2/server.go
index 029ed958a..eae143ddf 100644
--- a/vendor/golang.org/x/net/http2/server.go
+++ b/vendor/golang.org/x/net/http2/server.go
@@ -126,6 +126,11 @@ type Server struct {
// NewWriteScheduler constructs a write scheduler for a connection.
// If nil, a default scheduler is chosen.
NewWriteScheduler func() WriteScheduler
+
+ // Internal state. This is a pointer (rather than embedded directly)
+ // so that we don't embed a Mutex in this struct, which will make the
+ // struct non-copyable, which might break some callers.
+ state *serverInternalState
}
func (s *Server) initialConnRecvWindowSize() int32 {
@@ -156,6 +161,40 @@ func (s *Server) maxConcurrentStreams() uint32 {
return defaultMaxStreams
}
+type serverInternalState struct {
+ mu sync.Mutex
+ activeConns map[*serverConn]struct{}
+}
+
+func (s *serverInternalState) registerConn(sc *serverConn) {
+ if s == nil {
+ return // if the Server was used without calling ConfigureServer
+ }
+ s.mu.Lock()
+ s.activeConns[sc] = struct{}{}
+ s.mu.Unlock()
+}
+
+func (s *serverInternalState) unregisterConn(sc *serverConn) {
+ if s == nil {
+ return // if the Server was used without calling ConfigureServer
+ }
+ s.mu.Lock()
+ delete(s.activeConns, sc)
+ s.mu.Unlock()
+}
+
+func (s *serverInternalState) startGracefulShutdown() {
+ if s == nil {
+ return // if the Server was used without calling ConfigureServer
+ }
+ s.mu.Lock()
+ for sc := range s.activeConns {
+ sc.startGracefulShutdown()
+ }
+ s.mu.Unlock()
+}
+
// ConfigureServer adds HTTP/2 support to a net/http Server.
//
// The configuration conf may be nil.
@@ -168,9 +207,13 @@ func ConfigureServer(s *http.Server, conf *Server) error {
if conf == nil {
conf = new(Server)
}
+ conf.state = &serverInternalState{activeConns: make(map[*serverConn]struct{})}
if err := configureServer18(s, conf); err != nil {
return err
}
+ if err := configureServer19(s, conf); err != nil {
+ return err
+ }
if s.TLSConfig == nil {
s.TLSConfig = new(tls.Config)
@@ -292,7 +335,7 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
streams: make(map[uint32]*stream),
readFrameCh: make(chan readFrameResult),
wantWriteFrameCh: make(chan FrameWriteRequest, 8),
- wantStartPushCh: make(chan startPushRequest, 8),
+ serveMsgCh: make(chan interface{}, 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{}),
@@ -305,6 +348,9 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
pushEnabled: true,
}
+ s.state.registerConn(sc)
+ defer s.state.unregisterConn(sc)
+
// The net/http package sets the write deadline from the
// http.Server.WriteTimeout during the TLS handshake, but then
// passes the connection off to us with the deadline already set.
@@ -405,10 +451,9 @@ type serverConn struct {
doneServing chan struct{} // closed when serverConn.serve ends
readFrameCh chan readFrameResult // written by serverConn.readFrames
wantWriteFrameCh chan FrameWriteRequest // from handlers -> serve
- wantStartPushCh chan startPushRequest // 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
+ serveMsgCh chan interface{} // misc messages & code to send 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
@@ -440,14 +485,15 @@ type serverConn struct {
inFrameScheduleLoop bool // whether we're in the scheduleFrameWrite loop
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
- idleTimer *time.Timer // nil if unused
- idleTimerCh <-chan time.Time // nil if unused
+ shutdownTimer *time.Timer // nil until used
+ idleTimer *time.Timer // nil if unused
// Owned by the writeFrameAsync goroutine:
headerWriteBuf bytes.Buffer
hpackEncoder *hpack.Encoder
+
+ // Used by startGracefulShutdown.
+ shutdownOnce sync.Once
}
func (sc *serverConn) maxHeaderListSize() uint32 {
@@ -748,19 +794,15 @@ func (sc *serverConn) serve() {
sc.setConnState(http.StateIdle)
if sc.srv.IdleTimeout != 0 {
- sc.idleTimer = time.NewTimer(sc.srv.IdleTimeout)
+ sc.idleTimer = time.AfterFunc(sc.srv.IdleTimeout, sc.onIdleTimer)
defer sc.idleTimer.Stop()
- sc.idleTimerCh = sc.idleTimer.C
- }
-
- var gracefulShutdownCh <-chan struct{}
- if sc.hs != nil {
- gracefulShutdownCh = h1ServerShutdownChan(sc.hs)
}
go sc.readFrames() // closed by defer sc.conn.Close above
- settingsTimer := time.NewTimer(firstSettingsTimeout)
+ settingsTimer := time.AfterFunc(firstSettingsTimeout, sc.onSettingsTimer)
+ defer settingsTimer.Stop()
+
loopNum := 0
for {
loopNum++
@@ -771,8 +813,6 @@ func (sc *serverConn) serve() {
break
}
sc.writeFrame(wr)
- case spr := <-sc.wantStartPushCh:
- sc.startPush(spr)
case res := <-sc.wroteFrameCh:
sc.wroteFrame(res)
case res := <-sc.readFrameCh:
@@ -780,26 +820,37 @@ func (sc *serverConn) serve() {
return
}
res.readMore()
- if settingsTimer.C != nil {
+ if settingsTimer != nil {
settingsTimer.Stop()
- settingsTimer.C = nil
+ settingsTimer = 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 <-gracefulShutdownCh:
- gracefulShutdownCh = nil
- sc.startGracefulShutdown()
- case <-sc.shutdownTimerCh:
- sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr())
- return
- case <-sc.idleTimerCh:
- sc.vlogf("connection is idle")
- sc.goAway(ErrCodeNo)
- case fn := <-sc.testHookCh:
- fn(loopNum)
+ case msg := <-sc.serveMsgCh:
+ switch v := msg.(type) {
+ case func(int):
+ v(loopNum) // for testing
+ case *serverMessage:
+ switch v {
+ case settingsTimerMsg:
+ sc.logf("timeout waiting for SETTINGS frames from %v", sc.conn.RemoteAddr())
+ return
+ case idleTimerMsg:
+ sc.vlogf("connection is idle")
+ sc.goAway(ErrCodeNo)
+ case shutdownTimerMsg:
+ sc.vlogf("GOAWAY close timer fired; closing conn from %v", sc.conn.RemoteAddr())
+ return
+ case gracefulShutdownMsg:
+ sc.startGracefulShutdownInternal()
+ default:
+ panic("unknown timer")
+ }
+ case *startPushRequest:
+ sc.startPush(v)
+ default:
+ panic(fmt.Sprintf("unexpected type %T", v))
+ }
}
if sc.inGoAway && sc.curOpenStreams() == 0 && !sc.needToSendGoAway && !sc.writingFrame {
@@ -808,6 +859,36 @@ func (sc *serverConn) serve() {
}
}
+func (sc *serverConn) awaitGracefulShutdown(sharedCh <-chan struct{}, privateCh chan struct{}) {
+ select {
+ case <-sc.doneServing:
+ case <-sharedCh:
+ close(privateCh)
+ }
+}
+
+type serverMessage int
+
+// Message values sent to serveMsgCh.
+var (
+ settingsTimerMsg = new(serverMessage)
+ idleTimerMsg = new(serverMessage)
+ shutdownTimerMsg = new(serverMessage)
+ gracefulShutdownMsg = new(serverMessage)
+)
+
+func (sc *serverConn) onSettingsTimer() { sc.sendServeMsg(settingsTimerMsg) }
+func (sc *serverConn) onIdleTimer() { sc.sendServeMsg(idleTimerMsg) }
+func (sc *serverConn) onShutdownTimer() { sc.sendServeMsg(shutdownTimerMsg) }
+
+func (sc *serverConn) sendServeMsg(msg interface{}) {
+ sc.serveG.checkNotOn() // NOT
+ select {
+ case sc.serveMsgCh <- msg:
+ case <-sc.doneServing:
+ }
+}
+
// readPreface reads the ClientPreface greeting from the peer
// or returns an error on timeout or an invalid greeting.
func (sc *serverConn) readPreface() error {
@@ -1125,10 +1206,19 @@ func (sc *serverConn) scheduleFrameWrite() {
sc.inFrameScheduleLoop = false
}
-// startGracefulShutdown sends a GOAWAY with ErrCodeNo to tell the
-// client we're gracefully shutting down. The connection isn't closed
-// until all current streams are done.
+// startGracefulShutdown gracefully shuts down a connection. This
+// sends GOAWAY with ErrCodeNo to tell the client we're gracefully
+// shutting down. The connection isn't closed until all current
+// streams are done.
+//
+// startGracefulShutdown returns immediately; it does not wait until
+// the connection has shut down.
func (sc *serverConn) startGracefulShutdown() {
+ sc.serveG.checkNotOn() // NOT
+ sc.shutdownOnce.Do(func() { sc.sendServeMsg(gracefulShutdownMsg) })
+}
+
+func (sc *serverConn) startGracefulShutdownInternal() {
sc.goAwayIn(ErrCodeNo, 0)
}
@@ -1160,8 +1250,7 @@ func (sc *serverConn) goAwayIn(code ErrCode, forceCloseIn time.Duration) {
func (sc *serverConn) shutDownIn(d time.Duration) {
sc.serveG.check()
- sc.shutdownTimer = time.NewTimer(d)
- sc.shutdownTimerCh = sc.shutdownTimer.C
+ sc.shutdownTimer = time.AfterFunc(d, sc.onShutdownTimer)
}
func (sc *serverConn) resetStream(se StreamError) {
@@ -1359,7 +1448,7 @@ func (sc *serverConn) closeStream(st *stream, err error) {
sc.idleTimer.Reset(sc.srv.IdleTimeout)
}
if h1ServerKeepAlivesDisabled(sc.hs) {
- sc.startGracefulShutdown()
+ sc.startGracefulShutdownInternal()
}
}
if p := st.body; p != nil {
@@ -1546,7 +1635,7 @@ func (sc *serverConn) processGoAway(f *GoAwayFrame) error {
} else {
sc.vlogf("http2: received GOAWAY %+v, starting graceful shutdown", f)
}
- sc.startGracefulShutdown()
+ sc.startGracefulShutdownInternal()
// http://tools.ietf.org/html/rfc7540#section-6.8
// We should not create any new streams, which means we should disable push.
sc.pushEnabled = false
@@ -2163,6 +2252,7 @@ type responseWriterState struct {
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
+ dirty bool // a Write failed; don't reuse this responseWriterState
sentContentLen int64 // non-zero if handler set a Content-Length header
wroteBytes int64
@@ -2244,6 +2334,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
date: date,
})
if err != nil {
+ rws.dirty = true
return 0, err
}
if endStream {
@@ -2265,6 +2356,7 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
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 {
+ rws.dirty = true
return 0, err
}
}
@@ -2276,6 +2368,9 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
trailers: rws.trailers,
endStream: true,
})
+ if err != nil {
+ rws.dirty = true
+ }
return len(p), err
}
return len(p), nil
@@ -2415,7 +2510,7 @@ func cloneHeader(h http.Header) http.Header {
//
// * Handler calls w.Write or w.WriteString ->
// * -> rws.bw (*bufio.Writer) ->
-// * (Handler migth call Flush)
+// * (Handler might call Flush)
// * -> chunkWriter{rws}
// * -> responseWriterState.writeChunk(p []byte)
// * -> responseWriterState.writeChunk (most of the magic; see comment there)
@@ -2454,10 +2549,19 @@ func (w *responseWriter) write(lenData int, dataB []byte, dataS string) (n int,
func (w *responseWriter) handlerDone() {
rws := w.rws
+ dirty := rws.dirty
rws.handlerDone = true
w.Flush()
w.rws = nil
- responseWriterStatePool.Put(rws)
+ if !dirty {
+ // Only recycle the pool if all prior Write calls to
+ // the serverConn goroutine completed successfully. If
+ // they returned earlier due to resets from the peer
+ // there might still be write goroutines outstanding
+ // from the serverConn referencing the rws memory. See
+ // issue 20704.
+ responseWriterStatePool.Put(rws)
+ }
}
// Push errors.
@@ -2539,7 +2643,7 @@ func (w *responseWriter) push(target string, opts pushOptions) error {
return fmt.Errorf("method %q must be GET or HEAD", opts.Method)
}
- msg := startPushRequest{
+ msg := &startPushRequest{
parent: st,
method: opts.Method,
url: u,
@@ -2552,7 +2656,7 @@ func (w *responseWriter) push(target string, opts pushOptions) error {
return errClientDisconnected
case <-st.cw:
return errStreamClosed
- case sc.wantStartPushCh <- msg:
+ case sc.serveMsgCh <- msg:
}
select {
@@ -2574,7 +2678,7 @@ type startPushRequest struct {
done chan error
}
-func (sc *serverConn) startPush(msg startPushRequest) {
+func (sc *serverConn) startPush(msg *startPushRequest) {
sc.serveG.check()
// http://tools.ietf.org/html/rfc7540#section-6.6.
@@ -2613,7 +2717,7 @@ func (sc *serverConn) startPush(msg startPushRequest) {
// A server that is unable to establish a new stream identifier can send a GOAWAY
// frame so that the client is forced to open a new connection for new streams.
if sc.maxPushPromiseID+2 >= 1<<31 {
- sc.startGracefulShutdown()
+ sc.startGracefulShutdownInternal()
return 0, ErrPushLimitReached
}
sc.maxPushPromiseID += 2
@@ -2738,31 +2842,6 @@ var badTrailer = map[string]bool{
"Www-Authenticate": true,
}
-// h1ServerShutdownChan returns a channel that will be closed when the
-// provided *http.Server wants to shut down.
-//
-// This is a somewhat hacky way to get at http1 innards. It works
-// when the http2 code is bundled into the net/http package in the
-// standard library. The alternatives ended up making the cmd/go tool
-// depend on http Servers. This is the lightest option for now.
-// This is tested via the TestServeShutdown* tests in net/http.
-func h1ServerShutdownChan(hs *http.Server) <-chan struct{} {
- if fn := testh1ServerShutdownChan; fn != nil {
- return fn(hs)
- }
- var x interface{} = hs
- type I interface {
- getDoneChan() <-chan struct{}
- }
- if hs, ok := x.(I); ok {
- return hs.getDoneChan()
- }
- return nil
-}
-
-// optional test hook for h1ServerShutdownChan.
-var testh1ServerShutdownChan func(hs *http.Server) <-chan struct{}
-
// h1ServerKeepAlivesDisabled reports whether hs has its keep-alives
// disabled. See comments on h1ServerShutdownChan above for why
// the code is written this way.
diff --git a/vendor/golang.org/x/net/http2/server_push_test.go b/vendor/golang.org/x/net/http2/server_push_test.go
index f70edd3c7..918fd30dc 100644
--- a/vendor/golang.org/x/net/http2/server_push_test.go
+++ b/vendor/golang.org/x/net/http2/server_push_test.go
@@ -508,7 +508,7 @@ func TestServer_Push_RejectAfterGoAway(t *testing.T) {
return
default:
}
- st.sc.testHookCh <- func(loopNum int) {
+ st.sc.serveMsgCh <- func(loopNum int) {
if !st.sc.pushEnabled {
readyOnce.Do(func() { close(ready) })
}
diff --git a/vendor/golang.org/x/net/http2/server_test.go b/vendor/golang.org/x/net/http2/server_test.go
index 591a0c2e6..b4e832894 100644
--- a/vendor/golang.org/x/net/http2/server_test.go
+++ b/vendor/golang.org/x/net/http2/server_test.go
@@ -142,7 +142,6 @@ func newServerTester(t testing.TB, handler http.HandlerFunc, opts ...interface{}
st.scMu.Lock()
defer st.scMu.Unlock()
st.sc = v
- st.sc.testHookCh = make(chan func(int))
}
log.SetOutput(io.MultiWriter(stderrv(), twriter{t: t, st: st}))
if !onlyServer {
@@ -187,7 +186,7 @@ func (st *serverTester) addLogFilter(phrase string) {
func (st *serverTester) stream(id uint32) *stream {
ch := make(chan *stream, 1)
- st.sc.testHookCh <- func(int) {
+ st.sc.serveMsgCh <- func(int) {
ch <- st.sc.streams[id]
}
return <-ch
@@ -195,7 +194,7 @@ func (st *serverTester) stream(id uint32) *stream {
func (st *serverTester) streamState(id uint32) streamState {
ch := make(chan streamState, 1)
- st.sc.testHookCh <- func(int) {
+ st.sc.serveMsgCh <- func(int) {
state, _ := st.sc.state(id)
ch <- state
}
@@ -205,7 +204,7 @@ func (st *serverTester) streamState(id uint32) streamState {
// loopNum reports how many times this conn's select loop has gone around.
func (st *serverTester) loopNum() int {
lastc := make(chan int, 1)
- st.sc.testHookCh <- func(loopNum int) {
+ st.sc.serveMsgCh <- func(loopNum int) {
lastc <- loopNum
}
return <-lastc
@@ -287,7 +286,7 @@ func (st *serverTester) greetAndCheckSettings(checkSetting func(s Setting) error
case *WindowUpdateFrame:
if f.FrameHeader.StreamID != 0 {
- st.t.Fatalf("WindowUpdate StreamID = %d; want 0", f.FrameHeader.StreamID, 0)
+ st.t.Fatalf("WindowUpdate StreamID = %d; want 0", f.FrameHeader.StreamID)
}
incr := uint32((&Server{}).initialConnRecvWindowSize() - initialWindowSize)
if f.Increment != incr {
@@ -2432,6 +2431,7 @@ func TestServer_Rejects_TLSBadCipher(t *testing.T) {
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,
+ cipher_TLS_RSA_WITH_AES_128_CBC_SHA256,
}
})
defer st.Close()
@@ -3414,8 +3414,9 @@ func TestServerHandleCustomConn(t *testing.T) {
}()
const testString = "my custom ConnectionState"
fakeConnState := tls.ConnectionState{
- ServerName: testString,
- Version: tls.VersionTLS12,
+ ServerName: testString,
+ Version: tls.VersionTLS12,
+ CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
}
go s.ServeConn(connStateConn{c1, fakeConnState}, &ServeConnOpts{
BaseConfig: &http.Server{
@@ -3685,47 +3686,36 @@ func TestRequestBodyReadCloseRace(t *testing.T) {
}
}
-func TestServerGracefulShutdown(t *testing.T) {
- shutdownCh := make(chan struct{})
- defer func() { testh1ServerShutdownChan = nil }()
- testh1ServerShutdownChan = func(*http.Server) <-chan struct{} { return shutdownCh }
+func TestIssue20704Race(t *testing.T) {
+ if testing.Short() && os.Getenv("GO_BUILDER_NAME") == "" {
+ t.Skip("skipping in short mode")
+ }
+ const (
+ itemSize = 1 << 10
+ itemCount = 100
+ )
- var st *serverTester
- handlerDone := make(chan struct{})
- st = newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
- defer close(handlerDone)
- close(shutdownCh)
-
- ga := st.wantGoAway()
- if ga.ErrCode != ErrCodeNo {
- t.Errorf("GOAWAY error = %v; want ErrCodeNo", ga.ErrCode)
+ st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
+ for i := 0; i < itemCount; i++ {
+ _, err := w.Write(make([]byte, itemSize))
+ if err != nil {
+ return
+ }
}
- if ga.LastStreamID != 1 {
- t.Errorf("GOAWAY LastStreamID = %v; want 1", ga.LastStreamID)
- }
-
- w.Header().Set("x-foo", "bar")
- })
+ }, optOnlyServer)
defer st.Close()
- st.greet()
- st.bodylessReq1()
+ tr := &Transport{TLSClientConfig: tlsConfigInsecure}
+ defer tr.CloseIdleConnections()
+ cl := &http.Client{Transport: tr}
- <-handlerDone
- hf := st.wantHeaders()
- goth := st.decodeHeader(hf.HeaderBlockFragment())
- wanth := [][2]string{
- {":status", "200"},
- {"x-foo", "bar"},
- {"content-type", "text/plain; charset=utf-8"},
- {"content-length", "0"},
- }
- if !reflect.DeepEqual(goth, wanth) {
- t.Errorf("Got headers %v; want %v", goth, wanth)
- }
-
- n, err := st.cc.Read([]byte{0})
- if n != 0 || err == nil {
- t.Errorf("Read = %v, %v; want 0, non-nil", n, err)
+ for i := 0; i < 1000; i++ {
+ resp, err := cl.Get(st.ts.URL)
+ if err != nil {
+ t.Fatal(err)
+ }
+ // Force a RST stream to the server by closing without
+ // reading the body:
+ resp.Body.Close()
}
}
diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go
index 84d042d46..adb77ffab 100644
--- a/vendor/golang.org/x/net/http2/transport.go
+++ b/vendor/golang.org/x/net/http2/transport.go
@@ -18,6 +18,7 @@ import (
"io/ioutil"
"log"
"math"
+ mathrand "math/rand"
"net"
"net/http"
"sort"
@@ -86,7 +87,7 @@ type Transport struct {
// 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
+ // of response headers are allowed. 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)
@@ -164,15 +165,17 @@ type ClientConn struct {
goAwayDebug string // goAway frame's debug data, retained as a string
streams map[uint32]*clientStream // client-initiated
nextStreamID uint32
+ pendingRequests int // requests blocked and waiting to be sent because len(streams) == maxConcurrentStreams
pings map[[8]byte]chan struct{} // in flight ping data to notification channel
bw *bufio.Writer
br *bufio.Reader
fr *Framer
lastActive time.Time
// Settings from peer: (also guarded by mu)
- maxFrameSize uint32
- maxConcurrentStreams uint32
- initialWindowSize uint32
+ maxFrameSize uint32
+ maxConcurrentStreams uint32
+ peerMaxHeaderListSize uint64
+ initialWindowSize uint32
hbuf bytes.Buffer // HPACK encoder writes into this
henc *hpack.Encoder
@@ -216,35 +219,45 @@ type clientStream struct {
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) {
+// awaitRequestCancel waits for the user to cancel a request or for the done
+// channel to be signaled. A non-nil error is returned only if the request was
+// canceled.
+func awaitRequestCancel(req *http.Request, done <-chan struct{}) error {
ctx := reqContext(req)
if req.Cancel == nil && ctx.Done() == nil {
- return
+ return nil
}
select {
case <-req.Cancel:
- cs.cancelStream()
- cs.bufPipe.CloseWithError(errRequestCanceled)
+ return errRequestCanceled
case <-ctx.Done():
+ return ctx.Err()
+ case <-done:
+ return nil
+ }
+}
+
+// awaitRequestCancel waits for the user to cancel a 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). If the request is canceled, then cs will be canceled and closed.
+func (cs *clientStream) awaitRequestCancel(req *http.Request) {
+ if err := awaitRequestCancel(req, cs.done); err != nil {
cs.cancelStream()
- cs.bufPipe.CloseWithError(ctx.Err())
- case <-cs.done:
+ cs.bufPipe.CloseWithError(err)
}
}
func (cs *clientStream) cancelStream() {
- cs.cc.mu.Lock()
+ cc := cs.cc
+ cc.mu.Lock()
didReset := cs.didReset
cs.didReset = true
- cs.cc.mu.Unlock()
+ cc.mu.Unlock()
if !didReset {
- cs.cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
+ cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
+ cc.forgetStreamID(cs.ID)
}
}
@@ -329,7 +342,7 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
}
addr := authorityAddr(req.URL.Scheme, req.URL.Host)
- for {
+ for retry := 0; ; retry++ {
cc, err := t.connPool().GetClientConn(req, addr)
if err != nil {
t.vlogf("http2: Transport failed to get client conn for %s: %v", addr, err)
@@ -337,9 +350,25 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
}
traceGotConn(req, cc)
res, err := cc.RoundTrip(req)
- if err != nil {
- if req, err = shouldRetryRequest(req, err); err == nil {
- continue
+ if err != nil && retry <= 6 {
+ afterBodyWrite := false
+ if e, ok := err.(afterReqBodyWriteError); ok {
+ err = e
+ afterBodyWrite = true
+ }
+ if req, err = shouldRetryRequest(req, err, afterBodyWrite); err == nil {
+ // After the first retry, do exponential backoff with 10% jitter.
+ if retry == 0 {
+ continue
+ }
+ backoff := float64(uint(1) << (uint(retry) - 1))
+ backoff += backoff * (0.1 * mathrand.Float64())
+ select {
+ case <-time.After(time.Second * time.Duration(backoff)):
+ continue
+ case <-reqContext(req).Done():
+ return nil, reqContext(req).Err()
+ }
}
}
if err != nil {
@@ -360,43 +389,60 @@ func (t *Transport) CloseIdleConnections() {
}
var (
- errClientConnClosed = errors.New("http2: client conn is closed")
- errClientConnUnusable = errors.New("http2: client conn not usable")
-
- errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY")
- errClientConnGotGoAwayAfterSomeReqBody = errors.New("http2: Transport received Server's graceful shutdown GOAWAY; some request body already written")
+ errClientConnClosed = errors.New("http2: client conn is closed")
+ errClientConnUnusable = errors.New("http2: client conn not usable")
+ errClientConnGotGoAway = errors.New("http2: Transport received Server's graceful shutdown GOAWAY")
)
+// afterReqBodyWriteError is a wrapper around errors returned by ClientConn.RoundTrip.
+// It is used to signal that err happened after part of Request.Body was sent to the server.
+type afterReqBodyWriteError struct {
+ err error
+}
+
+func (e afterReqBodyWriteError) Error() string {
+ return e.err.Error() + "; some request body already written"
+}
+
// shouldRetryRequest is called by RoundTrip when a request fails to get
// response headers. It is always called with a non-nil error.
// It returns either a request to retry (either the same request, or a
// modified clone), or an error if the request can't be replayed.
-func shouldRetryRequest(req *http.Request, err error) (*http.Request, error) {
- switch err {
- default:
+func shouldRetryRequest(req *http.Request, err error, afterBodyWrite bool) (*http.Request, error) {
+ if !canRetryError(err) {
return nil, err
- case errClientConnUnusable, errClientConnGotGoAway:
- return req, nil
- case errClientConnGotGoAwayAfterSomeReqBody:
- // If the Body is nil (or http.NoBody), it's safe to reuse
- // this request and its Body.
- if req.Body == nil || reqBodyIsNoBody(req.Body) {
- return req, nil
- }
- // Otherwise we depend on the Request having its GetBody
- // func defined.
- getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody
- if getBody == nil {
- return nil, errors.New("http2: Transport: peer server initiated graceful shutdown after some of Request.Body was written; define Request.GetBody to avoid this error")
- }
- body, err := getBody()
- if err != nil {
- return nil, err
- }
- newReq := *req
- newReq.Body = body
- return &newReq, nil
}
+ if !afterBodyWrite {
+ return req, nil
+ }
+ // If the Body is nil (or http.NoBody), it's safe to reuse
+ // this request and its Body.
+ if req.Body == nil || reqBodyIsNoBody(req.Body) {
+ return req, nil
+ }
+ // Otherwise we depend on the Request having its GetBody
+ // func defined.
+ getBody := reqGetBody(req) // Go 1.8: getBody = req.GetBody
+ if getBody == nil {
+ return nil, fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", err)
+ }
+ body, err := getBody()
+ if err != nil {
+ return nil, err
+ }
+ newReq := *req
+ newReq.Body = body
+ return &newReq, nil
+}
+
+func canRetryError(err error) bool {
+ if err == errClientConnUnusable || err == errClientConnGotGoAway {
+ return true
+ }
+ if se, ok := err.(StreamError); ok {
+ return se.Code == ErrCodeRefusedStream
+ }
+ return false
}
func (t *Transport) dialClientConn(addr string, singleUse bool) (*ClientConn, error) {
@@ -474,17 +520,18 @@ func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, error) {
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),
- singleUse: singleUse,
- wantSettingsAck: true,
- pings: make(map[[8]byte]chan struct{}),
+ 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.
+ peerMaxHeaderListSize: 0xffffffffffffffff, // "infinite", per spec. Use 2^64-1 instead.
+ streams: make(map[uint32]*clientStream),
+ singleUse: singleUse,
+ wantSettingsAck: true,
+ pings: make(map[[8]byte]chan struct{}),
}
if d := t.idleConnTimeout(); d != 0 {
cc.idleTimeout = d
@@ -560,6 +607,8 @@ func (cc *ClientConn) setGoAway(f *GoAwayFrame) {
}
}
+// CanTakeNewRequest reports whether the connection can take a new request,
+// meaning it has not been closed or received or sent a GOAWAY.
func (cc *ClientConn) CanTakeNewRequest() bool {
cc.mu.Lock()
defer cc.mu.Unlock()
@@ -571,8 +620,7 @@ func (cc *ClientConn) canTakeNewRequestLocked() bool {
return false
}
return cc.goAway == nil && !cc.closed &&
- int64(len(cc.streams)+1) < int64(cc.maxConcurrentStreams) &&
- cc.nextStreamID < math.MaxInt32
+ int64(cc.nextStreamID)+int64(cc.pendingRequests) < math.MaxInt32
}
// onIdleTimeout is called from a time.AfterFunc goroutine. It will
@@ -694,7 +742,7 @@ func checkConnHeaders(req *http.Request) error {
// req.ContentLength, where 0 actually means zero (not unknown) and -1
// means unknown.
func actualContentLength(req *http.Request) int64 {
- if req.Body == nil {
+ if req.Body == nil || reqBodyIsNoBody(req.Body) {
return 0
}
if req.ContentLength != 0 {
@@ -718,15 +766,14 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
hasTrailers := trailers != ""
cc.mu.Lock()
- cc.lastActive = time.Now()
- if cc.closed || !cc.canTakeNewRequestLocked() {
+ if err := cc.awaitOpenSlotForRequest(req); err != nil {
cc.mu.Unlock()
- return nil, errClientConnUnusable
+ return nil, err
}
body := req.Body
- hasBody := body != nil
contentLen := actualContentLength(req)
+ hasBody := contentLen != 0
// TODO(bradfitz): this is a copy of the logic in net/http. Unify somewhere?
var requestedGzip bool
@@ -816,14 +863,13 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
cs.abortRequestBodyWrite(errStopReqBodyWrite)
}
if re.err != nil {
- if re.err == errClientConnGotGoAway {
- cc.mu.Lock()
- if cs.startedWrite {
- re.err = errClientConnGotGoAwayAfterSomeReqBody
- }
- cc.mu.Unlock()
- }
+ cc.mu.Lock()
+ afterBodyWrite := cs.startedWrite
+ cc.mu.Unlock()
cc.forgetStreamID(cs.ID)
+ if afterBodyWrite {
+ return nil, afterReqBodyWriteError{re.err}
+ }
return nil, re.err
}
res.Request = req
@@ -836,31 +882,31 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
case re := <-readLoopResCh:
return handleReadLoopResponse(re)
case <-respHeaderTimer:
- cc.forgetStreamID(cs.ID)
if !hasBody || bodyWritten {
cc.writeStreamReset(cs.ID, ErrCodeCancel, nil)
} else {
bodyWriter.cancel()
cs.abortRequestBodyWrite(errStopReqBodyWriteAndCancel)
}
+ cc.forgetStreamID(cs.ID)
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)
}
+ cc.forgetStreamID(cs.ID)
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)
}
+ cc.forgetStreamID(cs.ID)
return nil, errRequestCanceled
case <-cs.peerReset:
// processResetStream already removed the
@@ -887,6 +933,45 @@ func (cc *ClientConn) RoundTrip(req *http.Request) (*http.Response, error) {
}
}
+// awaitOpenSlotForRequest waits until len(streams) < maxConcurrentStreams.
+// Must hold cc.mu.
+func (cc *ClientConn) awaitOpenSlotForRequest(req *http.Request) error {
+ var waitingForConn chan struct{}
+ var waitingForConnErr error // guarded by cc.mu
+ for {
+ cc.lastActive = time.Now()
+ if cc.closed || !cc.canTakeNewRequestLocked() {
+ return errClientConnUnusable
+ }
+ if int64(len(cc.streams))+1 <= int64(cc.maxConcurrentStreams) {
+ if waitingForConn != nil {
+ close(waitingForConn)
+ }
+ return nil
+ }
+ // Unfortunately, we cannot wait on a condition variable and channel at
+ // the same time, so instead, we spin up a goroutine to check if the
+ // request is canceled while we wait for a slot to open in the connection.
+ if waitingForConn == nil {
+ waitingForConn = make(chan struct{})
+ go func() {
+ if err := awaitRequestCancel(req, waitingForConn); err != nil {
+ cc.mu.Lock()
+ waitingForConnErr = err
+ cc.cond.Broadcast()
+ cc.mu.Unlock()
+ }
+ }()
+ }
+ cc.pendingRequests++
+ cc.cond.Wait()
+ cc.pendingRequests--
+ if waitingForConnErr != nil {
+ return waitingForConnErr
+ }
+ }
+}
+
// 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)
@@ -1002,8 +1087,13 @@ func (cs *clientStream) writeRequestBody(body io.Reader, bodyCloser io.Closer) (
var trls []byte
if hasTrailers {
cc.mu.Lock()
- defer cc.mu.Unlock()
- trls = cc.encodeTrailers(req)
+ trls, err = cc.encodeTrailers(req)
+ cc.mu.Unlock()
+ if err != nil {
+ cc.writeStreamReset(cs.ID, ErrCodeInternal, err)
+ cc.forgetStreamID(cs.ID)
+ return err
+ }
}
cc.wmu.Lock()
@@ -1106,62 +1196,86 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
}
}
- // 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", path)
- cc.writeHeader(":scheme", req.URL.Scheme)
- }
- if trailers != "" {
- cc.writeHeader("trailer", trailers)
+ enumerateHeaders := func(f func(name, value string)) {
+ // 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]).
+ f(":authority", host)
+ f(":method", req.Method)
+ if req.Method != "CONNECT" {
+ f(":path", path)
+ f(":scheme", req.URL.Scheme)
+ }
+ if trailers != "" {
+ f("trailer", trailers)
+ }
+
+ var didUA bool
+ for k, vv := range req.Header {
+ if strings.EqualFold(k, "host") || strings.EqualFold(k, "content-length") {
+ // Host is :authority, already sent.
+ // Content-Length is automatic, set below.
+ continue
+ } else if strings.EqualFold(k, "connection") || strings.EqualFold(k, "proxy-connection") ||
+ strings.EqualFold(k, "transfer-encoding") || strings.EqualFold(k, "upgrade") ||
+ strings.EqualFold(k, "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
+ } else if strings.EqualFold(k, "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 {
+ f(k, v)
+ }
+ }
+ if shouldSendReqContentLength(req.Method, contentLength) {
+ f("content-length", strconv.FormatInt(contentLength, 10))
+ }
+ if addGzipHeader {
+ f("accept-encoding", "gzip")
+ }
+ if !didUA {
+ f("user-agent", defaultUserAgent)
+ }
}
- 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)
+ // Do a first pass over the headers counting bytes to ensure
+ // we don't exceed cc.peerMaxHeaderListSize. This is done as a
+ // separate pass before encoding the headers to prevent
+ // modifying the hpack state.
+ hlSize := uint64(0)
+ enumerateHeaders(func(name, value string) {
+ hf := hpack.HeaderField{Name: name, Value: value}
+ hlSize += uint64(hf.Size())
+ })
+
+ if hlSize > cc.peerMaxHeaderListSize {
+ return nil, errRequestHeaderListSize
}
+
+ // Header list size is ok. Write the headers.
+ enumerateHeaders(func(name, value string) {
+ cc.writeHeader(strings.ToLower(name), value)
+ })
+
return cc.hbuf.Bytes(), nil
}
@@ -1188,17 +1302,29 @@ func shouldSendReqContentLength(method string, contentLength int64) bool {
}
// requires cc.mu be held.
-func (cc *ClientConn) encodeTrailers(req *http.Request) []byte {
+func (cc *ClientConn) encodeTrailers(req *http.Request) ([]byte, error) {
cc.hbuf.Reset()
+
+ hlSize := uint64(0)
for k, vv := range req.Trailer {
- // Transfer-Encoding, etc.. have already been filter at the
+ for _, v := range vv {
+ hf := hpack.HeaderField{Name: k, Value: v}
+ hlSize += uint64(hf.Size())
+ }
+ }
+ if hlSize > cc.peerMaxHeaderListSize {
+ return nil, errRequestHeaderListSize
+ }
+
+ for k, vv := range req.Trailer {
+ // Transfer-Encoding, etc.. have already been filtered at the
// start of RoundTrip
lowKey := strings.ToLower(k)
for _, v := range vv {
cc.writeHeader(lowKey, v)
}
}
- return cc.hbuf.Bytes()
+ return cc.hbuf.Bytes(), nil
}
func (cc *ClientConn) writeHeader(name, value string) {
@@ -1246,7 +1372,9 @@ func (cc *ClientConn) streamByID(id uint32, andRemove bool) *clientStream {
cc.idleTimer.Reset(cc.idleTimeout)
}
close(cs.done)
- cc.cond.Broadcast() // wake up checkResetOrDone via clientStream.awaitFlowControl
+ // Wake up checkResetOrDone via clientStream.awaitFlowControl and
+ // wake up RoundTrip if there is a pending request.
+ cc.cond.Broadcast()
}
return cs
}
@@ -1345,8 +1473,9 @@ func (rl *clientConnReadLoop) run() error {
cc.vlogf("http2: Transport readFrame error on conn %p: (%T) %v", cc, err, err)
}
if se, ok := err.(StreamError); ok {
- if cs := cc.streamByID(se.StreamID, true /*ended; remove it*/); cs != nil {
+ if cs := cc.streamByID(se.StreamID, false); cs != nil {
cs.cc.writeStreamReset(cs.ID, se.Code, err)
+ cs.cc.forgetStreamID(cs.ID)
if se.Cause == nil {
se.Cause = cc.fr.errDetail
}
@@ -1655,6 +1784,7 @@ func (b transportResponseBody) Close() error {
cc.wmu.Lock()
if !serverSentStreamEnd {
cc.fr.WriteRSTStream(cs.ID, ErrCodeCancel)
+ cs.didReset = true
}
// Return connection-level flow control.
if unread > 0 {
@@ -1667,6 +1797,7 @@ func (b transportResponseBody) Close() error {
}
cs.bufPipe.BreakWithError(errClosedResponseBody)
+ cc.forgetStreamID(cs.ID)
return nil
}
@@ -1701,13 +1832,15 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
}
return nil
}
+ if !cs.firstByte {
+ cc.logf("protocol error: received DATA before a HEADERS frame")
+ rl.endStreamError(cs, StreamError{
+ StreamID: f.StreamID,
+ Code: ErrCodeProtocol,
+ })
+ return nil
+ }
if f.Length > 0 {
- if len(data) > 0 && 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(f.Length) {
@@ -1718,16 +1851,27 @@ func (rl *clientConnReadLoop) processData(f *DataFrame) error {
}
// Return any padded flow control now, since we won't
// refund it later on body reads.
- if pad := int32(f.Length) - int32(len(data)); pad > 0 {
- cs.inflow.add(pad)
- cc.inflow.add(pad)
+ var refund int
+ if pad := int(f.Length) - len(data); pad > 0 {
+ refund += pad
+ }
+ // Return len(data) now if the stream is already closed,
+ // since data will never be read.
+ didReset := cs.didReset
+ if didReset {
+ refund += len(data)
+ }
+ if refund > 0 {
+ cc.inflow.add(int32(refund))
cc.wmu.Lock()
- cc.fr.WriteWindowUpdate(0, uint32(pad))
- cc.fr.WriteWindowUpdate(cs.ID, uint32(pad))
+ cc.fr.WriteWindowUpdate(0, uint32(refund))
+ if !didReset {
+ cs.inflow.add(int32(refund))
+ cc.fr.WriteWindowUpdate(cs.ID, uint32(refund))
+ }
cc.bw.Flush()
cc.wmu.Unlock()
}
- didReset := cs.didReset
cc.mu.Unlock()
if len(data) > 0 && !didReset {
@@ -1810,6 +1954,8 @@ func (rl *clientConnReadLoop) processSettings(f *SettingsFrame) error {
cc.maxFrameSize = s.Val
case SettingMaxConcurrentStreams:
cc.maxConcurrentStreams = s.Val
+ case SettingMaxHeaderListSize:
+ cc.peerMaxHeaderListSize = uint64(s.Val)
case SettingInitialWindowSize:
// Values above the maximum flow-control
// window size of 2^31-1 MUST be treated as a
@@ -1976,6 +2122,7 @@ func (cc *ClientConn) writeStreamReset(streamID uint32, code ErrCode, err error)
var (
errResponseHeaderListSize = errors.New("http2: response header list larger than advertised limit")
+ errRequestHeaderListSize = errors.New("http2: request header list larger than peer's advertised limit")
errPseudoTrailers = errors.New("http2: invalid pseudo header in trailers")
)
diff --git a/vendor/golang.org/x/net/http2/transport_test.go b/vendor/golang.org/x/net/http2/transport_test.go
index 7ae8ff787..0126ff483 100644
--- a/vendor/golang.org/x/net/http2/transport_test.go
+++ b/vendor/golang.org/x/net/http2/transport_test.go
@@ -16,6 +16,7 @@ import (
"math/rand"
"net"
"net/http"
+ "net/http/httptest"
"net/url"
"os"
"reflect"
@@ -65,7 +66,8 @@ type fakeTLSConn struct {
func (c *fakeTLSConn) ConnectionState() tls.ConnectionState {
return tls.ConnectionState{
- Version: tls.VersionTLS12,
+ Version: tls.VersionTLS12,
+ CipherSuite: cipher_TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,
}
}
@@ -416,6 +418,11 @@ func TestActualContentLength(t *testing.T) {
req: &http.Request{Body: panicReader{}, ContentLength: 5},
want: 5,
},
+ // http.NoBody means 0, not -1.
+ 3: {
+ req: &http.Request{Body: go18httpNoBody()},
+ want: 0,
+ },
}
for i, tt := range tests {
got := actualContentLength(tt.req)
@@ -679,7 +686,7 @@ func newLocalListener(t *testing.T) net.Listener {
return ln
}
-func (ct *clientTester) greet() {
+func (ct *clientTester) greet(settings ...Setting) {
buf := make([]byte, len(ClientPreface))
_, err := io.ReadFull(ct.sc, buf)
if err != nil {
@@ -693,7 +700,7 @@ func (ct *clientTester) greet() {
ct.t.Fatalf("Wanted client settings frame; got %v", f)
_ = sf // stash it away?
}
- if err := ct.fr.WriteSettings(); err != nil {
+ if err := ct.fr.WriteSettings(settings...); err != nil {
ct.t.Fatal(err)
}
if err := ct.fr.WriteSettingsAck(); err != nil {
@@ -1364,6 +1371,269 @@ func testInvalidTrailer(t *testing.T, trailers headerType, wantErr error, writeT
ct.run()
}
+// headerListSize returns the HTTP2 header list size of h.
+// http://httpwg.org/specs/rfc7540.html#SETTINGS_MAX_HEADER_LIST_SIZE
+// http://httpwg.org/specs/rfc7540.html#MaxHeaderBlock
+func headerListSize(h http.Header) (size uint32) {
+ for k, vv := range h {
+ for _, v := range vv {
+ hf := hpack.HeaderField{Name: k, Value: v}
+ size += hf.Size()
+ }
+ }
+ return size
+}
+
+// padHeaders adds data to an http.Header until headerListSize(h) ==
+// limit. Due to the way header list sizes are calculated, padHeaders
+// cannot add fewer than len("Pad-Headers") + 32 bytes to h, and will
+// call t.Fatal if asked to do so. PadHeaders first reserves enough
+// space for an empty "Pad-Headers" key, then adds as many copies of
+// filler as possible. Any remaining bytes necessary to push the
+// header list size up to limit are added to h["Pad-Headers"].
+func padHeaders(t *testing.T, h http.Header, limit uint64, filler string) {
+ if limit > 0xffffffff {
+ t.Fatalf("padHeaders: refusing to pad to more than 2^32-1 bytes. limit = %v", limit)
+ }
+ hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""}
+ minPadding := uint64(hf.Size())
+ size := uint64(headerListSize(h))
+
+ minlimit := size + minPadding
+ if limit < minlimit {
+ t.Fatalf("padHeaders: limit %v < %v", limit, minlimit)
+ }
+
+ // Use a fixed-width format for name so that fieldSize
+ // remains constant.
+ nameFmt := "Pad-Headers-%06d"
+ hf = hpack.HeaderField{Name: fmt.Sprintf(nameFmt, 1), Value: filler}
+ fieldSize := uint64(hf.Size())
+
+ // Add as many complete filler values as possible, leaving
+ // room for at least one empty "Pad-Headers" key.
+ limit = limit - minPadding
+ for i := 0; size+fieldSize < limit; i++ {
+ name := fmt.Sprintf(nameFmt, i)
+ h.Add(name, filler)
+ size += fieldSize
+ }
+
+ // Add enough bytes to reach limit.
+ remain := limit - size
+ lastValue := strings.Repeat("*", int(remain))
+ h.Add("Pad-Headers", lastValue)
+}
+
+func TestPadHeaders(t *testing.T) {
+ check := func(h http.Header, limit uint32, fillerLen int) {
+ if h == nil {
+ h = make(http.Header)
+ }
+ filler := strings.Repeat("f", fillerLen)
+ padHeaders(t, h, uint64(limit), filler)
+ gotSize := headerListSize(h)
+ if gotSize != limit {
+ t.Errorf("Got size = %v; want %v", gotSize, limit)
+ }
+ }
+ // Try all possible combinations for small fillerLen and limit.
+ hf := hpack.HeaderField{Name: "Pad-Headers", Value: ""}
+ minLimit := hf.Size()
+ for limit := minLimit; limit <= 128; limit++ {
+ for fillerLen := 0; uint32(fillerLen) <= limit; fillerLen++ {
+ check(nil, limit, fillerLen)
+ }
+ }
+
+ // Try a few tests with larger limits, plus cumulative
+ // tests. Since these tests are cumulative, tests[i+1].limit
+ // must be >= tests[i].limit + minLimit. See the comment on
+ // padHeaders for more info on why the limit arg has this
+ // restriction.
+ tests := []struct {
+ fillerLen int
+ limit uint32
+ }{
+ {
+ fillerLen: 64,
+ limit: 1024,
+ },
+ {
+ fillerLen: 1024,
+ limit: 1286,
+ },
+ {
+ fillerLen: 256,
+ limit: 2048,
+ },
+ {
+ fillerLen: 1024,
+ limit: 10 * 1024,
+ },
+ {
+ fillerLen: 1023,
+ limit: 11 * 1024,
+ },
+ }
+ h := make(http.Header)
+ for _, tc := range tests {
+ check(nil, tc.limit, tc.fillerLen)
+ check(h, tc.limit, tc.fillerLen)
+ }
+}
+
+func TestTransportChecksRequestHeaderListSize(t *testing.T) {
+ st := newServerTester(t,
+ func(w http.ResponseWriter, r *http.Request) {
+ // Consume body & force client to send
+ // trailers before writing response.
+ // ioutil.ReadAll returns non-nil err for
+ // requests that attempt to send greater than
+ // maxHeaderListSize bytes of trailers, since
+ // those requests generate a stream reset.
+ ioutil.ReadAll(r.Body)
+ r.Body.Close()
+ },
+ func(ts *httptest.Server) {
+ ts.Config.MaxHeaderBytes = 16 << 10
+ },
+ optOnlyServer,
+ optQuiet,
+ )
+ defer st.Close()
+
+ tr := &Transport{TLSClientConfig: tlsConfigInsecure}
+ defer tr.CloseIdleConnections()
+
+ checkRoundTrip := func(req *http.Request, wantErr error, desc string) {
+ res, err := tr.RoundTrip(req)
+ if err != wantErr {
+ if res != nil {
+ res.Body.Close()
+ }
+ t.Errorf("%v: RoundTrip err = %v; want %v", desc, err, wantErr)
+ return
+ }
+ if err == nil {
+ if res == nil {
+ t.Errorf("%v: response nil; want non-nil.", desc)
+ return
+ }
+ defer res.Body.Close()
+ if res.StatusCode != http.StatusOK {
+ t.Errorf("%v: response status = %v; want %v", desc, res.StatusCode, http.StatusOK)
+ }
+ return
+ }
+ if res != nil {
+ t.Errorf("%v: RoundTrip err = %v but response non-nil", desc, err)
+ }
+ }
+ headerListSizeForRequest := func(req *http.Request) (size uint64) {
+ contentLen := actualContentLength(req)
+ trailers, err := commaSeparatedTrailers(req)
+ if err != nil {
+ t.Fatalf("headerListSizeForRequest: %v", err)
+ }
+ cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff}
+ cc.henc = hpack.NewEncoder(&cc.hbuf)
+ cc.mu.Lock()
+ hdrs, err := cc.encodeHeaders(req, true, trailers, contentLen)
+ cc.mu.Unlock()
+ if err != nil {
+ t.Fatalf("headerListSizeForRequest: %v", err)
+ }
+ hpackDec := hpack.NewDecoder(initialHeaderTableSize, func(hf hpack.HeaderField) {
+ size += uint64(hf.Size())
+ })
+ if len(hdrs) > 0 {
+ if _, err := hpackDec.Write(hdrs); err != nil {
+ t.Fatalf("headerListSizeForRequest: %v", err)
+ }
+ }
+ return size
+ }
+ // Create a new Request for each test, rather than reusing the
+ // same Request, to avoid a race when modifying req.Headers.
+ // See https://github.com/golang/go/issues/21316
+ newRequest := func() *http.Request {
+ // Body must be non-nil to enable writing trailers.
+ body := strings.NewReader("hello")
+ req, err := http.NewRequest("POST", st.ts.URL, body)
+ if err != nil {
+ t.Fatalf("newRequest: NewRequest: %v", err)
+ }
+ return req
+ }
+
+ // Make an arbitrary request to ensure we get the server's
+ // settings frame and initialize peerMaxHeaderListSize.
+ req := newRequest()
+ checkRoundTrip(req, nil, "Initial request")
+
+ // Get the ClientConn associated with the request and validate
+ // peerMaxHeaderListSize.
+ addr := authorityAddr(req.URL.Scheme, req.URL.Host)
+ cc, err := tr.connPool().GetClientConn(req, addr)
+ if err != nil {
+ t.Fatalf("GetClientConn: %v", err)
+ }
+ cc.mu.Lock()
+ peerSize := cc.peerMaxHeaderListSize
+ cc.mu.Unlock()
+ st.scMu.Lock()
+ wantSize := uint64(st.sc.maxHeaderListSize())
+ st.scMu.Unlock()
+ if peerSize != wantSize {
+ t.Errorf("peerMaxHeaderListSize = %v; want %v", peerSize, wantSize)
+ }
+
+ // Sanity check peerSize. (*serverConn) maxHeaderListSize adds
+ // 320 bytes of padding.
+ wantHeaderBytes := uint64(st.ts.Config.MaxHeaderBytes) + 320
+ if peerSize != wantHeaderBytes {
+ t.Errorf("peerMaxHeaderListSize = %v; want %v.", peerSize, wantHeaderBytes)
+ }
+
+ // Pad headers & trailers, but stay under peerSize.
+ req = newRequest()
+ req.Header = make(http.Header)
+ req.Trailer = make(http.Header)
+ filler := strings.Repeat("*", 1024)
+ padHeaders(t, req.Trailer, peerSize, filler)
+ // cc.encodeHeaders adds some default headers to the request,
+ // so we need to leave room for those.
+ defaultBytes := headerListSizeForRequest(req)
+ padHeaders(t, req.Header, peerSize-defaultBytes, filler)
+ checkRoundTrip(req, nil, "Headers & Trailers under limit")
+
+ // Add enough header bytes to push us over peerSize.
+ req = newRequest()
+ req.Header = make(http.Header)
+ padHeaders(t, req.Header, peerSize, filler)
+ checkRoundTrip(req, errRequestHeaderListSize, "Headers over limit")
+
+ // Push trailers over the limit.
+ req = newRequest()
+ req.Trailer = make(http.Header)
+ padHeaders(t, req.Trailer, peerSize+1, filler)
+ checkRoundTrip(req, errRequestHeaderListSize, "Trailers over limit")
+
+ // Send headers with a single large value.
+ req = newRequest()
+ filler = strings.Repeat("*", int(peerSize))
+ req.Header = make(http.Header)
+ req.Header.Set("Big", filler)
+ checkRoundTrip(req, errRequestHeaderListSize, "Single large header")
+
+ // Send trailers with a single large value.
+ req = newRequest()
+ req.Trailer = make(http.Header)
+ req.Trailer.Set("Big", filler)
+ checkRoundTrip(req, errRequestHeaderListSize, "Single large trailer")
+}
+
func TestTransportChecksResponseHeaderListSize(t *testing.T) {
ct := newClientTester(t)
ct.client = func() error {
@@ -2204,12 +2474,11 @@ func testTransportUsesGoAwayDebugError(t *testing.T, failMidBody bool) {
ct.run()
}
-// See golang.org/issue/16481
-func TestTransportReturnsUnusedFlowControl(t *testing.T) {
+func testTransportReturnsUnusedFlowControl(t *testing.T, oneDataFrame bool) {
ct := newClientTester(t)
- clientClosed := make(chan bool, 1)
- serverWroteBody := make(chan bool, 1)
+ clientClosed := make(chan struct{})
+ serverWroteFirstByte := make(chan struct{})
ct.client = func() error {
req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
@@ -2217,13 +2486,13 @@ func TestTransportReturnsUnusedFlowControl(t *testing.T) {
if err != nil {
return err
}
- <-serverWroteBody
+ <-serverWroteFirstByte
if n, err := res.Body.Read(make([]byte, 1)); err != nil || n != 1 {
return fmt.Errorf("body read = %v, %v; want 1, nil", n, err)
}
res.Body.Close() // leaving 4999 bytes unread
- clientClosed <- true
+ close(clientClosed)
return nil
}
@@ -2258,10 +2527,27 @@ func TestTransportReturnsUnusedFlowControl(t *testing.T) {
EndStream: false,
BlockFragment: buf.Bytes(),
})
- ct.fr.WriteData(hf.StreamID, false, make([]byte, 5000)) // without ending stream
- serverWroteBody <- true
- <-clientClosed
+ // Two cases:
+ // - Send one DATA frame with 5000 bytes.
+ // - Send two DATA frames with 1 and 4999 bytes each.
+ //
+ // In both cases, the client should consume one byte of data,
+ // refund that byte, then refund the following 4999 bytes.
+ //
+ // In the second case, the server waits for the client connection to
+ // close before seconding the second DATA frame. This tests the case
+ // where the client receives a DATA frame after it has reset the stream.
+ if oneDataFrame {
+ ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 5000))
+ close(serverWroteFirstByte)
+ <-clientClosed
+ } else {
+ ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 1))
+ close(serverWroteFirstByte)
+ <-clientClosed
+ ct.fr.WriteData(hf.StreamID, false /* don't end stream */, make([]byte, 4999))
+ }
waitingFor := "RSTStreamFrame"
for {
@@ -2275,7 +2561,7 @@ func TestTransportReturnsUnusedFlowControl(t *testing.T) {
switch waitingFor {
case "RSTStreamFrame":
if rf, ok := f.(*RSTStreamFrame); !ok || rf.ErrCode != ErrCodeCancel {
- return fmt.Errorf("Expected a WindowUpdateFrame with code cancel; got %v", summarizeFrame(f))
+ return fmt.Errorf("Expected a RSTStreamFrame with code cancel; got %v", summarizeFrame(f))
}
waitingFor = "WindowUpdateFrame"
case "WindowUpdateFrame":
@@ -2289,6 +2575,16 @@ func TestTransportReturnsUnusedFlowControl(t *testing.T) {
ct.run()
}
+// See golang.org/issue/16481
+func TestTransportReturnsUnusedFlowControlSingleWrite(t *testing.T) {
+ testTransportReturnsUnusedFlowControl(t, true)
+}
+
+// See golang.org/issue/20469
+func TestTransportReturnsUnusedFlowControlMultipleWrites(t *testing.T) {
+ testTransportReturnsUnusedFlowControl(t, false)
+}
+
// Issue 16612: adjust flow control on open streams when transport
// receives SETTINGS with INITIAL_WINDOW_SIZE from server.
func TestTransportAdjustsFlowControl(t *testing.T) {
@@ -2528,7 +2824,7 @@ func TestTransportBodyDoubleEndStream(t *testing.T) {
}
}
-// golangorg/issue/16847
+// golang.org/issue/16847, golang.org/issue/19103
func TestTransportRequestPathPseudo(t *testing.T) {
type result struct {
path string
@@ -2548,9 +2844,9 @@ func TestTransportRequestPathPseudo(t *testing.T) {
},
want: result{path: "/foo"},
},
- // I guess we just don't let users request "//foo" as
- // a path, since it's illegal to start with two
- // slashes....
+ // In Go 1.7, we accepted paths of "//foo".
+ // In Go 1.8, we rejected it (issue 16847).
+ // In Go 1.9, we accepted it again (issue 19103).
1: {
req: &http.Request{
Method: "GET",
@@ -2559,7 +2855,7 @@ func TestTransportRequestPathPseudo(t *testing.T) {
Path: "//foo",
},
},
- want: result{err: `invalid request :path "//foo"`},
+ want: result{path: "//foo"},
},
// Opaque with //$Matching_Hostname/path
@@ -2630,7 +2926,7 @@ func TestTransportRequestPathPseudo(t *testing.T) {
},
}
for i, tt := range tests {
- cc := &ClientConn{}
+ cc := &ClientConn{peerMaxHeaderListSize: 0xffffffffffffffff}
cc.henc = hpack.NewEncoder(&cc.hbuf)
cc.mu.Lock()
hdrs, err := cc.encodeHeaders(tt.req, false, "", -1)
@@ -2894,6 +3190,339 @@ func TestTransportRetryAfterGOAWAY(t *testing.T) {
}
}
+func TestTransportRetryAfterRefusedStream(t *testing.T) {
+ clientDone := make(chan struct{})
+ ct := newClientTester(t)
+ ct.client = func() error {
+ defer ct.cc.(*net.TCPConn).CloseWrite()
+ defer close(clientDone)
+ req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
+ resp, err := ct.tr.RoundTrip(req)
+ if err != nil {
+ return fmt.Errorf("RoundTrip: %v", err)
+ }
+ resp.Body.Close()
+ if resp.StatusCode != 204 {
+ return fmt.Errorf("Status = %v; want 204", resp.StatusCode)
+ }
+ return nil
+ }
+ ct.server = func() error {
+ ct.greet()
+ var buf bytes.Buffer
+ enc := hpack.NewEncoder(&buf)
+ nreq := 0
+
+ for {
+ f, err := ct.fr.ReadFrame()
+ if err != nil {
+ select {
+ case <-clientDone:
+ // If the client's done, it
+ // will have reported any
+ // errors on its side.
+ return nil
+ default:
+ return err
+ }
+ }
+ switch f := f.(type) {
+ case *WindowUpdateFrame, *SettingsFrame:
+ case *HeadersFrame:
+ if !f.HeadersEnded() {
+ return fmt.Errorf("headers should have END_HEADERS be ended: %v", f)
+ }
+ nreq++
+ if nreq == 1 {
+ ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream)
+ } else {
+ enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"})
+ ct.fr.WriteHeaders(HeadersFrameParam{
+ StreamID: f.StreamID,
+ EndHeaders: true,
+ EndStream: true,
+ BlockFragment: buf.Bytes(),
+ })
+ }
+ default:
+ return fmt.Errorf("Unexpected client frame %v", f)
+ }
+ }
+ }
+ ct.run()
+}
+
+func TestTransportRetryHasLimit(t *testing.T) {
+ // Skip in short mode because the total expected delay is 1s+2s+4s+8s+16s=29s.
+ if testing.Short() {
+ t.Skip("skipping long test in short mode")
+ }
+ clientDone := make(chan struct{})
+ ct := newClientTester(t)
+ ct.client = func() error {
+ defer ct.cc.(*net.TCPConn).CloseWrite()
+ defer close(clientDone)
+ req, _ := http.NewRequest("GET", "https://dummy.tld/", nil)
+ resp, err := ct.tr.RoundTrip(req)
+ if err == nil {
+ return fmt.Errorf("RoundTrip expected error, got response: %+v", resp)
+ }
+ t.Logf("expected error, got: %v", err)
+ return nil
+ }
+ ct.server = func() error {
+ ct.greet()
+ for {
+ f, err := ct.fr.ReadFrame()
+ if err != nil {
+ select {
+ case <-clientDone:
+ // If the client's done, it
+ // will have reported any
+ // errors on its side.
+ return nil
+ default:
+ return err
+ }
+ }
+ switch f := f.(type) {
+ case *WindowUpdateFrame, *SettingsFrame:
+ case *HeadersFrame:
+ if !f.HeadersEnded() {
+ return fmt.Errorf("headers should have END_HEADERS be ended: %v", f)
+ }
+ ct.fr.WriteRSTStream(f.StreamID, ErrCodeRefusedStream)
+ default:
+ return fmt.Errorf("Unexpected client frame %v", f)
+ }
+ }
+ }
+ ct.run()
+}
+
+func TestTransportResponseDataBeforeHeaders(t *testing.T) {
+ ct := newClientTester(t)
+ ct.client = func() error {
+ defer ct.cc.(*net.TCPConn).CloseWrite()
+ req := httptest.NewRequest("GET", "https://dummy.tld/", nil)
+ // First request is normal to ensure the check is per stream and not per connection.
+ _, err := ct.tr.RoundTrip(req)
+ if err != nil {
+ return fmt.Errorf("RoundTrip expected no error, got: %v", err)
+ }
+ // Second request returns a DATA frame with no HEADERS.
+ resp, err := ct.tr.RoundTrip(req)
+ if err == nil {
+ return fmt.Errorf("RoundTrip expected error, got response: %+v", resp)
+ }
+ if err, ok := err.(StreamError); !ok || err.Code != ErrCodeProtocol {
+ return fmt.Errorf("expected stream PROTOCOL_ERROR, got: %v", err)
+ }
+ return nil
+ }
+ ct.server = func() error {
+ ct.greet()
+ for {
+ f, err := ct.fr.ReadFrame()
+ if err == io.EOF {
+ return nil
+ } else if err != nil {
+ return err
+ }
+ switch f := f.(type) {
+ case *WindowUpdateFrame, *SettingsFrame:
+ case *HeadersFrame:
+ switch f.StreamID {
+ case 1:
+ // Send a valid response to first request.
+ var buf bytes.Buffer
+ enc := hpack.NewEncoder(&buf)
+ enc.WriteField(hpack.HeaderField{Name: ":status", Value: "200"})
+ ct.fr.WriteHeaders(HeadersFrameParam{
+ StreamID: f.StreamID,
+ EndHeaders: true,
+ EndStream: true,
+ BlockFragment: buf.Bytes(),
+ })
+ case 3:
+ ct.fr.WriteData(f.StreamID, true, []byte("payload"))
+ }
+ default:
+ return fmt.Errorf("Unexpected client frame %v", f)
+ }
+ }
+ }
+ ct.run()
+}
+func TestTransportRequestsStallAtServerLimit(t *testing.T) {
+ const maxConcurrent = 2
+
+ greet := make(chan struct{}) // server sends initial SETTINGS frame
+ gotRequest := make(chan struct{}) // server received a request
+ clientDone := make(chan struct{})
+
+ // Collect errors from goroutines.
+ var wg sync.WaitGroup
+ errs := make(chan error, 100)
+ defer func() {
+ wg.Wait()
+ close(errs)
+ for err := range errs {
+ t.Error(err)
+ }
+ }()
+
+ // We will send maxConcurrent+2 requests. This checker goroutine waits for the
+ // following stages:
+ // 1. The first maxConcurrent requests are received by the server.
+ // 2. The client will cancel the next request
+ // 3. The server is unblocked so it can service the first maxConcurrent requests
+ // 4. The client will send the final request
+ wg.Add(1)
+ unblockClient := make(chan struct{})
+ clientRequestCancelled := make(chan struct{})
+ unblockServer := make(chan struct{})
+ go func() {
+ defer wg.Done()
+ // Stage 1.
+ for k := 0; k < maxConcurrent; k++ {
+ <-gotRequest
+ }
+ // Stage 2.
+ close(unblockClient)
+ <-clientRequestCancelled
+ // Stage 3: give some time for the final RoundTrip call to be scheduled and
+ // verify that the final request is not sent.
+ time.Sleep(50 * time.Millisecond)
+ select {
+ case <-gotRequest:
+ errs <- errors.New("last request did not stall")
+ close(unblockServer)
+ return
+ default:
+ }
+ close(unblockServer)
+ // Stage 4.
+ <-gotRequest
+ }()
+
+ ct := newClientTester(t)
+ ct.client = func() error {
+ var wg sync.WaitGroup
+ defer func() {
+ wg.Wait()
+ close(clientDone)
+ ct.cc.(*net.TCPConn).CloseWrite()
+ }()
+ for k := 0; k < maxConcurrent+2; k++ {
+ wg.Add(1)
+ go func(k int) {
+ defer wg.Done()
+ // Don't send the second request until after receiving SETTINGS from the server
+ // to avoid a race where we use the default SettingMaxConcurrentStreams, which
+ // is much larger than maxConcurrent. We have to send the first request before
+ // waiting because the first request triggers the dial and greet.
+ if k > 0 {
+ <-greet
+ }
+ // Block until maxConcurrent requests are sent before sending any more.
+ if k >= maxConcurrent {
+ <-unblockClient
+ }
+ req, _ := http.NewRequest("GET", fmt.Sprintf("https://dummy.tld/%d", k), nil)
+ if k == maxConcurrent {
+ // This request will be canceled.
+ cancel := make(chan struct{})
+ req.Cancel = cancel
+ close(cancel)
+ _, err := ct.tr.RoundTrip(req)
+ close(clientRequestCancelled)
+ if err == nil {
+ errs <- fmt.Errorf("RoundTrip(%d) should have failed due to cancel", k)
+ return
+ }
+ } else {
+ resp, err := ct.tr.RoundTrip(req)
+ if err != nil {
+ errs <- fmt.Errorf("RoundTrip(%d): %v", k, err)
+ return
+ }
+ ioutil.ReadAll(resp.Body)
+ resp.Body.Close()
+ if resp.StatusCode != 204 {
+ errs <- fmt.Errorf("Status = %v; want 204", resp.StatusCode)
+ return
+ }
+ }
+ }(k)
+ }
+ return nil
+ }
+
+ ct.server = func() error {
+ var wg sync.WaitGroup
+ defer wg.Wait()
+
+ ct.greet(Setting{SettingMaxConcurrentStreams, maxConcurrent})
+
+ // Server write loop.
+ var buf bytes.Buffer
+ enc := hpack.NewEncoder(&buf)
+ writeResp := make(chan uint32, maxConcurrent+1)
+
+ wg.Add(1)
+ go func() {
+ defer wg.Done()
+ <-unblockServer
+ for id := range writeResp {
+ buf.Reset()
+ enc.WriteField(hpack.HeaderField{Name: ":status", Value: "204"})
+ ct.fr.WriteHeaders(HeadersFrameParam{
+ StreamID: id,
+ EndHeaders: true,
+ EndStream: true,
+ BlockFragment: buf.Bytes(),
+ })
+ }
+ }()
+
+ // Server read loop.
+ var nreq int
+ for {
+ f, err := ct.fr.ReadFrame()
+ if err != nil {
+ select {
+ case <-clientDone:
+ // If the client's done, it will have reported any errors on its side.
+ return nil
+ default:
+ return err
+ }
+ }
+ switch f := f.(type) {
+ case *WindowUpdateFrame:
+ case *SettingsFrame:
+ // Wait for the client SETTINGS ack until ending the greet.
+ close(greet)
+ case *HeadersFrame:
+ if !f.HeadersEnded() {
+ return fmt.Errorf("headers should have END_HEADERS be ended: %v", f)
+ }
+ gotRequest <- struct{}{}
+ nreq++
+ writeResp <- f.StreamID
+ if nreq == maxConcurrent+1 {
+ close(writeResp)
+ }
+ default:
+ return fmt.Errorf("Unexpected client frame %v", f)
+ }
+ }
+ }
+
+ ct.run()
+}
+
func TestAuthorityAddr(t *testing.T) {
tests := []struct {
scheme, authority string
@@ -2914,3 +3543,144 @@ func TestAuthorityAddr(t *testing.T) {
}
}
}
+
+// Issue 20448: stop allocating for DATA frames' payload after
+// Response.Body.Close is called.
+func TestTransportAllocationsAfterResponseBodyClose(t *testing.T) {
+ megabyteZero := make([]byte, 1<<20)
+
+ writeErr := make(chan error, 1)
+
+ st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) {
+ w.(http.Flusher).Flush()
+ var sum int64
+ for i := 0; i < 100; i++ {
+ n, err := w.Write(megabyteZero)
+ sum += int64(n)
+ if err != nil {
+ writeErr <- err
+ return
+ }
+ }
+ t.Logf("wrote all %d bytes", sum)
+ writeErr <- nil
+ }, optOnlyServer)
+ defer st.Close()
+
+ tr := &Transport{TLSClientConfig: tlsConfigInsecure}
+ defer tr.CloseIdleConnections()
+ c := &http.Client{Transport: tr}
+ res, err := c.Get(st.ts.URL)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var buf [1]byte
+ if _, err := res.Body.Read(buf[:]); err != nil {
+ t.Error(err)
+ }
+ if err := res.Body.Close(); err != nil {
+ t.Error(err)
+ }
+
+ trb, ok := res.Body.(transportResponseBody)
+ if !ok {
+ t.Fatalf("res.Body = %T; want transportResponseBody", res.Body)
+ }
+ if trb.cs.bufPipe.b != nil {
+ t.Errorf("response body pipe is still open")
+ }
+
+ gotErr := <-writeErr
+ if gotErr == nil {
+ t.Errorf("Handler unexpectedly managed to write its entire response without getting an error")
+ } else if gotErr != errStreamClosed {
+ t.Errorf("Handler Write err = %v; want errStreamClosed", gotErr)
+ }
+}
+
+// Issue 18891: make sure Request.Body == NoBody means no DATA frame
+// is ever sent, even if empty.
+func TestTransportNoBodyMeansNoDATA(t *testing.T) {
+ ct := newClientTester(t)
+
+ unblockClient := make(chan bool)
+
+ ct.client = func() error {
+ req, _ := http.NewRequest("GET", "https://dummy.tld/", go18httpNoBody())
+ ct.tr.RoundTrip(req)
+ <-unblockClient
+ return nil
+ }
+ ct.server = func() error {
+ defer close(unblockClient)
+ defer ct.cc.(*net.TCPConn).Close()
+ ct.greet()
+
+ for {
+ f, err := ct.fr.ReadFrame()
+ if err != nil {
+ return fmt.Errorf("ReadFrame while waiting for Headers: %v", err)
+ }
+ switch f := f.(type) {
+ default:
+ return fmt.Errorf("Got %T; want HeadersFrame", f)
+ case *WindowUpdateFrame, *SettingsFrame:
+ continue
+ case *HeadersFrame:
+ if !f.StreamEnded() {
+ return fmt.Errorf("got headers frame without END_STREAM")
+ }
+ return nil
+ }
+ }
+ }
+ ct.run()
+}
+
+func benchSimpleRoundTrip(b *testing.B, nHeaders int) {
+ defer disableGoroutineTracking()()
+ b.ReportAllocs()
+ st := newServerTester(b,
+ func(w http.ResponseWriter, r *http.Request) {
+ },
+ optOnlyServer,
+ optQuiet,
+ )
+ defer st.Close()
+
+ tr := &Transport{TLSClientConfig: tlsConfigInsecure}
+ defer tr.CloseIdleConnections()
+
+ req, err := http.NewRequest("GET", st.ts.URL, nil)
+ if err != nil {
+ b.Fatal(err)
+ }
+
+ for i := 0; i < nHeaders; i++ {
+ name := fmt.Sprint("A-", i)
+ req.Header.Set(name, "*")
+ }
+
+ b.ResetTimer()
+
+ for i := 0; i < b.N; i++ {
+ res, err := tr.RoundTrip(req)
+ if err != nil {
+ if res != nil {
+ res.Body.Close()
+ }
+ b.Fatalf("RoundTrip err = %v; want nil", err)
+ }
+ res.Body.Close()
+ if res.StatusCode != http.StatusOK {
+ b.Fatalf("Response code = %v; want %v", res.StatusCode, http.StatusOK)
+ }
+ }
+}
+
+func BenchmarkClientRequestHeaders(b *testing.B) {
+ b.Run(" 0 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 0) })
+ b.Run(" 10 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 10) })
+ b.Run(" 100 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 100) })
+ b.Run("1000 Headers", func(b *testing.B) { benchSimpleRoundTrip(b, 1000) })
+}
diff --git a/vendor/golang.org/x/net/http2/writesched_priority.go b/vendor/golang.org/x/net/http2/writesched_priority.go
index 01132721b..848fed6ec 100644
--- a/vendor/golang.org/x/net/http2/writesched_priority.go
+++ b/vendor/golang.org/x/net/http2/writesched_priority.go
@@ -53,7 +53,7 @@ type PriorityWriteSchedulerConfig struct {
}
// NewPriorityWriteScheduler constructs a WriteScheduler that schedules
-// frames by following HTTP/2 priorities as described in RFC 7340 Section 5.3.
+// frames by following HTTP/2 priorities as described in RFC 7540 Section 5.3.
// If cfg is nil, default options are used.
func NewPriorityWriteScheduler(cfg *PriorityWriteSchedulerConfig) WriteScheduler {
if cfg == nil {
diff --git a/vendor/golang.org/x/net/icmp/helper.go b/vendor/golang.org/x/net/icmp/helper.go
deleted file mode 100644
index 6c4e633bc..000000000
--- a/vendor/golang.org/x/net/icmp/helper.go
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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 icmp
-
-import (
- "encoding/binary"
- "unsafe"
-)
-
-var (
- // See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html.
- freebsdVersion uint32
-
- nativeEndian binary.ByteOrder
-)
-
-func init() {
- i := uint32(1)
- b := (*[4]byte)(unsafe.Pointer(&i))
- if b[0] == 1 {
- nativeEndian = binary.LittleEndian
- } else {
- nativeEndian = binary.BigEndian
- }
-}
diff --git a/vendor/golang.org/x/net/icmp/ipv4.go b/vendor/golang.org/x/net/icmp/ipv4.go
index 729ddc97c..ffc66ed4d 100644
--- a/vendor/golang.org/x/net/icmp/ipv4.go
+++ b/vendor/golang.org/x/net/icmp/ipv4.go
@@ -9,9 +9,14 @@ import (
"net"
"runtime"
+ "golang.org/x/net/internal/socket"
"golang.org/x/net/ipv4"
)
+// freebsdVersion is set in sys_freebsd.go.
+// See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html.
+var freebsdVersion uint32
+
// ParseIPv4Header parses b as an IPv4 header of ICMP error message
// invoking packet, which is contained in ICMP error message.
func ParseIPv4Header(b []byte) (*ipv4.Header, error) {
@@ -36,12 +41,12 @@ func ParseIPv4Header(b []byte) (*ipv4.Header, error) {
}
switch runtime.GOOS {
case "darwin":
- h.TotalLen = int(nativeEndian.Uint16(b[2:4]))
+ h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4]))
case "freebsd":
if freebsdVersion >= 1000000 {
h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
} else {
- h.TotalLen = int(nativeEndian.Uint16(b[2:4]))
+ h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4]))
}
default:
h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
diff --git a/vendor/golang.org/x/net/icmp/ipv4_test.go b/vendor/golang.org/x/net/icmp/ipv4_test.go
index 47cc00d07..058953f43 100644
--- a/vendor/golang.org/x/net/icmp/ipv4_test.go
+++ b/vendor/golang.org/x/net/icmp/ipv4_test.go
@@ -11,6 +11,7 @@ import (
"runtime"
"testing"
+ "golang.org/x/net/internal/socket"
"golang.org/x/net/ipv4"
)
@@ -55,7 +56,7 @@ var ipv4HeaderLittleEndianTest = ipv4HeaderTest{
func TestParseIPv4Header(t *testing.T) {
tt := &ipv4HeaderLittleEndianTest
- if nativeEndian != binary.LittleEndian {
+ if socket.NativeEndian != binary.LittleEndian {
t.Skip("no test for non-little endian machine yet")
}
diff --git a/vendor/golang.org/x/net/idna/example_test.go b/vendor/golang.org/x/net/idna/example_test.go
index 941e707d8..948f6eb20 100644
--- a/vendor/golang.org/x/net/idna/example_test.go
+++ b/vendor/golang.org/x/net/idna/example_test.go
@@ -51,6 +51,10 @@ func ExampleNew() {
idna.Transitional(true)) // Map ß -> ss
fmt.Println(p.ToASCII("*.faß.com"))
+ // Lookup for registration. Also does not allow '*'.
+ p = idna.New(idna.ValidateForRegistration())
+ fmt.Println(p.ToUnicode("*.faß.com"))
+
// Set up a profile maps for lookup, but allows wild cards.
p = idna.New(
idna.MapForLookup(),
@@ -60,6 +64,7 @@ func ExampleNew() {
// Output:
// *.xn--fa-hia.com
- // *.fass.com idna: disallowed rune U+002E
+ // *.fass.com idna: disallowed rune U+002A
+ // *.faß.com idna: disallowed rune U+002A
// *.fass.com
}
diff --git a/vendor/golang.org/x/net/idna/idna.go b/vendor/golang.org/x/net/idna/idna.go
index ee2dbda6d..eb2473507 100644
--- a/vendor/golang.org/x/net/idna/idna.go
+++ b/vendor/golang.org/x/net/idna/idna.go
@@ -67,6 +67,15 @@ func VerifyDNSLength(verify bool) Option {
return func(o *options) { o.verifyDNSLength = verify }
}
+// RemoveLeadingDots removes leading label separators. Leading runes that map to
+// dots, such as U+3002, are removed as well.
+//
+// This is the behavior suggested by the UTS #46 and is adopted by some
+// browsers.
+func RemoveLeadingDots(remove bool) Option {
+ return func(o *options) { o.removeLeadingDots = remove }
+}
+
// ValidateLabels sets whether to check the mandatory label validation criteria
// as defined in Section 5.4 of RFC 5891. This includes testing for correct use
// of hyphens ('-'), normalization, validity of runes, and the context rules.
@@ -133,14 +142,16 @@ func MapForLookup() Option {
o.mapping = validateAndMap
StrictDomainName(true)(o)
ValidateLabels(true)(o)
+ RemoveLeadingDots(true)(o)
}
}
type options struct {
- transitional bool
- useSTD3Rules bool
- validateLabels bool
- verifyDNSLength bool
+ transitional bool
+ useSTD3Rules bool
+ validateLabels bool
+ verifyDNSLength bool
+ removeLeadingDots bool
trie *idnaTrie
@@ -240,21 +251,23 @@ var (
punycode = &Profile{}
lookup = &Profile{options{
- transitional: true,
- useSTD3Rules: true,
- validateLabels: true,
- trie: trie,
- fromPuny: validateFromPunycode,
- mapping: validateAndMap,
- bidirule: bidirule.ValidString,
+ transitional: true,
+ useSTD3Rules: true,
+ validateLabels: true,
+ removeLeadingDots: true,
+ trie: trie,
+ fromPuny: validateFromPunycode,
+ mapping: validateAndMap,
+ bidirule: bidirule.ValidString,
}}
display = &Profile{options{
- useSTD3Rules: true,
- validateLabels: true,
- trie: trie,
- fromPuny: validateFromPunycode,
- mapping: validateAndMap,
- bidirule: bidirule.ValidString,
+ useSTD3Rules: true,
+ validateLabels: true,
+ removeLeadingDots: true,
+ trie: trie,
+ fromPuny: validateFromPunycode,
+ mapping: validateAndMap,
+ bidirule: bidirule.ValidString,
}}
registration = &Profile{options{
useSTD3Rules: true,
@@ -293,7 +306,9 @@ func (p *Profile) process(s string, toASCII bool) (string, error) {
s, err = p.mapping(p, s)
}
// Remove leading empty labels.
- for ; len(s) > 0 && s[0] == '.'; s = s[1:] {
+ if p.removeLeadingDots {
+ for ; len(s) > 0 && s[0] == '.'; s = s[1:] {
+ }
}
// It seems like we should only create this error on ToASCII, but the
// UTS 46 conformance tests suggests we should always check this.
@@ -373,23 +388,20 @@ func validateRegistration(p *Profile, s string) (string, error) {
if !norm.NFC.IsNormalString(s) {
return s, &labelError{s, "V1"}
}
- var err error
for i := 0; i < len(s); {
v, sz := trie.lookupString(s[i:])
- i += sz
// Copy bytes not copied so far.
switch p.simplify(info(v).category()) {
// TODO: handle the NV8 defined in the Unicode idna data set to allow
// for strict conformance to IDNA2008.
case valid, deviation:
case disallowed, mapped, unknown, ignored:
- if err == nil {
- r, _ := utf8.DecodeRuneInString(s[i:])
- err = runeError(r)
- }
+ r, _ := utf8.DecodeRuneInString(s[i:])
+ return s, runeError(r)
}
+ i += sz
}
- return s, err
+ return s, nil
}
func validateAndMap(p *Profile, s string) (string, error) {
@@ -408,7 +420,7 @@ func validateAndMap(p *Profile, s string) (string, error) {
continue
case disallowed:
if err == nil {
- r, _ := utf8.DecodeRuneInString(s[i:])
+ r, _ := utf8.DecodeRuneInString(s[start:])
err = runeError(r)
}
continue
diff --git a/vendor/golang.org/x/net/internal/iana/const.go b/vendor/golang.org/x/net/internal/iana/const.go
index 3438a27c8..c9df24d95 100644
--- a/vendor/golang.org/x/net/internal/iana/const.go
+++ b/vendor/golang.org/x/net/internal/iana/const.go
@@ -4,7 +4,7 @@
// Package iana provides protocol number resources managed by the Internet Assigned Numbers Authority (IANA).
package iana // import "golang.org/x/net/internal/iana"
-// Differentiated Services Field Codepoints (DSCP), Updated: 2013-06-25
+// Differentiated Services Field Codepoints (DSCP), Updated: 2017-05-12
const (
DiffServCS0 = 0x0 // CS0
DiffServCS1 = 0x20 // CS1
@@ -26,7 +26,7 @@ const (
DiffServAF41 = 0x88 // AF41
DiffServAF42 = 0x90 // AF42
DiffServAF43 = 0x98 // AF43
- DiffServEFPHB = 0xb8 // EF PHB
+ DiffServEF = 0xb8 // EF
DiffServVOICEADMIT = 0xb0 // VOICE-ADMIT
)
@@ -38,7 +38,7 @@ const (
CongestionExperienced = 0x3 // CE (Congestion Experienced)
)
-// Protocol Numbers, Updated: 2015-10-06
+// Protocol Numbers, Updated: 2016-06-22
const (
ProtocolIP = 0 // IPv4 encapsulation, pseudo protocol number
ProtocolHOPOPT = 0 // IPv6 Hop-by-Hop Option
diff --git a/vendor/golang.org/x/net/internal/netreflect/socket.go b/vendor/golang.org/x/net/internal/netreflect/socket.go
deleted file mode 100644
index 1495b65f5..000000000
--- a/vendor/golang.org/x/net/internal/netreflect/socket.go
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.9
-
-// Package netreflect implements run-time reflection for the
-// facilities of net package.
-//
-// This package works only for Go 1.8 or below.
-package netreflect
-
-import (
- "errors"
- "net"
-)
-
-var (
- errInvalidType = errors.New("invalid type")
- errOpNoSupport = errors.New("operation not supported")
-)
-
-// SocketOf returns the socket descriptor of c.
-func SocketOf(c net.Conn) (uintptr, error) {
- switch c.(type) {
- case *net.TCPConn, *net.UDPConn, *net.IPConn, *net.UnixConn:
- return socketOf(c)
- default:
- return 0, errInvalidType
- }
-}
-
-// PacketSocketOf returns the socket descriptor of c.
-func PacketSocketOf(c net.PacketConn) (uintptr, error) {
- switch c.(type) {
- case *net.UDPConn, *net.IPConn, *net.UnixConn:
- return socketOf(c.(net.Conn))
- default:
- return 0, errInvalidType
- }
-}
diff --git a/vendor/golang.org/x/net/internal/netreflect/socket_19.go b/vendor/golang.org/x/net/internal/netreflect/socket_19.go
deleted file mode 100644
index 74df52e1a..000000000
--- a/vendor/golang.org/x/net/internal/netreflect/socket_19.go
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright 2017 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.9
-
-package netreflect
-
-import (
- "errors"
- "net"
-)
-
-var (
- errInvalidType = errors.New("invalid type")
- errOpNoSupport = errors.New("operation not supported")
-)
-
-// SocketOf returns the socket descriptor of c.
-func SocketOf(c net.Conn) (uintptr, error) {
- switch c.(type) {
- case *net.TCPConn, *net.UDPConn, *net.IPConn, *net.UnixConn:
- return 0, errOpNoSupport
- default:
- return 0, errInvalidType
- }
-}
-
-// PacketSocketOf returns the socket descriptor of c.
-func PacketSocketOf(c net.PacketConn) (uintptr, error) {
- switch c.(type) {
- case *net.UDPConn, *net.IPConn, *net.UnixConn:
- return 0, errOpNoSupport
- default:
- return 0, errInvalidType
- }
-}
diff --git a/vendor/golang.org/x/net/internal/netreflect/socket_posix.go b/vendor/golang.org/x/net/internal/netreflect/socket_posix.go
deleted file mode 100644
index 410c0924d..000000000
--- a/vendor/golang.org/x/net/internal/netreflect/socket_posix.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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.9
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package netreflect
-
-import (
- "net"
- "reflect"
- "runtime"
-)
-
-func socketOf(c net.Conn) (uintptr, error) {
- v := reflect.ValueOf(c)
- switch e := v.Elem(); e.Kind() {
- case reflect.Struct:
- fd := e.FieldByName("conn").FieldByName("fd")
- switch e := fd.Elem(); e.Kind() {
- case reflect.Struct:
- sysfd := e.FieldByName("sysfd")
- if runtime.GOOS == "windows" {
- return uintptr(sysfd.Uint()), nil
- }
- return uintptr(sysfd.Int()), nil
- }
- }
- return 0, errInvalidType
-}
diff --git a/vendor/golang.org/x/net/internal/netreflect/socket_stub.go b/vendor/golang.org/x/net/internal/netreflect/socket_stub.go
deleted file mode 100644
index 17b20c478..000000000
--- a/vendor/golang.org/x/net/internal/netreflect/socket_stub.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.9
-// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
-
-package netreflect
-
-import "net"
-
-func socketOf(c net.Conn) (uintptr, error) { return 0, errOpNoSupport }
diff --git a/vendor/golang.org/x/net/internal/netreflect/socket_test.go b/vendor/golang.org/x/net/internal/netreflect/socket_test.go
deleted file mode 100644
index b3aad0d92..000000000
--- a/vendor/golang.org/x/net/internal/netreflect/socket_test.go
+++ /dev/null
@@ -1,65 +0,0 @@
-// 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.9
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
-package netreflect_test
-
-import (
- "net"
- "os"
- "testing"
-
- "golang.org/x/net/internal/netreflect"
- "golang.org/x/net/internal/nettest"
-)
-
-func TestSocketOf(t *testing.T) {
- for _, network := range []string{"tcp", "unix", "unixpacket"} {
- if !nettest.TestableNetwork(network) {
- continue
- }
- ln, err := nettest.NewLocalListener(network)
- if err != nil {
- t.Error(err)
- continue
- }
- defer func() {
- path := ln.Addr().String()
- ln.Close()
- if network == "unix" || network == "unixpacket" {
- os.Remove(path)
- }
- }()
- c, err := net.Dial(ln.Addr().Network(), ln.Addr().String())
- if err != nil {
- t.Error(err)
- continue
- }
- defer c.Close()
- if _, err := netreflect.SocketOf(c); err != nil {
- t.Error(err)
- continue
- }
- }
-}
-
-func TestPacketSocketOf(t *testing.T) {
- for _, network := range []string{"udp", "unixgram"} {
- if !nettest.TestableNetwork(network) {
- continue
- }
- c, err := nettest.NewLocalPacketListener(network)
- if err != nil {
- t.Error(err)
- continue
- }
- defer c.Close()
- if _, err := netreflect.PacketSocketOf(c); err != nil {
- t.Error(err)
- continue
- }
- }
-}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr.go b/vendor/golang.org/x/net/internal/socket/cmsghdr.go
new file mode 100644
index 000000000..1eb07d26d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr.go
@@ -0,0 +1,11 @@
+// Copyright 2017 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 darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package socket
+
+func (h *cmsghdr) len() int { return int(h.Len) }
+func (h *cmsghdr) lvl() int { return int(h.Level) }
+func (h *cmsghdr) typ() int { return int(h.Type) }
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
new file mode 100644
index 000000000..d1d0c2de5
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_bsd.go
@@ -0,0 +1,13 @@
+// Copyright 2017 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 darwin dragonfly freebsd netbsd openbsd
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
new file mode 100644
index 000000000..bac66811d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_32bit.go
@@ -0,0 +1,14 @@
+// Copyright 2017 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 arm mips mipsle 386
+// +build linux
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
new file mode 100644
index 000000000..63f0534fa
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_linux_64bit.go
@@ -0,0 +1,14 @@
+// Copyright 2017 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 arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
+// +build linux
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint64(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
new file mode 100644
index 000000000..7dedd430e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_solaris_64bit.go
@@ -0,0 +1,14 @@
+// Copyright 2017 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 amd64
+// +build solaris
+
+package socket
+
+func (h *cmsghdr) set(l, lvl, typ int) {
+ h.Len = uint32(l)
+ h.Level = int32(lvl)
+ h.Type = int32(typ)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go b/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
new file mode 100644
index 000000000..a4e71226f
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/cmsghdr_stub.go
@@ -0,0 +1,17 @@
+// Copyright 2017 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 !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
+
+package socket
+
+type cmsghdr struct{}
+
+const sizeofCmsghdr = 0
+
+func (h *cmsghdr) len() int { return 0 }
+func (h *cmsghdr) lvl() int { return 0 }
+func (h *cmsghdr) typ() int { return 0 }
+
+func (h *cmsghdr) set(l, lvl, typ int) {}
diff --git a/vendor/golang.org/x/net/internal/socket/defs_darwin.go b/vendor/golang.org/x/net/internal/socket/defs_darwin.go
new file mode 100644
index 000000000..14e28c0b4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/defs_darwin.go
@@ -0,0 +1,44 @@
+// Copyright 2017 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 ignore
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package socket
+
+/*
+#include
+
+#include
+*/
+import "C"
+
+const (
+ sysAF_UNSPEC = C.AF_UNSPEC
+ sysAF_INET = C.AF_INET
+ sysAF_INET6 = C.AF_INET6
+
+ sysSOCK_RAW = C.SOCK_RAW
+)
+
+type iovec C.struct_iovec
+
+type msghdr C.struct_msghdr
+
+type cmsghdr C.struct_cmsghdr
+
+type sockaddrInet C.struct_sockaddr_in
+
+type sockaddrInet6 C.struct_sockaddr_in6
+
+const (
+ sizeofIovec = C.sizeof_struct_iovec
+ sizeofMsghdr = C.sizeof_struct_msghdr
+ sizeofCmsghdr = C.sizeof_struct_cmsghdr
+
+ sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
+ sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go b/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go
new file mode 100644
index 000000000..14e28c0b4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/defs_dragonfly.go
@@ -0,0 +1,44 @@
+// Copyright 2017 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 ignore
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package socket
+
+/*
+#include
+
+#include
+*/
+import "C"
+
+const (
+ sysAF_UNSPEC = C.AF_UNSPEC
+ sysAF_INET = C.AF_INET
+ sysAF_INET6 = C.AF_INET6
+
+ sysSOCK_RAW = C.SOCK_RAW
+)
+
+type iovec C.struct_iovec
+
+type msghdr C.struct_msghdr
+
+type cmsghdr C.struct_cmsghdr
+
+type sockaddrInet C.struct_sockaddr_in
+
+type sockaddrInet6 C.struct_sockaddr_in6
+
+const (
+ sizeofIovec = C.sizeof_struct_iovec
+ sizeofMsghdr = C.sizeof_struct_msghdr
+ sizeofCmsghdr = C.sizeof_struct_cmsghdr
+
+ sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
+ sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_freebsd.go b/vendor/golang.org/x/net/internal/socket/defs_freebsd.go
new file mode 100644
index 000000000..14e28c0b4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/defs_freebsd.go
@@ -0,0 +1,44 @@
+// Copyright 2017 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 ignore
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package socket
+
+/*
+#include
+
+#include
+*/
+import "C"
+
+const (
+ sysAF_UNSPEC = C.AF_UNSPEC
+ sysAF_INET = C.AF_INET
+ sysAF_INET6 = C.AF_INET6
+
+ sysSOCK_RAW = C.SOCK_RAW
+)
+
+type iovec C.struct_iovec
+
+type msghdr C.struct_msghdr
+
+type cmsghdr C.struct_cmsghdr
+
+type sockaddrInet C.struct_sockaddr_in
+
+type sockaddrInet6 C.struct_sockaddr_in6
+
+const (
+ sizeofIovec = C.sizeof_struct_iovec
+ sizeofMsghdr = C.sizeof_struct_msghdr
+ sizeofCmsghdr = C.sizeof_struct_cmsghdr
+
+ sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
+ sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_linux.go b/vendor/golang.org/x/net/internal/socket/defs_linux.go
new file mode 100644
index 000000000..ce9ec2f6d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/defs_linux.go
@@ -0,0 +1,49 @@
+// Copyright 2017 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 ignore
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package socket
+
+/*
+#include
+#include
+
+#define _GNU_SOURCE
+#include
+*/
+import "C"
+
+const (
+ sysAF_UNSPEC = C.AF_UNSPEC
+ sysAF_INET = C.AF_INET
+ sysAF_INET6 = C.AF_INET6
+
+ sysSOCK_RAW = C.SOCK_RAW
+)
+
+type iovec C.struct_iovec
+
+type msghdr C.struct_msghdr
+
+type mmsghdr C.struct_mmsghdr
+
+type cmsghdr C.struct_cmsghdr
+
+type sockaddrInet C.struct_sockaddr_in
+
+type sockaddrInet6 C.struct_sockaddr_in6
+
+const (
+ sizeofIovec = C.sizeof_struct_iovec
+ sizeofMsghdr = C.sizeof_struct_msghdr
+ sizeofMmsghdr = C.sizeof_struct_mmsghdr
+ sizeofCmsghdr = C.sizeof_struct_cmsghdr
+
+ sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
+ sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_netbsd.go b/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
new file mode 100644
index 000000000..3f8433569
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/defs_netbsd.go
@@ -0,0 +1,47 @@
+// Copyright 2017 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 ignore
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package socket
+
+/*
+#include
+
+#include
+*/
+import "C"
+
+const (
+ sysAF_UNSPEC = C.AF_UNSPEC
+ sysAF_INET = C.AF_INET
+ sysAF_INET6 = C.AF_INET6
+
+ sysSOCK_RAW = C.SOCK_RAW
+)
+
+type iovec C.struct_iovec
+
+type msghdr C.struct_msghdr
+
+type mmsghdr C.struct_mmsghdr
+
+type cmsghdr C.struct_cmsghdr
+
+type sockaddrInet C.struct_sockaddr_in
+
+type sockaddrInet6 C.struct_sockaddr_in6
+
+const (
+ sizeofIovec = C.sizeof_struct_iovec
+ sizeofMsghdr = C.sizeof_struct_msghdr
+ sizeofMmsghdr = C.sizeof_struct_mmsghdr
+ sizeofCmsghdr = C.sizeof_struct_cmsghdr
+
+ sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
+ sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_openbsd.go b/vendor/golang.org/x/net/internal/socket/defs_openbsd.go
new file mode 100644
index 000000000..14e28c0b4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/defs_openbsd.go
@@ -0,0 +1,44 @@
+// Copyright 2017 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 ignore
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package socket
+
+/*
+#include
+
+#include
+*/
+import "C"
+
+const (
+ sysAF_UNSPEC = C.AF_UNSPEC
+ sysAF_INET = C.AF_INET
+ sysAF_INET6 = C.AF_INET6
+
+ sysSOCK_RAW = C.SOCK_RAW
+)
+
+type iovec C.struct_iovec
+
+type msghdr C.struct_msghdr
+
+type cmsghdr C.struct_cmsghdr
+
+type sockaddrInet C.struct_sockaddr_in
+
+type sockaddrInet6 C.struct_sockaddr_in6
+
+const (
+ sizeofIovec = C.sizeof_struct_iovec
+ sizeofMsghdr = C.sizeof_struct_msghdr
+ sizeofCmsghdr = C.sizeof_struct_cmsghdr
+
+ sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
+ sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/defs_solaris.go b/vendor/golang.org/x/net/internal/socket/defs_solaris.go
new file mode 100644
index 000000000..14e28c0b4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/defs_solaris.go
@@ -0,0 +1,44 @@
+// Copyright 2017 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 ignore
+
+// +godefs map struct_in_addr [4]byte /* in_addr */
+// +godefs map struct_in6_addr [16]byte /* in6_addr */
+
+package socket
+
+/*
+#include
+
+#include
+*/
+import "C"
+
+const (
+ sysAF_UNSPEC = C.AF_UNSPEC
+ sysAF_INET = C.AF_INET
+ sysAF_INET6 = C.AF_INET6
+
+ sysSOCK_RAW = C.SOCK_RAW
+)
+
+type iovec C.struct_iovec
+
+type msghdr C.struct_msghdr
+
+type cmsghdr C.struct_cmsghdr
+
+type sockaddrInet C.struct_sockaddr_in
+
+type sockaddrInet6 C.struct_sockaddr_in6
+
+const (
+ sizeofIovec = C.sizeof_struct_iovec
+ sizeofMsghdr = C.sizeof_struct_msghdr
+ sizeofCmsghdr = C.sizeof_struct_cmsghdr
+
+ sizeofSockaddrInet = C.sizeof_struct_sockaddr_in
+ sizeofSockaddrInet6 = C.sizeof_struct_sockaddr_in6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/error_unix.go b/vendor/golang.org/x/net/internal/socket/error_unix.go
new file mode 100644
index 000000000..93dff9180
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/error_unix.go
@@ -0,0 +1,31 @@
+// Copyright 2017 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 darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package socket
+
+import "syscall"
+
+var (
+ errEAGAIN error = syscall.EAGAIN
+ errEINVAL error = syscall.EINVAL
+ errENOENT error = syscall.ENOENT
+)
+
+// errnoErr returns common boxed Errno values, to prevent allocations
+// at runtime.
+func errnoErr(errno syscall.Errno) error {
+ switch errno {
+ case 0:
+ return nil
+ case syscall.EAGAIN:
+ return errEAGAIN
+ case syscall.EINVAL:
+ return errEINVAL
+ case syscall.ENOENT:
+ return errENOENT
+ }
+ return errno
+}
diff --git a/vendor/golang.org/x/net/internal/socket/error_windows.go b/vendor/golang.org/x/net/internal/socket/error_windows.go
new file mode 100644
index 000000000..6a6379a8b
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/error_windows.go
@@ -0,0 +1,26 @@
+// Copyright 2017 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 socket
+
+import "syscall"
+
+var (
+ errERROR_IO_PENDING error = syscall.ERROR_IO_PENDING
+ errEINVAL error = syscall.EINVAL
+)
+
+// errnoErr returns common boxed Errno values, to prevent allocations
+// at runtime.
+func errnoErr(errno syscall.Errno) error {
+ switch errno {
+ case 0:
+ return nil
+ case syscall.ERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ case syscall.EINVAL:
+ return errEINVAL
+ }
+ return errno
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_32bit.go b/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
new file mode 100644
index 000000000..d6a570c90
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_32bit.go
@@ -0,0 +1,15 @@
+// Copyright 2017 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 arm mips mipsle 386
+// +build darwin dragonfly freebsd linux netbsd openbsd
+
+package socket
+
+import "unsafe"
+
+func (v *iovec) set(b []byte) {
+ v.Base = (*byte)(unsafe.Pointer(&b[0]))
+ v.Len = uint32(len(b))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_64bit.go b/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
new file mode 100644
index 000000000..2ae435e64
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_64bit.go
@@ -0,0 +1,15 @@
+// Copyright 2017 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 arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
+// +build darwin dragonfly freebsd linux netbsd openbsd
+
+package socket
+
+import "unsafe"
+
+func (v *iovec) set(b []byte) {
+ v.Base = (*byte)(unsafe.Pointer(&b[0]))
+ v.Len = uint64(len(b))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go b/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
new file mode 100644
index 000000000..100a62820
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_solaris_64bit.go
@@ -0,0 +1,15 @@
+// Copyright 2017 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 amd64
+// +build solaris
+
+package socket
+
+import "unsafe"
+
+func (v *iovec) set(b []byte) {
+ v.Base = (*int8)(unsafe.Pointer(&b[0]))
+ v.Len = uint64(len(b))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/iovec_stub.go b/vendor/golang.org/x/net/internal/socket/iovec_stub.go
new file mode 100644
index 000000000..c87d2a933
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/iovec_stub.go
@@ -0,0 +1,11 @@
+// Copyright 2017 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 !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
+
+package socket
+
+type iovec struct{}
+
+func (v *iovec) set(b []byte) {}
diff --git a/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go b/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
new file mode 100644
index 000000000..2e80a9cb7
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/mmsghdr_stub.go
@@ -0,0 +1,21 @@
+// Copyright 2017 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 !linux,!netbsd
+
+package socket
+
+import "net"
+
+type mmsghdr struct{}
+
+type mmsghdrs []mmsghdr
+
+func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error {
+ return nil
+}
+
+func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
+ return nil
+}
diff --git a/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go b/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
new file mode 100644
index 000000000..3c42ea7ad
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/mmsghdr_unix.go
@@ -0,0 +1,42 @@
+// Copyright 2017 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 linux netbsd
+
+package socket
+
+import "net"
+
+type mmsghdrs []mmsghdr
+
+func (hs mmsghdrs) pack(ms []Message, parseFn func([]byte, string) (net.Addr, error), marshalFn func(net.Addr) []byte) error {
+ for i := range hs {
+ vs := make([]iovec, len(ms[i].Buffers))
+ var sa []byte
+ if parseFn != nil {
+ sa = make([]byte, sizeofSockaddrInet6)
+ }
+ if marshalFn != nil {
+ sa = marshalFn(ms[i].Addr)
+ }
+ hs[i].Hdr.pack(vs, ms[i].Buffers, ms[i].OOB, sa)
+ }
+ return nil
+}
+
+func (hs mmsghdrs) unpack(ms []Message, parseFn func([]byte, string) (net.Addr, error), hint string) error {
+ for i := range hs {
+ ms[i].N = int(hs[i].Len)
+ ms[i].NN = hs[i].Hdr.controllen()
+ ms[i].Flags = hs[i].Hdr.flags()
+ if parseFn != nil {
+ var err error
+ ms[i].Addr, err = parseFn(hs[i].Hdr.name(), hint)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go b/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
new file mode 100644
index 000000000..5567afc88
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_bsd.go
@@ -0,0 +1,39 @@
+// Copyright 2017 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 darwin dragonfly freebsd netbsd openbsd
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ h.setIov(vs)
+ if len(oob) > 0 {
+ h.Control = (*byte)(unsafe.Pointer(&oob[0]))
+ h.Controllen = uint32(len(oob))
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ }
+}
+
+func (h *msghdr) name() []byte {
+ if h.Name != nil && h.Namelen > 0 {
+ return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
+ }
+ return nil
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Controllen)
+}
+
+func (h *msghdr) flags() int {
+ return int(h.Flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go b/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
new file mode 100644
index 000000000..3fcb04280
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_bsdvar.go
@@ -0,0 +1,12 @@
+// Copyright 2017 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 darwin dragonfly freebsd netbsd
+
+package socket
+
+func (h *msghdr) setIov(vs []iovec) {
+ h.Iov = &vs[0]
+ h.Iovlen = int32(len(vs))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_linux.go b/vendor/golang.org/x/net/internal/socket/msghdr_linux.go
new file mode 100644
index 000000000..5a38798cc
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_linux.go
@@ -0,0 +1,36 @@
+// Copyright 2017 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 socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ h.setIov(vs)
+ if len(oob) > 0 {
+ h.setControl(oob)
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ }
+}
+
+func (h *msghdr) name() []byte {
+ if h.Name != nil && h.Namelen > 0 {
+ return (*[sizeofSockaddrInet6]byte)(unsafe.Pointer(h.Name))[:h.Namelen]
+ }
+ return nil
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Controllen)
+}
+
+func (h *msghdr) flags() int {
+ return int(h.Flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go b/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
new file mode 100644
index 000000000..9f671aec0
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_linux_32bit.go
@@ -0,0 +1,20 @@
+// Copyright 2017 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 arm mips mipsle 386
+// +build linux
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) setIov(vs []iovec) {
+ h.Iov = &vs[0]
+ h.Iovlen = uint32(len(vs))
+}
+
+func (h *msghdr) setControl(b []byte) {
+ h.Control = (*byte)(unsafe.Pointer(&b[0]))
+ h.Controllen = uint32(len(b))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go b/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
new file mode 100644
index 000000000..9f7870621
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_linux_64bit.go
@@ -0,0 +1,20 @@
+// Copyright 2017 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 arm64 amd64 ppc64 ppc64le mips64 mips64le s390x
+// +build linux
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) setIov(vs []iovec) {
+ h.Iov = &vs[0]
+ h.Iovlen = uint64(len(vs))
+}
+
+func (h *msghdr) setControl(b []byte) {
+ h.Control = (*byte)(unsafe.Pointer(&b[0]))
+ h.Controllen = uint64(len(b))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go b/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go
new file mode 100644
index 000000000..be354ff84
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_openbsd.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+func (h *msghdr) setIov(vs []iovec) {
+ h.Iov = &vs[0]
+ h.Iovlen = uint32(len(vs))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go b/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
new file mode 100644
index 000000000..d1b059397
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_solaris_64bit.go
@@ -0,0 +1,34 @@
+// Copyright 2017 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 amd64
+// +build solaris
+
+package socket
+
+import "unsafe"
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {
+ for i := range vs {
+ vs[i].set(bs[i])
+ }
+ h.Iov = &vs[0]
+ h.Iovlen = int32(len(vs))
+ if len(oob) > 0 {
+ h.Accrights = (*int8)(unsafe.Pointer(&oob[0]))
+ h.Accrightslen = int32(len(oob))
+ }
+ if sa != nil {
+ h.Name = (*byte)(unsafe.Pointer(&sa[0]))
+ h.Namelen = uint32(len(sa))
+ }
+}
+
+func (h *msghdr) controllen() int {
+ return int(h.Accrightslen)
+}
+
+func (h *msghdr) flags() int {
+ return int(NativeEndian.Uint32(h.Pad_cgo_2[:]))
+}
diff --git a/vendor/golang.org/x/net/internal/socket/msghdr_stub.go b/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
new file mode 100644
index 000000000..64e817335
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/msghdr_stub.go
@@ -0,0 +1,14 @@
+// Copyright 2017 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 !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris
+
+package socket
+
+type msghdr struct{}
+
+func (h *msghdr) pack(vs []iovec, bs [][]byte, oob []byte, sa []byte) {}
+func (h *msghdr) name() []byte { return nil }
+func (h *msghdr) controllen() int { return 0 }
+func (h *msghdr) flags() int { return 0 }
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn.go b/vendor/golang.org/x/net/internal/socket/rawconn.go
new file mode 100644
index 000000000..d6871d55f
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn.go
@@ -0,0 +1,66 @@
+// Copyright 2017 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.9
+
+package socket
+
+import (
+ "errors"
+ "net"
+ "os"
+ "syscall"
+)
+
+// A Conn represents a raw connection.
+type Conn struct {
+ network string
+ c syscall.RawConn
+}
+
+// NewConn returns a new raw connection.
+func NewConn(c net.Conn) (*Conn, error) {
+ var err error
+ var cc Conn
+ switch c := c.(type) {
+ case *net.TCPConn:
+ cc.network = "tcp"
+ cc.c, err = c.SyscallConn()
+ case *net.UDPConn:
+ cc.network = "udp"
+ cc.c, err = c.SyscallConn()
+ case *net.IPConn:
+ cc.network = "ip"
+ cc.c, err = c.SyscallConn()
+ default:
+ return nil, errors.New("unknown connection type")
+ }
+ if err != nil {
+ return nil, err
+ }
+ return &cc, nil
+}
+
+func (o *Option) get(c *Conn, b []byte) (int, error) {
+ var operr error
+ var n int
+ fn := func(s uintptr) {
+ n, operr = getsockopt(s, o.Level, o.Name, b)
+ }
+ if err := c.c.Control(fn); err != nil {
+ return 0, err
+ }
+ return n, os.NewSyscallError("getsockopt", operr)
+}
+
+func (o *Option) set(c *Conn, b []byte) error {
+ var operr error
+ fn := func(s uintptr) {
+ operr = setsockopt(s, o.Level, o.Name, b)
+ }
+ if err := c.c.Control(fn); err != nil {
+ return err
+ }
+ return os.NewSyscallError("setsockopt", operr)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
new file mode 100644
index 000000000..499164a3f
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_mmsg.go
@@ -0,0 +1,74 @@
+// Copyright 2017 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.9
+// +build linux
+
+package socket
+
+import (
+ "net"
+ "os"
+ "syscall"
+)
+
+func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
+ hs := make(mmsghdrs, len(ms))
+ var parseFn func([]byte, string) (net.Addr, error)
+ if c.network != "tcp" {
+ parseFn = parseInetAddr
+ }
+ if err := hs.pack(ms, parseFn, nil); err != nil {
+ return 0, err
+ }
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = recvmmsg(s, hs, flags)
+ if operr == syscall.EAGAIN {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Read(fn); err != nil {
+ return n, err
+ }
+ if operr != nil {
+ return n, os.NewSyscallError("recvmmsg", operr)
+ }
+ if err := hs[:n].unpack(ms[:n], parseFn, c.network); err != nil {
+ return n, err
+ }
+ return n, nil
+}
+
+func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
+ hs := make(mmsghdrs, len(ms))
+ var marshalFn func(net.Addr) []byte
+ if c.network != "tcp" {
+ marshalFn = marshalInetAddr
+ }
+ if err := hs.pack(ms, nil, marshalFn); err != nil {
+ return 0, err
+ }
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = sendmmsg(s, hs, flags)
+ if operr == syscall.EAGAIN {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Write(fn); err != nil {
+ return n, err
+ }
+ if operr != nil {
+ return n, os.NewSyscallError("sendmmsg", operr)
+ }
+ if err := hs[:n].unpack(ms[:n], nil, ""); err != nil {
+ return n, err
+ }
+ return n, nil
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_msg.go b/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
new file mode 100644
index 000000000..b21d2e641
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_msg.go
@@ -0,0 +1,77 @@
+// Copyright 2017 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.9
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
+
+package socket
+
+import (
+ "os"
+ "syscall"
+)
+
+func (c *Conn) recvMsg(m *Message, flags int) error {
+ var h msghdr
+ vs := make([]iovec, len(m.Buffers))
+ var sa []byte
+ if c.network != "tcp" {
+ sa = make([]byte, sizeofSockaddrInet6)
+ }
+ h.pack(vs, m.Buffers, m.OOB, sa)
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = recvmsg(s, &h, flags)
+ if operr == syscall.EAGAIN {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Read(fn); err != nil {
+ return err
+ }
+ if operr != nil {
+ return os.NewSyscallError("recvmsg", operr)
+ }
+ if c.network != "tcp" {
+ var err error
+ m.Addr, err = parseInetAddr(sa[:], c.network)
+ if err != nil {
+ return err
+ }
+ }
+ m.N = n
+ m.NN = h.controllen()
+ m.Flags = h.flags()
+ return nil
+}
+
+func (c *Conn) sendMsg(m *Message, flags int) error {
+ var h msghdr
+ vs := make([]iovec, len(m.Buffers))
+ var sa []byte
+ if m.Addr != nil {
+ sa = marshalInetAddr(m.Addr)
+ }
+ h.pack(vs, m.Buffers, m.OOB, sa)
+ var operr error
+ var n int
+ fn := func(s uintptr) bool {
+ n, operr = sendmsg(s, &h, flags)
+ if operr == syscall.EAGAIN {
+ return false
+ }
+ return true
+ }
+ if err := c.c.Write(fn); err != nil {
+ return err
+ }
+ if operr != nil {
+ return os.NewSyscallError("sendmsg", operr)
+ }
+ m.N = n
+ m.NN = len(m.OOB)
+ return nil
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
new file mode 100644
index 000000000..f78832aa4
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_nommsg.go
@@ -0,0 +1,18 @@
+// Copyright 2017 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.9
+// +build !linux
+
+package socket
+
+import "errors"
+
+func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go b/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
new file mode 100644
index 000000000..96733cbe1
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_nomsg.go
@@ -0,0 +1,18 @@
+// Copyright 2017 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.9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
+
+package socket
+
+import "errors"
+
+func (c *Conn) recvMsg(m *Message, flags int) error {
+ return errors.New("not implemented")
+}
+
+func (c *Conn) sendMsg(m *Message, flags int) error {
+ return errors.New("not implemented")
+}
diff --git a/vendor/golang.org/x/net/internal/socket/rawconn_stub.go b/vendor/golang.org/x/net/internal/socket/rawconn_stub.go
new file mode 100644
index 000000000..d2add1a0a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/rawconn_stub.go
@@ -0,0 +1,25 @@
+// Copyright 2017 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.9
+
+package socket
+
+import "errors"
+
+func (c *Conn) recvMsg(m *Message, flags int) error {
+ return errors.New("not implemented")
+}
+
+func (c *Conn) sendMsg(m *Message, flags int) error {
+ return errors.New("not implemented")
+}
+
+func (c *Conn) recvMsgs(ms []Message, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func (c *Conn) sendMsgs(ms []Message, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
diff --git a/vendor/golang.org/x/net/internal/socket/reflect.go b/vendor/golang.org/x/net/internal/socket/reflect.go
new file mode 100644
index 000000000..bb179f11d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/reflect.go
@@ -0,0 +1,62 @@
+// Copyright 2017 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.9
+
+package socket
+
+import (
+ "errors"
+ "net"
+ "os"
+ "reflect"
+ "runtime"
+)
+
+// A Conn represents a raw connection.
+type Conn struct {
+ c net.Conn
+}
+
+// NewConn returns a new raw connection.
+func NewConn(c net.Conn) (*Conn, error) {
+ return &Conn{c: c}, nil
+}
+
+func (o *Option) get(c *Conn, b []byte) (int, error) {
+ s, err := socketOf(c.c)
+ if err != nil {
+ return 0, err
+ }
+ n, err := getsockopt(s, o.Level, o.Name, b)
+ return n, os.NewSyscallError("getsockopt", err)
+}
+
+func (o *Option) set(c *Conn, b []byte) error {
+ s, err := socketOf(c.c)
+ if err != nil {
+ return err
+ }
+ return os.NewSyscallError("setsockopt", setsockopt(s, o.Level, o.Name, b))
+}
+
+func socketOf(c net.Conn) (uintptr, error) {
+ switch c.(type) {
+ case *net.TCPConn, *net.UDPConn, *net.IPConn:
+ v := reflect.ValueOf(c)
+ switch e := v.Elem(); e.Kind() {
+ case reflect.Struct:
+ fd := e.FieldByName("conn").FieldByName("fd")
+ switch e := fd.Elem(); e.Kind() {
+ case reflect.Struct:
+ sysfd := e.FieldByName("sysfd")
+ if runtime.GOOS == "windows" {
+ return uintptr(sysfd.Uint()), nil
+ }
+ return uintptr(sysfd.Int()), nil
+ }
+ }
+ }
+ return 0, errors.New("invalid type")
+}
diff --git a/vendor/golang.org/x/net/internal/socket/socket.go b/vendor/golang.org/x/net/internal/socket/socket.go
new file mode 100644
index 000000000..729dea14b
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/socket.go
@@ -0,0 +1,285 @@
+// Copyright 2017 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 socket provides a portable interface for socket system
+// calls.
+package socket // import "golang.org/x/net/internal/socket"
+
+import (
+ "errors"
+ "net"
+ "unsafe"
+)
+
+// An Option represents a sticky socket option.
+type Option struct {
+ Level int // level
+ Name int // name; must be equal or greater than 1
+ Len int // length of value in bytes; must be equal or greater than 1
+}
+
+// Get reads a value for the option from the kernel.
+// It returns the number of bytes written into b.
+func (o *Option) Get(c *Conn, b []byte) (int, error) {
+ if o.Name < 1 || o.Len < 1 {
+ return 0, errors.New("invalid option")
+ }
+ if len(b) < o.Len {
+ return 0, errors.New("short buffer")
+ }
+ return o.get(c, b)
+}
+
+// GetInt returns an integer value for the option.
+//
+// The Len field of Option must be either 1 or 4.
+func (o *Option) GetInt(c *Conn) (int, error) {
+ if o.Len != 1 && o.Len != 4 {
+ return 0, errors.New("invalid option")
+ }
+ var b []byte
+ var bb [4]byte
+ if o.Len == 1 {
+ b = bb[:1]
+ } else {
+ b = bb[:4]
+ }
+ n, err := o.get(c, b)
+ if err != nil {
+ return 0, err
+ }
+ if n != o.Len {
+ return 0, errors.New("invalid option length")
+ }
+ if o.Len == 1 {
+ return int(b[0]), nil
+ }
+ return int(NativeEndian.Uint32(b[:4])), nil
+}
+
+// Set writes the option and value to the kernel.
+func (o *Option) Set(c *Conn, b []byte) error {
+ if o.Name < 1 || o.Len < 1 {
+ return errors.New("invalid option")
+ }
+ if len(b) < o.Len {
+ return errors.New("short buffer")
+ }
+ return o.set(c, b)
+}
+
+// SetInt writes the option and value to the kernel.
+//
+// The Len field of Option must be either 1 or 4.
+func (o *Option) SetInt(c *Conn, v int) error {
+ if o.Len != 1 && o.Len != 4 {
+ return errors.New("invalid option")
+ }
+ var b []byte
+ if o.Len == 1 {
+ b = []byte{byte(v)}
+ } else {
+ var bb [4]byte
+ NativeEndian.PutUint32(bb[:o.Len], uint32(v))
+ b = bb[:4]
+ }
+ return o.set(c, b)
+}
+
+func controlHeaderLen() int {
+ return roundup(sizeofCmsghdr)
+}
+
+func controlMessageLen(dataLen int) int {
+ return roundup(sizeofCmsghdr) + dataLen
+}
+
+// ControlMessageSpace returns the whole length of control message.
+func ControlMessageSpace(dataLen int) int {
+ return roundup(sizeofCmsghdr) + roundup(dataLen)
+}
+
+// A ControlMessage represents the head message in a stream of control
+// messages.
+//
+// A control message comprises of a header, data and a few padding
+// fields to conform to the interface to the kernel.
+//
+// See RFC 3542 for further information.
+type ControlMessage []byte
+
+// Data returns the data field of the control message at the head on
+// w.
+func (m ControlMessage) Data(dataLen int) []byte {
+ l := controlHeaderLen()
+ if len(m) < l || len(m) < l+dataLen {
+ return nil
+ }
+ return m[l : l+dataLen]
+}
+
+// Next returns the control message at the next on w.
+//
+// Next works only for standard control messages.
+func (m ControlMessage) Next(dataLen int) ControlMessage {
+ l := ControlMessageSpace(dataLen)
+ if len(m) < l {
+ return nil
+ }
+ return m[l:]
+}
+
+// MarshalHeader marshals the header fields of the control message at
+// the head on w.
+func (m ControlMessage) MarshalHeader(lvl, typ, dataLen int) error {
+ if len(m) < controlHeaderLen() {
+ return errors.New("short message")
+ }
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ h.set(controlMessageLen(dataLen), lvl, typ)
+ return nil
+}
+
+// ParseHeader parses and returns the header fields of the control
+// message at the head on w.
+func (m ControlMessage) ParseHeader() (lvl, typ, dataLen int, err error) {
+ l := controlHeaderLen()
+ if len(m) < l {
+ return 0, 0, 0, errors.New("short message")
+ }
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ return h.lvl(), h.typ(), int(uint64(h.len()) - uint64(l)), nil
+}
+
+// Marshal marshals the control message at the head on w, and returns
+// the next control message.
+func (m ControlMessage) Marshal(lvl, typ int, data []byte) (ControlMessage, error) {
+ l := len(data)
+ if len(m) < ControlMessageSpace(l) {
+ return nil, errors.New("short message")
+ }
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ h.set(controlMessageLen(l), lvl, typ)
+ if l > 0 {
+ copy(m.Data(l), data)
+ }
+ return m.Next(l), nil
+}
+
+// Parse parses w as a single or multiple control messages.
+//
+// Parse works for both standard and compatible messages.
+func (m ControlMessage) Parse() ([]ControlMessage, error) {
+ var ms []ControlMessage
+ for len(m) >= controlHeaderLen() {
+ h := (*cmsghdr)(unsafe.Pointer(&m[0]))
+ l := h.len()
+ if l <= 0 {
+ return nil, errors.New("invalid header length")
+ }
+ if uint64(l) < uint64(controlHeaderLen()) {
+ return nil, errors.New("invalid message length")
+ }
+ if uint64(l) > uint64(len(m)) {
+ return nil, errors.New("short buffer")
+ }
+ // On message reception:
+ //
+ // |<- ControlMessageSpace --------------->|
+ // |<- controlMessageLen ---------->| |
+ // |<- controlHeaderLen ->| | |
+ // +---------------+------+---------+------+
+ // | Header | PadH | Data | PadD |
+ // +---------------+------+---------+------+
+ //
+ // On compatible message reception:
+ //
+ // | ... |<- controlMessageLen ----------->|
+ // | ... |<- controlHeaderLen ->| |
+ // +-----+---------------+------+----------+
+ // | ... | Header | PadH | Data |
+ // +-----+---------------+------+----------+
+ ms = append(ms, ControlMessage(m[:l]))
+ ll := l - controlHeaderLen()
+ if len(m) >= ControlMessageSpace(ll) {
+ m = m[ControlMessageSpace(ll):]
+ } else {
+ m = m[controlMessageLen(ll):]
+ }
+ }
+ return ms, nil
+}
+
+// NewControlMessage returns a new stream of control messages.
+func NewControlMessage(dataLen []int) ControlMessage {
+ var l int
+ for i := range dataLen {
+ l += ControlMessageSpace(dataLen[i])
+ }
+ return make([]byte, l)
+}
+
+// A Message represents an IO message.
+type Message struct {
+ // When writing, the Buffers field must contain at least one
+ // byte to write.
+ // When reading, the Buffers field will always contain a byte
+ // to read.
+ Buffers [][]byte
+
+ // OOB contains protocol-specific control or miscellaneous
+ // ancillary data known as out-of-band data.
+ OOB []byte
+
+ // Addr specifies a destination address when writing.
+ // It can be nil when the underlying protocol of the raw
+ // connection uses connection-oriented communication.
+ // After a successful read, it may contain the source address
+ // on the received packet.
+ Addr net.Addr
+
+ N int // # of bytes read or written from/to Buffers
+ NN int // # of bytes read or written from/to OOB
+ Flags int // protocol-specific information on the received message
+}
+
+// RecvMsg wraps recvmsg system call.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+func (c *Conn) RecvMsg(m *Message, flags int) error {
+ return c.recvMsg(m, flags)
+}
+
+// SendMsg wraps sendmsg system call.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+func (c *Conn) SendMsg(m *Message, flags int) error {
+ return c.sendMsg(m, flags)
+}
+
+// RecvMsgs wraps recvmmsg system call.
+//
+// It returns the number of processed messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// Only Linux supports this.
+func (c *Conn) RecvMsgs(ms []Message, flags int) (int, error) {
+ return c.recvMsgs(ms, flags)
+}
+
+// SendMsgs wraps sendmmsg system call.
+//
+// It returns the number of processed messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// Only Linux supports this.
+func (c *Conn) SendMsgs(ms []Message, flags int) (int, error) {
+ return c.sendMsgs(ms, flags)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go b/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go
new file mode 100644
index 000000000..109fed762
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/socket_go1_9_test.go
@@ -0,0 +1,256 @@
+// Copyright 2017 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.9
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+
+package socket_test
+
+import (
+ "bytes"
+ "fmt"
+ "net"
+ "runtime"
+ "testing"
+
+ "golang.org/x/net/internal/nettest"
+ "golang.org/x/net/internal/socket"
+)
+
+type mockControl struct {
+ Level int
+ Type int
+ Data []byte
+}
+
+func TestControlMessage(t *testing.T) {
+ for _, tt := range []struct {
+ cs []mockControl
+ }{
+ {
+ []mockControl{
+ {Level: 1, Type: 1},
+ },
+ },
+ {
+ []mockControl{
+ {Level: 2, Type: 2, Data: []byte{0xfe}},
+ },
+ },
+ {
+ []mockControl{
+ {Level: 3, Type: 3, Data: []byte{0xfe, 0xff, 0xff, 0xfe}},
+ },
+ },
+ {
+ []mockControl{
+ {Level: 4, Type: 4, Data: []byte{0xfe, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfe}},
+ },
+ },
+ {
+ []mockControl{
+ {Level: 4, Type: 4, Data: []byte{0xfe, 0xff, 0xff, 0xfe, 0xfe, 0xff, 0xff, 0xfe}},
+ {Level: 2, Type: 2, Data: []byte{0xfe}},
+ },
+ },
+ } {
+ var w []byte
+ var tailPadLen int
+ mm := socket.NewControlMessage([]int{0})
+ for i, c := range tt.cs {
+ m := socket.NewControlMessage([]int{len(c.Data)})
+ l := len(m) - len(mm)
+ if i == len(tt.cs)-1 && l > len(c.Data) {
+ tailPadLen = l - len(c.Data)
+ }
+ w = append(w, m...)
+ }
+
+ var err error
+ ww := make([]byte, len(w))
+ copy(ww, w)
+ m := socket.ControlMessage(ww)
+ for _, c := range tt.cs {
+ if err = m.MarshalHeader(c.Level, c.Type, len(c.Data)); err != nil {
+ t.Fatalf("(%v).MarshalHeader() = %v", tt.cs, err)
+ }
+ copy(m.Data(len(c.Data)), c.Data)
+ m = m.Next(len(c.Data))
+ }
+ m = socket.ControlMessage(w)
+ for _, c := range tt.cs {
+ m, err = m.Marshal(c.Level, c.Type, c.Data)
+ if err != nil {
+ t.Fatalf("(%v).Marshal() = %v", tt.cs, err)
+ }
+ }
+ if !bytes.Equal(ww, w) {
+ t.Fatalf("got %#v; want %#v", ww, w)
+ }
+
+ ws := [][]byte{w}
+ if tailPadLen > 0 {
+ // Test a message with no tail padding.
+ nopad := w[:len(w)-tailPadLen]
+ ws = append(ws, [][]byte{nopad}...)
+ }
+ for _, w := range ws {
+ ms, err := socket.ControlMessage(w).Parse()
+ if err != nil {
+ t.Fatalf("(%v).Parse() = %v", tt.cs, err)
+ }
+ for i, m := range ms {
+ lvl, typ, dataLen, err := m.ParseHeader()
+ if err != nil {
+ t.Fatalf("(%v).ParseHeader() = %v", tt.cs, err)
+ }
+ if lvl != tt.cs[i].Level || typ != tt.cs[i].Type || dataLen != len(tt.cs[i].Data) {
+ t.Fatalf("%v: got %d, %d, %d; want %d, %d, %d", tt.cs[i], lvl, typ, dataLen, tt.cs[i].Level, tt.cs[i].Type, len(tt.cs[i].Data))
+ }
+ }
+ }
+ }
+}
+
+func TestUDP(t *testing.T) {
+ c, err := nettest.NewLocalPacketListener("udp")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+
+ t.Run("Message", func(t *testing.T) {
+ testUDPMessage(t, c.(net.Conn))
+ })
+ switch runtime.GOOS {
+ case "linux":
+ t.Run("Messages", func(t *testing.T) {
+ testUDPMessages(t, c.(net.Conn))
+ })
+ }
+}
+
+func testUDPMessage(t *testing.T, c net.Conn) {
+ cc, err := socket.NewConn(c)
+ if err != nil {
+ t.Fatal(err)
+ }
+ data := []byte("HELLO-R-U-THERE")
+ wm := socket.Message{
+ Buffers: bytes.SplitAfter(data, []byte("-")),
+ Addr: c.LocalAddr(),
+ }
+ if err := cc.SendMsg(&wm, 0); err != nil {
+ t.Fatal(err)
+ }
+ b := make([]byte, 32)
+ rm := socket.Message{
+ Buffers: [][]byte{b[:1], b[1:3], b[3:7], b[7:11], b[11:]},
+ }
+ if err := cc.RecvMsg(&rm, 0); err != nil {
+ t.Fatal(err)
+ }
+ if !bytes.Equal(b[:rm.N], data) {
+ t.Fatalf("got %#v; want %#v", b[:rm.N], data)
+ }
+}
+
+func testUDPMessages(t *testing.T, c net.Conn) {
+ cc, err := socket.NewConn(c)
+ if err != nil {
+ t.Fatal(err)
+ }
+ data := []byte("HELLO-R-U-THERE")
+ wmbs := bytes.SplitAfter(data, []byte("-"))
+ wms := []socket.Message{
+ {Buffers: wmbs[:1], Addr: c.LocalAddr()},
+ {Buffers: wmbs[1:], Addr: c.LocalAddr()},
+ }
+ n, err := cc.SendMsgs(wms, 0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if n != len(wms) {
+ t.Fatalf("got %d; want %d", n, len(wms))
+ }
+ b := make([]byte, 32)
+ rmbs := [][][]byte{{b[:len(wmbs[0])]}, {b[len(wmbs[0]):]}}
+ rms := []socket.Message{
+ {Buffers: rmbs[0]},
+ {Buffers: rmbs[1]},
+ }
+ n, err = cc.RecvMsgs(rms, 0)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if n != len(rms) {
+ t.Fatalf("got %d; want %d", n, len(rms))
+ }
+ nn := 0
+ for i := 0; i < n; i++ {
+ nn += rms[i].N
+ }
+ if !bytes.Equal(b[:nn], data) {
+ t.Fatalf("got %#v; want %#v", b[:nn], data)
+ }
+}
+
+func BenchmarkUDP(b *testing.B) {
+ c, err := nettest.NewLocalPacketListener("udp")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ cc, err := socket.NewConn(c.(net.Conn))
+ if err != nil {
+ b.Fatal(err)
+ }
+ data := []byte("HELLO-R-U-THERE")
+ wm := socket.Message{
+ Buffers: [][]byte{data},
+ Addr: c.LocalAddr(),
+ }
+ rm := socket.Message{
+ Buffers: [][]byte{make([]byte, 128)},
+ OOB: make([]byte, 128),
+ }
+
+ for M := 1; M <= 1<<9; M = M << 1 {
+ b.Run(fmt.Sprintf("Iter-%d", M), func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ for j := 0; j < M; j++ {
+ if err := cc.SendMsg(&wm, 0); err != nil {
+ b.Fatal(err)
+ }
+ if err := cc.RecvMsg(&rm, 0); err != nil {
+ b.Fatal(err)
+ }
+ }
+ }
+ })
+ switch runtime.GOOS {
+ case "linux":
+ wms := make([]socket.Message, M)
+ for i := range wms {
+ wms[i].Buffers = [][]byte{data}
+ wms[i].Addr = c.LocalAddr()
+ }
+ rms := make([]socket.Message, M)
+ for i := range rms {
+ rms[i].Buffers = [][]byte{make([]byte, 128)}
+ rms[i].OOB = make([]byte, 128)
+ }
+ b.Run(fmt.Sprintf("Batch-%d", M), func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := cc.SendMsgs(wms, 0); err != nil {
+ b.Fatal(err)
+ }
+ if _, err := cc.RecvMsgs(rms, 0); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ }
+ }
+}
diff --git a/vendor/golang.org/x/net/internal/socket/socket_test.go b/vendor/golang.org/x/net/internal/socket/socket_test.go
new file mode 100644
index 000000000..bf3751b5e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/socket_test.go
@@ -0,0 +1,46 @@
+// Copyright 2017 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 darwin dragonfly freebsd linux netbsd openbsd solaris windows
+
+package socket_test
+
+import (
+ "net"
+ "runtime"
+ "syscall"
+ "testing"
+
+ "golang.org/x/net/internal/nettest"
+ "golang.org/x/net/internal/socket"
+)
+
+func TestSocket(t *testing.T) {
+ t.Run("Option", func(t *testing.T) {
+ testSocketOption(t, &socket.Option{Level: syscall.SOL_SOCKET, Name: syscall.SO_RCVBUF, Len: 4})
+ })
+}
+
+func testSocketOption(t *testing.T, so *socket.Option) {
+ c, err := nettest.NewLocalPacketListener("udp")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ cc, err := socket.NewConn(c.(net.Conn))
+ if err != nil {
+ t.Fatal(err)
+ }
+ const N = 2048
+ if err := so.SetInt(cc, N); err != nil {
+ t.Fatal(err)
+ }
+ n, err := so.GetInt(cc)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if n < N {
+ t.Fatalf("got %d; want greater than or equal to %d", n, N)
+ }
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys.go b/vendor/golang.org/x/net/internal/socket/sys.go
new file mode 100644
index 000000000..4f0eead13
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys.go
@@ -0,0 +1,33 @@
+// Copyright 2017 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 socket
+
+import (
+ "encoding/binary"
+ "unsafe"
+)
+
+var (
+ // NativeEndian is the machine native endian implementation of
+ // ByteOrder.
+ NativeEndian binary.ByteOrder
+
+ kernelAlign int
+)
+
+func init() {
+ i := uint32(1)
+ b := (*[4]byte)(unsafe.Pointer(&i))
+ if b[0] == 1 {
+ NativeEndian = binary.LittleEndian
+ } else {
+ NativeEndian = binary.BigEndian
+ }
+ kernelAlign = probeProtocolStack()
+}
+
+func roundup(l int) int {
+ return (l + kernelAlign - 1) & ^(kernelAlign - 1)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_bsd.go b/vendor/golang.org/x/net/internal/socket/sys_bsd.go
new file mode 100644
index 000000000..f13e14ff3
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_bsd.go
@@ -0,0 +1,17 @@
+// Copyright 2017 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 darwin dragonfly freebsd openbsd
+
+package socket
+
+import "errors"
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go b/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go
new file mode 100644
index 000000000..f723fa36a
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_bsdvar.go
@@ -0,0 +1,14 @@
+// Copyright 2017 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build freebsd netbsd openbsd
+
+package socket
+
+import "unsafe"
+
+func probeProtocolStack() int {
+ var p uintptr
+ return int(unsafe.Sizeof(p))
+}
diff --git a/vendor/golang.org/x/net/ipv6/go19_test.go b/vendor/golang.org/x/net/internal/socket/sys_darwin.go
similarity index 70%
rename from vendor/golang.org/x/net/ipv6/go19_test.go
rename to vendor/golang.org/x/net/internal/socket/sys_darwin.go
index c7cb057d2..b17d223bf 100644
--- a/vendor/golang.org/x/net/ipv6/go19_test.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_darwin.go
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
+package socket
-package ipv6
-
-func init() {
- disableTests = true
-}
+func probeProtocolStack() int { return 4 }
diff --git a/vendor/golang.org/x/net/ipv4/go19_test.go b/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go
similarity index 70%
rename from vendor/golang.org/x/net/ipv4/go19_test.go
rename to vendor/golang.org/x/net/internal/socket/sys_dragonfly.go
index 82a27b113..b17d223bf 100644
--- a/vendor/golang.org/x/net/ipv4/go19_test.go
+++ b/vendor/golang.org/x/net/internal/socket/sys_dragonfly.go
@@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build go1.9
+package socket
-package ipv4
-
-func init() {
- disableTests = true
-}
+func probeProtocolStack() int { return 4 }
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux.go b/vendor/golang.org/x/net/internal/socket/sys_linux.go
new file mode 100644
index 000000000..1559521e0
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux.go
@@ -0,0 +1,27 @@
+// Copyright 2017 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 linux,!s390x,!386
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func probeProtocolStack() int {
+ var p uintptr
+ return int(unsafe.Sizeof(p))
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_386.go b/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
new file mode 100644
index 000000000..235b2cc08
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_386.go
@@ -0,0 +1,55 @@
+// Copyright 2017 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 socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func probeProtocolStack() int { return 4 }
+
+const (
+ sysSETSOCKOPT = 0xe
+ sysGETSOCKOPT = 0xf
+ sysSENDMSG = 0x10
+ sysRECVMSG = 0x11
+ sysRECVMMSG = 0x13
+ sysSENDMMSG = 0x14
+)
+
+func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_linux_386.s b/vendor/golang.org/x/net/internal/socket/sys_linux_386.s
similarity index 77%
rename from vendor/golang.org/x/net/ipv4/sys_linux_386.s
rename to vendor/golang.org/x/net/internal/socket/sys_linux_386.s
index b85551a5c..93e7d75ec 100644
--- a/vendor/golang.org/x/net/ipv4/sys_linux_386.s
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_386.s
@@ -6,3 +6,6 @@
TEXT ·socketcall(SB),NOSPLIT,$0-36
JMP syscall·socketcall(SB)
+
+TEXT ·rawsocketcall(SB),NOSPLIT,$0-36
+ JMP syscall·rawsocketcall(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go
new file mode 100644
index 000000000..9decee2e5
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_amd64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x12b
+ sysSENDMMSG = 0x133
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go b/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go
new file mode 100644
index 000000000..d753b436d
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_arm.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x16d
+ sysSENDMMSG = 0x176
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go
new file mode 100644
index 000000000..b67089436
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_arm64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0xf3
+ sysSENDMMSG = 0x10d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go
new file mode 100644
index 000000000..9c0d74014
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mips.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x10ef
+ sysSENDMMSG = 0x10f7
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go
new file mode 100644
index 000000000..071a4aba8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x14ae
+ sysSENDMMSG = 0x14b6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go
new file mode 100644
index 000000000..071a4aba8
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mips64le.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x14ae
+ sysSENDMMSG = 0x14b6
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go b/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go
new file mode 100644
index 000000000..9c0d74014
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_mipsle.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x10ef
+ sysSENDMMSG = 0x10f7
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go
new file mode 100644
index 000000000..21c1e3f00
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x157
+ sysSENDMMSG = 0x15d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go
new file mode 100644
index 000000000..21c1e3f00
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_ppc64le.go
@@ -0,0 +1,10 @@
+// Copyright 2017 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 socket
+
+const (
+ sysRECVMMSG = 0x157
+ sysSENDMMSG = 0x15d
+)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
new file mode 100644
index 000000000..327979efb
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.go
@@ -0,0 +1,55 @@
+// Copyright 2017 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 socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func probeProtocolStack() int { return 8 }
+
+const (
+ sysSETSOCKOPT = 0xe
+ sysGETSOCKOPT = 0xf
+ sysSENDMSG = 0x10
+ sysRECVMSG = 0x11
+ sysRECVMMSG = 0x13
+ sysSENDMMSG = 0x14
+)
+
+func socketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+func rawsocketcall(call, a0, a1, a2, a3, a4, a5 uintptr) (uintptr, syscall.Errno)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, errno := socketcall(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s
new file mode 100644
index 000000000..06d75628c
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_linux_s390x.s
@@ -0,0 +1,11 @@
+// Copyright 2017 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.
+
+#include "textflag.h"
+
+TEXT ·socketcall(SB),NOSPLIT,$0-72
+ JMP syscall·socketcall(SB)
+
+TEXT ·rawsocketcall(SB),NOSPLIT,$0-72
+ JMP syscall·rawsocketcall(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_netbsd.go b/vendor/golang.org/x/net/internal/socket/sys_netbsd.go
new file mode 100644
index 000000000..431851c12
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_netbsd.go
@@ -0,0 +1,25 @@
+// Copyright 2017 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 socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+const (
+ sysRECVMMSG = 0x1db
+ sysSENDMMSG = 0x1dc
+)
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysRECVMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall6(sysSENDMMSG, s, uintptr(unsafe.Pointer(&hs[0])), uintptr(len(hs)), uintptr(flags), 0, 0)
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_posix.go b/vendor/golang.org/x/net/internal/socket/sys_posix.go
new file mode 100644
index 000000000..9a0dbcfb9
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_posix.go
@@ -0,0 +1,168 @@
+// Copyright 2017 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.9
+// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
+
+package socket
+
+import (
+ "encoding/binary"
+ "errors"
+ "net"
+ "runtime"
+ "strconv"
+ "sync"
+ "time"
+)
+
+func marshalInetAddr(a net.Addr) []byte {
+ switch a := a.(type) {
+ case *net.TCPAddr:
+ return marshalSockaddr(a.IP, a.Port, a.Zone)
+ case *net.UDPAddr:
+ return marshalSockaddr(a.IP, a.Port, a.Zone)
+ case *net.IPAddr:
+ return marshalSockaddr(a.IP, 0, a.Zone)
+ default:
+ return nil
+ }
+}
+
+func marshalSockaddr(ip net.IP, port int, zone string) []byte {
+ if ip4 := ip.To4(); ip4 != nil {
+ b := make([]byte, sizeofSockaddrInet)
+ switch runtime.GOOS {
+ case "linux", "solaris", "windows":
+ NativeEndian.PutUint16(b[:2], uint16(sysAF_INET))
+ default:
+ b[0] = sizeofSockaddrInet
+ b[1] = sysAF_INET
+ }
+ binary.BigEndian.PutUint16(b[2:4], uint16(port))
+ copy(b[4:8], ip4)
+ return b
+ }
+ if ip6 := ip.To16(); ip6 != nil && ip.To4() == nil {
+ b := make([]byte, sizeofSockaddrInet6)
+ switch runtime.GOOS {
+ case "linux", "solaris", "windows":
+ NativeEndian.PutUint16(b[:2], uint16(sysAF_INET6))
+ default:
+ b[0] = sizeofSockaddrInet6
+ b[1] = sysAF_INET6
+ }
+ binary.BigEndian.PutUint16(b[2:4], uint16(port))
+ copy(b[8:24], ip6)
+ if zone != "" {
+ NativeEndian.PutUint32(b[24:28], uint32(zoneCache.index(zone)))
+ }
+ return b
+ }
+ return nil
+}
+
+func parseInetAddr(b []byte, network string) (net.Addr, error) {
+ if len(b) < 2 {
+ return nil, errors.New("invalid address")
+ }
+ var af int
+ switch runtime.GOOS {
+ case "linux", "solaris", "windows":
+ af = int(NativeEndian.Uint16(b[:2]))
+ default:
+ af = int(b[1])
+ }
+ var ip net.IP
+ var zone string
+ if af == sysAF_INET {
+ if len(b) < sizeofSockaddrInet {
+ return nil, errors.New("short address")
+ }
+ ip = make(net.IP, net.IPv4len)
+ copy(ip, b[4:8])
+ }
+ if af == sysAF_INET6 {
+ if len(b) < sizeofSockaddrInet6 {
+ return nil, errors.New("short address")
+ }
+ ip = make(net.IP, net.IPv6len)
+ copy(ip, b[8:24])
+ if id := int(NativeEndian.Uint32(b[24:28])); id > 0 {
+ zone = zoneCache.name(id)
+ }
+ }
+ switch network {
+ case "tcp", "tcp4", "tcp6":
+ return &net.TCPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil
+ case "udp", "udp4", "udp6":
+ return &net.UDPAddr{IP: ip, Port: int(binary.BigEndian.Uint16(b[2:4])), Zone: zone}, nil
+ default:
+ return &net.IPAddr{IP: ip, Zone: zone}, nil
+ }
+}
+
+// An ipv6ZoneCache represents a cache holding partial network
+// interface information. It is used for reducing the cost of IPv6
+// addressing scope zone resolution.
+//
+// Multiple names sharing the index are managed by first-come
+// first-served basis for consistency.
+type ipv6ZoneCache struct {
+ sync.RWMutex // guard the following
+ lastFetched time.Time // last time routing information was fetched
+ toIndex map[string]int // interface name to its index
+ toName map[int]string // interface index to its name
+}
+
+var zoneCache = ipv6ZoneCache{
+ toIndex: make(map[string]int),
+ toName: make(map[int]string),
+}
+
+func (zc *ipv6ZoneCache) update(ift []net.Interface) {
+ zc.Lock()
+ defer zc.Unlock()
+ now := time.Now()
+ if zc.lastFetched.After(now.Add(-60 * time.Second)) {
+ return
+ }
+ zc.lastFetched = now
+ if len(ift) == 0 {
+ var err error
+ if ift, err = net.Interfaces(); err != nil {
+ return
+ }
+ }
+ zc.toIndex = make(map[string]int, len(ift))
+ zc.toName = make(map[int]string, len(ift))
+ for _, ifi := range ift {
+ zc.toIndex[ifi.Name] = ifi.Index
+ if _, ok := zc.toName[ifi.Index]; !ok {
+ zc.toName[ifi.Index] = ifi.Name
+ }
+ }
+}
+
+func (zc *ipv6ZoneCache) name(zone int) string {
+ zoneCache.update(nil)
+ zoneCache.RLock()
+ defer zoneCache.RUnlock()
+ name, ok := zoneCache.toName[zone]
+ if !ok {
+ name = strconv.Itoa(zone)
+ }
+ return name
+}
+
+func (zc *ipv6ZoneCache) index(zone string) int {
+ zoneCache.update(nil)
+ zoneCache.RLock()
+ defer zoneCache.RUnlock()
+ index, ok := zoneCache.toIndex[zone]
+ if !ok {
+ index, _ = strconv.Atoi(zone)
+ }
+ return index
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_solaris.go b/vendor/golang.org/x/net/internal/socket/sys_solaris.go
new file mode 100644
index 000000000..cced74e60
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_solaris.go
@@ -0,0 +1,71 @@
+// Copyright 2017 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 socket
+
+import (
+ "errors"
+ "runtime"
+ "syscall"
+ "unsafe"
+)
+
+func probeProtocolStack() int {
+ switch runtime.GOARCH {
+ case "amd64":
+ return 4
+ default:
+ var p uintptr
+ return int(unsafe.Sizeof(p))
+ }
+}
+
+//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
+//go:cgo_import_dynamic libc___xnet_recvmsg __xnet_recvmsg "libsocket.so"
+//go:cgo_import_dynamic libc___xnet_sendmsg __xnet_sendmsg "libsocket.so"
+
+//go:linkname procGetsockopt libc___xnet_getsockopt
+//go:linkname procSetsockopt libc_setsockopt
+//go:linkname procRecvmsg libc___xnet_recvmsg
+//go:linkname procSendmsg libc___xnet_sendmsg
+
+var (
+ procGetsockopt uintptr
+ procSetsockopt uintptr
+ procRecvmsg uintptr
+ procSendmsg uintptr
+)
+
+func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
+func rawSysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procRecvmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSendmsg)), 3, s, uintptr(unsafe.Pointer(h)), uintptr(flags), 0, 0, 0)
+ return int(n), errnoErr(errno)
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_solaris_amd64.s b/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s
similarity index 66%
rename from vendor/golang.org/x/net/ipv6/sys_solaris_amd64.s
rename to vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s
index 39d76af79..a18ac5ed7 100644
--- a/vendor/golang.org/x/net/ipv6/sys_solaris_amd64.s
+++ b/vendor/golang.org/x/net/internal/socket/sys_solaris_amd64.s
@@ -4,5 +4,8 @@
#include "textflag.h"
-TEXT ·sysvicall6(SB),NOSPLIT,$0-88
+TEXT ·sysvicall6(SB),NOSPLIT,$0-88
JMP syscall·sysvicall6(SB)
+
+TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88
+ JMP syscall·rawSysvicall6(SB)
diff --git a/vendor/golang.org/x/net/internal/socket/sys_stub.go b/vendor/golang.org/x/net/internal/socket/sys_stub.go
new file mode 100644
index 000000000..d9f06d00e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_stub.go
@@ -0,0 +1,64 @@
+// Copyright 2017 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 !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
+
+package socket
+
+import (
+ "errors"
+ "net"
+ "runtime"
+ "unsafe"
+)
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+func probeProtocolStack() int {
+ switch runtime.GOARCH {
+ case "amd64p32", "mips64p32":
+ return 4
+ default:
+ var p uintptr
+ return int(unsafe.Sizeof(p))
+ }
+}
+
+func marshalInetAddr(ip net.IP, port int, zone string) []byte {
+ return nil
+}
+
+func parseInetAddr(b []byte, network string) (net.Addr, error) {
+ return nil, errors.New("not implemented")
+}
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ return errors.New("not implemented")
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_unix.go b/vendor/golang.org/x/net/internal/socket/sys_unix.go
new file mode 100644
index 000000000..18eba3085
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_unix.go
@@ -0,0 +1,33 @@
+// Copyright 2017 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 darwin dragonfly freebsd linux,!s390x,!386 netbsd openbsd
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(unsafe.Pointer(&l)), 0)
+ return int(l), errnoErr(errno)
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(unsafe.Pointer(&b[0])), uintptr(len(b)), 0)
+ return errnoErr(errno)
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall(syscall.SYS_RECVMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ n, _, errno := syscall.Syscall(syscall.SYS_SENDMSG, s, uintptr(unsafe.Pointer(h)), uintptr(flags))
+ return int(n), errnoErr(errno)
+}
diff --git a/vendor/golang.org/x/net/internal/socket/sys_windows.go b/vendor/golang.org/x/net/internal/socket/sys_windows.go
new file mode 100644
index 000000000..54a470ebe
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/sys_windows.go
@@ -0,0 +1,70 @@
+// Copyright 2017 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 socket
+
+import (
+ "errors"
+ "syscall"
+ "unsafe"
+)
+
+func probeProtocolStack() int {
+ var p uintptr
+ return int(unsafe.Sizeof(p))
+}
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x17
+
+ sysSOCK_RAW = 0x3
+)
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
+
+func getsockopt(s uintptr, level, name int, b []byte) (int, error) {
+ l := uint32(len(b))
+ err := syscall.Getsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), (*int32)(unsafe.Pointer(&l)))
+ return int(l), err
+}
+
+func setsockopt(s uintptr, level, name int, b []byte) error {
+ return syscall.Setsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(unsafe.Pointer(&b[0])), int32(len(b)))
+}
+
+func recvmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func sendmsg(s uintptr, h *msghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func recvmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
+
+func sendmmsg(s uintptr, hs []mmsghdr, flags int) (int, error) {
+ return 0, errors.New("not implemented")
+}
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
new file mode 100644
index 000000000..26f8feff3
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_386.go
@@ -0,0 +1,59 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_darwin.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1e
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
new file mode 100644
index 000000000..e2987f7db
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_amd64.go
@@ -0,0 +1,61 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_darwin.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1e
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
new file mode 100644
index 000000000..26f8feff3
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_darwin_arm.go
@@ -0,0 +1,59 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_darwin.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1e
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
new file mode 100644
index 000000000..c582abd57
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_dragonfly_amd64.go
@@ -0,0 +1,61 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_dragonfly.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1c
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
new file mode 100644
index 000000000..04a24886c
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_386.go
@@ -0,0 +1,59 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1c
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
new file mode 100644
index 000000000..35c7cb9c9
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_amd64.go
@@ -0,0 +1,61 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1c
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
new file mode 100644
index 000000000..04a24886c
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_freebsd_arm.go
@@ -0,0 +1,59 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_freebsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1c
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
new file mode 100644
index 000000000..430206930
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_386.go
@@ -0,0 +1,63 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofMmsghdr = 0x20
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
new file mode 100644
index 000000000..1502f6c55
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_amd64.go
@@ -0,0 +1,66 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0x10
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
new file mode 100644
index 000000000..430206930
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm.go
@@ -0,0 +1,63 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofMmsghdr = 0x20
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
new file mode 100644
index 000000000..1502f6c55
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_arm64.go
@@ -0,0 +1,66 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0x10
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
new file mode 100644
index 000000000..430206930
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips.go
@@ -0,0 +1,63 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofMmsghdr = 0x20
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
new file mode 100644
index 000000000..1502f6c55
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64.go
@@ -0,0 +1,66 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0x10
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
new file mode 100644
index 000000000..1502f6c55
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mips64le.go
@@ -0,0 +1,66 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0x10
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
new file mode 100644
index 000000000..430206930
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_mipsle.go
@@ -0,0 +1,63 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofMmsghdr = 0x20
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
new file mode 100644
index 000000000..1502f6c55
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64.go
@@ -0,0 +1,66 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0x10
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
new file mode 100644
index 000000000..1502f6c55
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_ppc64le.go
@@ -0,0 +1,66 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0x10
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go b/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
new file mode 100644
index 000000000..1502f6c55
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_linux_s390x.go
@@ -0,0 +1,66 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_linux.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0xa
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint64
+ Control *byte
+ Controllen uint64
+ Flags int32
+ Pad_cgo_1 [4]byte
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint64
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ X__pad [8]uint8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x38
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0x10
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
new file mode 100644
index 000000000..db60491fe
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_386.go
@@ -0,0 +1,65 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x18
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofMmsghdr = 0x20
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
new file mode 100644
index 000000000..2a1a79985
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_amd64.go
@@ -0,0 +1,68 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x18
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type mmsghdr struct {
+ Hdr msghdr
+ Len uint32
+ Pad_cgo_0 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+ sizeofMmsghdr = 0x40
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
new file mode 100644
index 000000000..206ea2d11
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_netbsd_arm.go
@@ -0,0 +1,59 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_netbsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x18
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen int32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
new file mode 100644
index 000000000..1c836361e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_386.go
@@ -0,0 +1,59 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x18
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
new file mode 100644
index 000000000..a6c0bf464
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_amd64.go
@@ -0,0 +1,61 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x18
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen uint32
+ Pad_cgo_1 [4]byte
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
new file mode 100644
index 000000000..1c836361e
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_openbsd_arm.go
@@ -0,0 +1,59 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_openbsd.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x18
+
+ sysSOCK_RAW = 0x3
+)
+
+type iovec struct {
+ Base *byte
+ Len uint32
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+const (
+ sizeofIovec = 0x8
+ sizeofMsghdr = 0x1c
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x1c
+)
diff --git a/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go b/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
new file mode 100644
index 000000000..327c63290
--- /dev/null
+++ b/vendor/golang.org/x/net/internal/socket/zsys_solaris_amd64.go
@@ -0,0 +1,60 @@
+// Created by cgo -godefs - DO NOT EDIT
+// cgo -godefs defs_solaris.go
+
+package socket
+
+const (
+ sysAF_UNSPEC = 0x0
+ sysAF_INET = 0x2
+ sysAF_INET6 = 0x1a
+
+ sysSOCK_RAW = 0x4
+)
+
+type iovec struct {
+ Base *int8
+ Len uint64
+}
+
+type msghdr struct {
+ Name *byte
+ Namelen uint32
+ Pad_cgo_0 [4]byte
+ Iov *iovec
+ Iovlen int32
+ Pad_cgo_1 [4]byte
+ Accrights *int8
+ Accrightslen int32
+ Pad_cgo_2 [4]byte
+}
+
+type cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type sockaddrInet struct {
+ Family uint16
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type sockaddrInet6 struct {
+ Family uint16
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+ X__sin6_src_id uint32
+}
+
+const (
+ sizeofIovec = 0x10
+ sizeofMsghdr = 0x30
+ sizeofCmsghdr = 0xc
+
+ sizeofSockaddrInet = 0x10
+ sizeofSockaddrInet6 = 0x20
+)
diff --git a/vendor/golang.org/x/net/ipv4/batch.go b/vendor/golang.org/x/net/ipv4/batch.go
new file mode 100644
index 000000000..b44549928
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/batch.go
@@ -0,0 +1,191 @@
+// Copyright 2017 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.9
+
+package ipv4
+
+import (
+ "net"
+ "runtime"
+ "syscall"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
+// PacketConn are not implemented.
+
+// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
+// RawConn are not implemented.
+
+// A Message represents an IO message.
+//
+// type Message struct {
+// Buffers [][]byte
+// OOB []byte
+// Addr net.Addr
+// N int
+// NN int
+// Flags int
+// }
+//
+// The Buffers fields represents a list of contiguous buffers, which
+// can be used for vectored IO, for example, putting a header and a
+// payload in each slice.
+// When writing, the Buffers field must contain at least one byte to
+// write.
+// When reading, the Buffers field will always contain a byte to read.
+//
+// The OOB field contains protocol-specific control or miscellaneous
+// ancillary data known as out-of-band data.
+// It can be nil when not required.
+//
+// The Addr field specifies a destination address when writing.
+// It can be nil when the underlying protocol of the endpoint uses
+// connection-oriented communication.
+// After a successful read, it may contain the source address on the
+// received packet.
+//
+// The N field indicates the number of bytes read or written from/to
+// Buffers.
+//
+// The NN field indicates the number of bytes read or written from/to
+// OOB.
+//
+// The Flags field contains protocol-specific information on the
+// received message.
+type Message = socket.Message
+
+// ReadBatch reads a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// On a successful read it returns the number of messages received, up
+// to len(ms).
+//
+// On Linux, a batch read will be optimized.
+// On other platforms, this method will read only a single message.
+//
+// Unlike the ReadFrom method, it doesn't strip the IPv4 header
+// followed by option headers from the received IPv4 datagram when the
+// underlying transport is net.IPConn. Each Buffers field of Message
+// must be large enough to accommodate an IPv4 header and option
+// headers.
+func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, syscall.EINVAL
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.RecvMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.RecvMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
+
+// WriteBatch writes a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// It returns the number of messages written on a successful write.
+//
+// On Linux, a batch write will be optimized.
+// On other platforms, this method will write only a single message.
+func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, syscall.EINVAL
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.SendMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.SendMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
+
+// ReadBatch reads a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// On a successful read it returns the number of messages received, up
+// to len(ms).
+//
+// On Linux, a batch read will be optimized.
+// On other platforms, this method will read only a single message.
+func (c *packetHandler) ReadBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, syscall.EINVAL
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.RecvMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.RecvMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
+
+// WriteBatch writes a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// It returns the number of messages written on a successful write.
+//
+// On Linux, a batch write will be optimized.
+// On other platforms, this method will write only a single message.
+func (c *packetHandler) WriteBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, syscall.EINVAL
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.SendMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.SendMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
diff --git a/vendor/golang.org/x/net/ipv4/bpfopt_linux.go b/vendor/golang.org/x/net/ipv4/bpfopt_linux.go
deleted file mode 100644
index 2d626d924..000000000
--- a/vendor/golang.org/x/net/ipv4/bpfopt_linux.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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 ipv4
-
-import (
- "os"
- "unsafe"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/netreflect"
-)
-
-// SetBPF attaches a BPF program to the connection.
-//
-// Only supported on Linux.
-func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
- }
- prog := sockFProg{
- Len: uint16(len(filter)),
- Filter: (*sockFilter)(unsafe.Pointer(&filter[0])),
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, sysSOL_SOCKET, sysSO_ATTACH_FILTER, unsafe.Pointer(&prog), uint32(unsafe.Sizeof(prog))))
-}
diff --git a/vendor/golang.org/x/net/ipv4/bpfopt_stub.go b/vendor/golang.org/x/net/ipv4/bpfopt_stub.go
deleted file mode 100644
index c4a8481f0..000000000
--- a/vendor/golang.org/x/net/ipv4/bpfopt_stub.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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 !linux
-
-package ipv4
-
-import "golang.org/x/net/bpf"
-
-// SetBPF attaches a BPF program to the connection.
-//
-// Only supported on Linux.
-func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
- return errOpNoSupport
-}
diff --git a/vendor/golang.org/x/net/ipv4/control.go b/vendor/golang.org/x/net/ipv4/control.go
index da4da2dd0..a2b02ca95 100644
--- a/vendor/golang.org/x/net/ipv4/control.go
+++ b/vendor/golang.org/x/net/ipv4/control.go
@@ -8,6 +8,9 @@ import (
"fmt"
"net"
"sync"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
type rawOpt struct {
@@ -51,6 +54,77 @@ func (cm *ControlMessage) String() string {
return fmt.Sprintf("ttl=%d src=%v dst=%v ifindex=%d", cm.TTL, cm.Src, cm.Dst, cm.IfIndex)
}
+// Marshal returns the binary encoding of cm.
+func (cm *ControlMessage) Marshal() []byte {
+ if cm == nil {
+ return nil
+ }
+ var m socket.ControlMessage
+ if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To4() != nil || cm.IfIndex > 0) {
+ m = socket.NewControlMessage([]int{ctlOpts[ctlPacketInfo].length})
+ }
+ if len(m) > 0 {
+ ctlOpts[ctlPacketInfo].marshal(m, cm)
+ }
+ return m
+}
+
+// Parse parses b as a control message and stores the result in cm.
+func (cm *ControlMessage) Parse(b []byte) error {
+ ms, err := socket.ControlMessage(b).Parse()
+ if err != nil {
+ return err
+ }
+ for _, m := range ms {
+ lvl, typ, l, err := m.ParseHeader()
+ if err != nil {
+ return err
+ }
+ if lvl != iana.ProtocolIP {
+ continue
+ }
+ switch {
+ case typ == ctlOpts[ctlTTL].name && l >= ctlOpts[ctlTTL].length:
+ ctlOpts[ctlTTL].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlDst].name && l >= ctlOpts[ctlDst].length:
+ ctlOpts[ctlDst].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlInterface].name && l >= ctlOpts[ctlInterface].length:
+ ctlOpts[ctlInterface].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length:
+ ctlOpts[ctlPacketInfo].parse(cm, m.Data(l))
+ }
+ }
+ return nil
+}
+
+// NewControlMessage returns a new control message.
+//
+// The returned message is large enough for options specified by cf.
+func NewControlMessage(cf ControlFlags) []byte {
+ opt := rawOpt{cflags: cf}
+ var l int
+ if opt.isset(FlagTTL) && ctlOpts[ctlTTL].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlTTL].length)
+ }
+ if ctlOpts[ctlPacketInfo].name > 0 {
+ if opt.isset(FlagSrc | FlagDst | FlagInterface) {
+ l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
+ }
+ } else {
+ if opt.isset(FlagDst) && ctlOpts[ctlDst].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlDst].length)
+ }
+ if opt.isset(FlagInterface) && ctlOpts[ctlInterface].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlInterface].length)
+ }
+ }
+ var b []byte
+ if l > 0 {
+ b = make([]byte, l)
+ }
+ return b
+}
+
// Ancillary data socket options
const (
ctlTTL = iota // header field
diff --git a/vendor/golang.org/x/net/ipv4/control_bsd.go b/vendor/golang.org/x/net/ipv4/control_bsd.go
index 3f27f9945..77e7ad5be 100644
--- a/vendor/golang.org/x/net/ipv4/control_bsd.go
+++ b/vendor/golang.org/x/net/ipv4/control_bsd.go
@@ -12,26 +12,26 @@ import (
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
func marshalDst(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIP
- m.Type = sysIP_RECVDSTADDR
- m.SetLen(syscall.CmsgLen(net.IPv4len))
- return b[syscall.CmsgSpace(net.IPv4len):]
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, sysIP_RECVDSTADDR, net.IPv4len)
+ return m.Next(net.IPv4len)
}
func parseDst(cm *ControlMessage, b []byte) {
- cm.Dst = b[:net.IPv4len]
+ if len(cm.Dst) < net.IPv4len {
+ cm.Dst = make(net.IP, net.IPv4len)
+ }
+ copy(cm.Dst, b[:net.IPv4len])
}
func marshalInterface(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIP
- m.Type = sysIP_RECVIF
- m.SetLen(syscall.CmsgLen(syscall.SizeofSockaddrDatalink))
- return b[syscall.CmsgSpace(syscall.SizeofSockaddrDatalink):]
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, sysIP_RECVIF, syscall.SizeofSockaddrDatalink)
+ return m.Next(syscall.SizeofSockaddrDatalink)
}
func parseInterface(cm *ControlMessage, b []byte) {
diff --git a/vendor/golang.org/x/net/ipv4/control_pktinfo.go b/vendor/golang.org/x/net/ipv4/control_pktinfo.go
index 9ed977341..425338f35 100644
--- a/vendor/golang.org/x/net/ipv4/control_pktinfo.go
+++ b/vendor/golang.org/x/net/ipv4/control_pktinfo.go
@@ -7,19 +7,18 @@
package ipv4
import (
- "syscall"
+ "net"
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIP
- m.Type = sysIP_PKTINFO
- m.SetLen(syscall.CmsgLen(sizeofInetPktinfo))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, sysIP_PKTINFO, sizeofInetPktinfo)
if cm != nil {
- pi := (*inetPktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
+ pi := (*inetPktinfo)(unsafe.Pointer(&m.Data(sizeofInetPktinfo)[0]))
if ip := cm.Src.To4(); ip != nil {
copy(pi.Spec_dst[:], ip)
}
@@ -27,11 +26,14 @@ func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
pi.setIfindex(cm.IfIndex)
}
}
- return b[syscall.CmsgSpace(sizeofInetPktinfo):]
+ return m.Next(sizeofInetPktinfo)
}
func parsePacketInfo(cm *ControlMessage, b []byte) {
pi := (*inetPktinfo)(unsafe.Pointer(&b[0]))
cm.IfIndex = int(pi.Ifindex)
- cm.Dst = pi.Addr[:]
+ if len(cm.Dst) < net.IPv4len {
+ cm.Dst = make(net.IP, net.IPv4len)
+ }
+ copy(cm.Dst, pi.Addr[:])
}
diff --git a/vendor/golang.org/x/net/ipv4/control_stub.go b/vendor/golang.org/x/net/ipv4/control_stub.go
index 27e618bc2..5a2f7d8d3 100644
--- a/vendor/golang.org/x/net/ipv4/control_stub.go
+++ b/vendor/golang.org/x/net/ipv4/control_stub.go
@@ -2,22 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build nacl plan9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv4
-func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
+import "golang.org/x/net/internal/socket"
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
return errOpNoSupport
}
-
-func newControlMessage(opt *rawOpt) []byte {
- return nil
-}
-
-func parseControlMessage(b []byte) (*ControlMessage, error) {
- return nil, errOpNoSupport
-}
-
-func marshalControlMessage(cm *ControlMessage) []byte {
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv4/control_test.go b/vendor/golang.org/x/net/ipv4/control_test.go
new file mode 100644
index 000000000..f87fe124b
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/control_test.go
@@ -0,0 +1,21 @@
+// Copyright 2017 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 ipv4_test
+
+import (
+ "testing"
+
+ "golang.org/x/net/ipv4"
+)
+
+func TestControlMessageParseWithFuzz(t *testing.T) {
+ var cm ipv4.ControlMessage
+ for _, fuzz := range []string{
+ "\f\x00\x00\x00\x00\x00\x00\x00\x14\x00\x00\x00",
+ "\f\x00\x00\x00\x00\x00\x00\x00\x1a\x00\x00\x00",
+ } {
+ cm.Parse([]byte(fuzz))
+ }
+}
diff --git a/vendor/golang.org/x/net/ipv4/control_unix.go b/vendor/golang.org/x/net/ipv4/control_unix.go
index 25ef66192..e1ae8167b 100644
--- a/vendor/golang.org/x/net/ipv4/control_unix.go
+++ b/vendor/golang.org/x/net/ipv4/control_unix.go
@@ -7,18 +7,17 @@
package ipv4
import (
- "os"
- "syscall"
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
-func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
opt.Lock()
defer opt.Unlock()
- if cf&FlagTTL != 0 && sockOpts[ssoReceiveTTL].name > 0 {
- if err := setInt(s, &sockOpts[ssoReceiveTTL], boolint(on)); err != nil {
+ if so, ok := sockOpts[ssoReceiveTTL]; ok && cf&FlagTTL != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -27,9 +26,9 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
opt.clear(FlagTTL)
}
}
- if sockOpts[ssoPacketInfo].name > 0 {
+ if so, ok := sockOpts[ssoPacketInfo]; ok {
if cf&(FlagSrc|FlagDst|FlagInterface) != 0 {
- if err := setInt(s, &sockOpts[ssoPacketInfo], boolint(on)); err != nil {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -39,8 +38,8 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
}
}
} else {
- if cf&FlagDst != 0 && sockOpts[ssoReceiveDst].name > 0 {
- if err := setInt(s, &sockOpts[ssoReceiveDst], boolint(on)); err != nil {
+ if so, ok := sockOpts[ssoReceiveDst]; ok && cf&FlagDst != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -49,8 +48,8 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
opt.clear(FlagDst)
}
}
- if cf&FlagInterface != 0 && sockOpts[ssoReceiveInterface].name > 0 {
- if err := setInt(s, &sockOpts[ssoReceiveInterface], boolint(on)); err != nil {
+ if so, ok := sockOpts[ssoReceiveInterface]; ok && cf&FlagInterface != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -63,84 +62,10 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
return nil
}
-func newControlMessage(opt *rawOpt) (oob []byte) {
- opt.RLock()
- var l int
- if opt.isset(FlagTTL) && ctlOpts[ctlTTL].name > 0 {
- l += syscall.CmsgSpace(ctlOpts[ctlTTL].length)
- }
- if ctlOpts[ctlPacketInfo].name > 0 {
- if opt.isset(FlagSrc | FlagDst | FlagInterface) {
- l += syscall.CmsgSpace(ctlOpts[ctlPacketInfo].length)
- }
- } else {
- if opt.isset(FlagDst) && ctlOpts[ctlDst].name > 0 {
- l += syscall.CmsgSpace(ctlOpts[ctlDst].length)
- }
- if opt.isset(FlagInterface) && ctlOpts[ctlInterface].name > 0 {
- l += syscall.CmsgSpace(ctlOpts[ctlInterface].length)
- }
- }
- if l > 0 {
- oob = make([]byte, l)
- }
- opt.RUnlock()
- return
-}
-
-func parseControlMessage(b []byte) (*ControlMessage, error) {
- if len(b) == 0 {
- return nil, nil
- }
- cmsgs, err := syscall.ParseSocketControlMessage(b)
- if err != nil {
- return nil, os.NewSyscallError("parse socket control message", err)
- }
- cm := &ControlMessage{}
- for _, m := range cmsgs {
- if m.Header.Level != iana.ProtocolIP {
- continue
- }
- switch int(m.Header.Type) {
- case ctlOpts[ctlTTL].name:
- ctlOpts[ctlTTL].parse(cm, m.Data[:])
- case ctlOpts[ctlDst].name:
- ctlOpts[ctlDst].parse(cm, m.Data[:])
- case ctlOpts[ctlInterface].name:
- ctlOpts[ctlInterface].parse(cm, m.Data[:])
- case ctlOpts[ctlPacketInfo].name:
- ctlOpts[ctlPacketInfo].parse(cm, m.Data[:])
- }
- }
- return cm, nil
-}
-
-func marshalControlMessage(cm *ControlMessage) (oob []byte) {
- if cm == nil {
- return nil
- }
- var l int
- pktinfo := false
- if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To4() != nil || cm.IfIndex > 0) {
- pktinfo = true
- l += syscall.CmsgSpace(ctlOpts[ctlPacketInfo].length)
- }
- if l > 0 {
- oob = make([]byte, l)
- b := oob
- if pktinfo {
- b = ctlOpts[ctlPacketInfo].marshal(b, cm)
- }
- }
- return
-}
-
func marshalTTL(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIP
- m.Type = sysIP_RECVTTL
- m.SetLen(syscall.CmsgLen(1))
- return b[syscall.CmsgSpace(1):]
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIP, sysIP_RECVTTL, 1)
+ return m.Next(1)
}
func parseTTL(cm *ControlMessage, b []byte) {
diff --git a/vendor/golang.org/x/net/ipv4/control_windows.go b/vendor/golang.org/x/net/ipv4/control_windows.go
index b27407db9..ce55c6644 100644
--- a/vendor/golang.org/x/net/ipv4/control_windows.go
+++ b/vendor/golang.org/x/net/ipv4/control_windows.go
@@ -4,24 +4,13 @@
package ipv4
-import "syscall"
+import (
+ "syscall"
-func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
+ "golang.org/x/net/internal/socket"
+)
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
// TODO(mikio): implement this
return syscall.EWINDOWS
}
-
-func newControlMessage(opt *rawOpt) []byte {
- // TODO(mikio): implement this
- return nil
-}
-
-func parseControlMessage(b []byte) (*ControlMessage, error) {
- // TODO(mikio): implement this
- return nil, syscall.EWINDOWS
-}
-
-func marshalControlMessage(cm *ControlMessage) []byte {
- // TODO(mikio): implement this
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv4/defs_linux.go b/vendor/golang.org/x/net/ipv4/defs_linux.go
index 31dfa093c..beb11071a 100644
--- a/vendor/golang.org/x/net/ipv4/defs_linux.go
+++ b/vendor/golang.org/x/net/ipv4/defs_linux.go
@@ -93,6 +93,8 @@ const (
sizeofGroupSourceReq = C.sizeof_struct_group_source_req
sizeofICMPFilter = C.sizeof_struct_icmp_filter
+
+ sizeofSockFprog = C.sizeof_struct_sock_fprog
)
type kernelSockaddrStorage C.struct___kernel_sockaddr_storage
diff --git a/vendor/golang.org/x/net/ipv4/dgramopt_posix.go b/vendor/golang.org/x/net/ipv4/dgramopt.go
similarity index 69%
rename from vendor/golang.org/x/net/ipv4/dgramopt_posix.go
rename to vendor/golang.org/x/net/ipv4/dgramopt.go
index fbc5df198..54d77d5fe 100644
--- a/vendor/golang.org/x/net/ipv4/dgramopt_posix.go
+++ b/vendor/golang.org/x/net/ipv4/dgramopt.go
@@ -2,15 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
package ipv4
import (
"net"
"syscall"
- "golang.org/x/net/internal/netreflect"
+ "golang.org/x/net/bpf"
)
// MulticastTTL returns the time-to-live field value for outgoing
@@ -19,11 +17,11 @@ func (c *dgramOpt) MulticastTTL() (int, error) {
if !c.ok() {
return 0, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return 0, err
+ so, ok := sockOpts[ssoMulticastTTL]
+ if !ok {
+ return 0, errOpNoSupport
}
- return getInt(s, &sockOpts[ssoMulticastTTL])
+ return so.GetInt(c.Conn)
}
// SetMulticastTTL sets the time-to-live field value for future
@@ -32,11 +30,11 @@ func (c *dgramOpt) SetMulticastTTL(ttl int) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoMulticastTTL]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoMulticastTTL], ttl)
+ return so.SetInt(c.Conn, ttl)
}
// MulticastInterface returns the default interface for multicast
@@ -45,11 +43,11 @@ func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
if !c.ok() {
return nil, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return nil, err
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return nil, errOpNoSupport
}
- return getInterface(s, &sockOpts[ssoMulticastInterface])
+ return so.getMulticastInterface(c.Conn)
}
// SetMulticastInterface sets the default interface for future
@@ -58,11 +56,11 @@ func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return errOpNoSupport
}
- return setInterface(s, &sockOpts[ssoMulticastInterface], ifi)
+ return so.setMulticastInterface(c.Conn, ifi)
}
// MulticastLoopback reports whether transmitted multicast packets
@@ -71,11 +69,11 @@ func (c *dgramOpt) MulticastLoopback() (bool, error) {
if !c.ok() {
return false, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return false, err
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return false, errOpNoSupport
}
- on, err := getInt(s, &sockOpts[ssoMulticastLoopback])
+ on, err := so.GetInt(c.Conn)
if err != nil {
return false, err
}
@@ -88,11 +86,11 @@ func (c *dgramOpt) SetMulticastLoopback(on bool) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoMulticastLoopback], boolint(on))
+ return so.SetInt(c.Conn, boolint(on))
}
// JoinGroup joins the group address group on the interface ifi.
@@ -108,15 +106,15 @@ func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoJoinGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP4(group)
if grp == nil {
return errMissingAddress
}
- return setGroup(s, &sockOpts[ssoJoinGroup], ifi, grp)
+ return so.setGroup(c.Conn, ifi, grp)
}
// LeaveGroup leaves the group address group on the interface ifi
@@ -126,15 +124,15 @@ func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoLeaveGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP4(group)
if grp == nil {
return errMissingAddress
}
- return setGroup(s, &sockOpts[ssoLeaveGroup], ifi, grp)
+ return so.setGroup(c.Conn, ifi, grp)
}
// JoinSourceSpecificGroup joins the source-specific group comprising
@@ -147,9 +145,9 @@ func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoJoinSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP4(group)
if grp == nil {
@@ -159,7 +157,7 @@ func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoJoinSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// LeaveSourceSpecificGroup leaves the source-specific group on the
@@ -168,9 +166,9 @@ func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source ne
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoLeaveSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP4(group)
if grp == nil {
@@ -180,7 +178,7 @@ func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source ne
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoLeaveSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// ExcludeSourceSpecificGroup excludes the source-specific group from
@@ -190,9 +188,9 @@ func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoBlockSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP4(group)
if grp == nil {
@@ -202,7 +200,7 @@ func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoBlockSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// IncludeSourceSpecificGroup includes the excluded source-specific
@@ -211,9 +209,9 @@ func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoUnblockSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP4(group)
if grp == nil {
@@ -223,7 +221,7 @@ func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoUnblockSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// ICMPFilter returns an ICMP filter.
@@ -232,11 +230,11 @@ func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
if !c.ok() {
return nil, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return nil, err
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return nil, errOpNoSupport
}
- return getICMPFilter(s, &sockOpts[ssoICMPFilter])
+ return so.getICMPFilter(c.Conn)
}
// SetICMPFilter deploys the ICMP filter.
@@ -245,9 +243,23 @@ func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return errOpNoSupport
}
- return setICMPFilter(s, &sockOpts[ssoICMPFilter], f)
+ return so.setICMPFilter(c.Conn, f)
+}
+
+// SetBPF attaches a BPF program to the connection.
+//
+// Only supported on Linux.
+func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
+ if !c.ok() {
+ return syscall.EINVAL
+ }
+ so, ok := sockOpts[ssoAttachFilter]
+ if !ok {
+ return errOpNoSupport
+ }
+ return so.setBPF(c.Conn, filter)
}
diff --git a/vendor/golang.org/x/net/ipv4/dgramopt_stub.go b/vendor/golang.org/x/net/ipv4/dgramopt_stub.go
deleted file mode 100644
index f6b867f92..000000000
--- a/vendor/golang.org/x/net/ipv4/dgramopt_stub.go
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright 2012 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 nacl plan9
-
-package ipv4
-
-import "net"
-
-// MulticastTTL returns the time-to-live field value for outgoing
-// multicast packets.
-func (c *dgramOpt) MulticastTTL() (int, error) {
- return 0, errOpNoSupport
-}
-
-// SetMulticastTTL sets the time-to-live field value for future
-// outgoing multicast packets.
-func (c *dgramOpt) SetMulticastTTL(ttl int) error {
- return errOpNoSupport
-}
-
-// MulticastInterface returns the default interface for multicast
-// packet transmissions.
-func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
- return nil, errOpNoSupport
-}
-
-// SetMulticastInterface sets the default interface for future
-// multicast packet transmissions.
-func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
- return errOpNoSupport
-}
-
-// MulticastLoopback reports whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) MulticastLoopback() (bool, error) {
- return false, errOpNoSupport
-}
-
-// SetMulticastLoopback sets whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) SetMulticastLoopback(on bool) error {
- return errOpNoSupport
-}
-
-// JoinGroup joins the group address group on the interface ifi.
-// By default all sources that can cast data to group are accepted.
-// It's possible to mute and unmute data transmission from a specific
-// source by using ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup.
-// JoinGroup uses the system assigned multicast interface when ifi is
-// nil, although this is not recommended because the assignment
-// depends on platforms and sometimes it might require routing
-// configuration.
-func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
- return errOpNoSupport
-}
-
-// LeaveGroup leaves the group address group on the interface ifi
-// regardless of whether the group is any-source group or
-// source-specific group.
-func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
- return errOpNoSupport
-}
-
-// JoinSourceSpecificGroup joins the source-specific group comprising
-// group and source on the interface ifi.
-// JoinSourceSpecificGroup uses the system assigned multicast
-// interface when ifi is nil, although this is not recommended because
-// the assignment depends on platforms and sometimes it might require
-// routing configuration.
-func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// LeaveSourceSpecificGroup leaves the source-specific group on the
-// interface ifi.
-func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// ExcludeSourceSpecificGroup excludes the source-specific group from
-// the already joined any-source groups by JoinGroup on the interface
-// ifi.
-func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// IncludeSourceSpecificGroup includes the excluded source-specific
-// group by ExcludeSourceSpecificGroup again on the interface ifi.
-func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// ICMPFilter returns an ICMP filter.
-// Currently only Linux supports this.
-func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
- return nil, errOpNoSupport
-}
-
-// SetICMPFilter deploys the ICMP filter.
-// Currently only Linux supports this.
-func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
- return errOpNoSupport
-}
diff --git a/vendor/golang.org/x/net/ipv4/endpoint.go b/vendor/golang.org/x/net/ipv4/endpoint.go
index 8f7e07ac4..2ab877363 100644
--- a/vendor/golang.org/x/net/ipv4/endpoint.go
+++ b/vendor/golang.org/x/net/ipv4/endpoint.go
@@ -9,7 +9,7 @@ import (
"syscall"
"time"
- "golang.org/x/net/internal/netreflect"
+ "golang.org/x/net/internal/socket"
)
// BUG(mikio): On Windows, the JoinSourceSpecificGroup,
@@ -25,15 +25,16 @@ type Conn struct {
}
type genericOpt struct {
- net.Conn
+ *socket.Conn
}
func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
// NewConn returns a new Conn.
func NewConn(c net.Conn) *Conn {
+ cc, _ := socket.NewConn(c)
return &Conn{
- genericOpt: genericOpt{Conn: c},
+ genericOpt: genericOpt{Conn: cc},
}
}
@@ -49,21 +50,17 @@ type PacketConn struct {
}
type dgramOpt struct {
- net.PacketConn
+ *socket.Conn
}
-func (c *dgramOpt) ok() bool { return c != nil && c.PacketConn != nil }
+func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }
// SetControlMessage sets the per packet IP-level socket options.
func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
if !c.payloadHandler.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.dgramOpt.PacketConn)
- if err != nil {
- return err
- }
- return setControlMessage(s, &c.payloadHandler.rawOpt, cf, on)
+ return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
}
// SetDeadline sets the read and write deadlines associated with the
@@ -104,15 +101,11 @@ func (c *PacketConn) Close() error {
// NewPacketConn returns a new PacketConn using c as its underlying
// transport.
func NewPacketConn(c net.PacketConn) *PacketConn {
+ cc, _ := socket.NewConn(c.(net.Conn))
p := &PacketConn{
- genericOpt: genericOpt{Conn: c.(net.Conn)},
- dgramOpt: dgramOpt{PacketConn: c},
- payloadHandler: payloadHandler{PacketConn: c},
- }
- if _, ok := c.(*net.IPConn); ok && sockOpts[ssoStripHeader].name > 0 {
- if s, err := netreflect.PacketSocketOf(c); err == nil {
- setInt(s, &sockOpts[ssoStripHeader], boolint(true))
- }
+ genericOpt: genericOpt{Conn: cc},
+ dgramOpt: dgramOpt{Conn: cc},
+ payloadHandler: payloadHandler{PacketConn: c, Conn: cc},
}
return p
}
@@ -133,11 +126,7 @@ func (c *RawConn) SetControlMessage(cf ControlFlags, on bool) error {
if !c.packetHandler.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.dgramOpt.PacketConn)
- if err != nil {
- return err
- }
- return setControlMessage(s, &c.packetHandler.rawOpt, cf, on)
+ return setControlMessage(c.dgramOpt.Conn, &c.packetHandler.rawOpt, cf, on)
}
// SetDeadline sets the read and write deadlines associated with the
@@ -146,7 +135,7 @@ func (c *RawConn) SetDeadline(t time.Time) error {
if !c.packetHandler.ok() {
return syscall.EINVAL
}
- return c.packetHandler.c.SetDeadline(t)
+ return c.packetHandler.IPConn.SetDeadline(t)
}
// SetReadDeadline sets the read deadline associated with the
@@ -155,7 +144,7 @@ func (c *RawConn) SetReadDeadline(t time.Time) error {
if !c.packetHandler.ok() {
return syscall.EINVAL
}
- return c.packetHandler.c.SetReadDeadline(t)
+ return c.packetHandler.IPConn.SetReadDeadline(t)
}
// SetWriteDeadline sets the write deadline associated with the
@@ -164,7 +153,7 @@ func (c *RawConn) SetWriteDeadline(t time.Time) error {
if !c.packetHandler.ok() {
return syscall.EINVAL
}
- return c.packetHandler.c.SetWriteDeadline(t)
+ return c.packetHandler.IPConn.SetWriteDeadline(t)
}
// Close closes the endpoint.
@@ -172,22 +161,26 @@ func (c *RawConn) Close() error {
if !c.packetHandler.ok() {
return syscall.EINVAL
}
- return c.packetHandler.c.Close()
+ return c.packetHandler.IPConn.Close()
}
// NewRawConn returns a new RawConn using c as its underlying
// transport.
func NewRawConn(c net.PacketConn) (*RawConn, error) {
- r := &RawConn{
- genericOpt: genericOpt{Conn: c.(net.Conn)},
- dgramOpt: dgramOpt{PacketConn: c},
- packetHandler: packetHandler{c: c.(*net.IPConn)},
- }
- s, err := netreflect.PacketSocketOf(c)
+ cc, err := socket.NewConn(c.(net.Conn))
if err != nil {
return nil, err
}
- if err := setInt(s, &sockOpts[ssoHeaderPrepend], boolint(true)); err != nil {
+ r := &RawConn{
+ genericOpt: genericOpt{Conn: cc},
+ dgramOpt: dgramOpt{Conn: cc},
+ packetHandler: packetHandler{IPConn: c.(*net.IPConn), Conn: cc},
+ }
+ so, ok := sockOpts[ssoHeaderPrepend]
+ if !ok {
+ return nil, errOpNoSupport
+ }
+ if err := so.SetInt(r.dgramOpt.Conn, boolint(true)); err != nil {
return nil, err
}
return r, nil
diff --git a/vendor/golang.org/x/net/ipv4/genericopt_posix.go b/vendor/golang.org/x/net/ipv4/genericopt.go
similarity index 59%
rename from vendor/golang.org/x/net/ipv4/genericopt_posix.go
rename to vendor/golang.org/x/net/ipv4/genericopt.go
index 58168b737..119bf841b 100644
--- a/vendor/golang.org/x/net/ipv4/genericopt_posix.go
+++ b/vendor/golang.org/x/net/ipv4/genericopt.go
@@ -2,26 +2,20 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
package ipv4
-import (
- "syscall"
-
- "golang.org/x/net/internal/netreflect"
-)
+import "syscall"
// TOS returns the type-of-service field value for outgoing packets.
func (c *genericOpt) TOS() (int, error) {
if !c.ok() {
return 0, syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return 0, err
+ so, ok := sockOpts[ssoTOS]
+ if !ok {
+ return 0, errOpNoSupport
}
- return getInt(s, &sockOpts[ssoTOS])
+ return so.GetInt(c.Conn)
}
// SetTOS sets the type-of-service field value for future outgoing
@@ -30,11 +24,11 @@ func (c *genericOpt) SetTOS(tos int) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoTOS]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoTOS], tos)
+ return so.SetInt(c.Conn, tos)
}
// TTL returns the time-to-live field value for outgoing packets.
@@ -42,11 +36,11 @@ func (c *genericOpt) TTL() (int, error) {
if !c.ok() {
return 0, syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return 0, err
+ so, ok := sockOpts[ssoTTL]
+ if !ok {
+ return 0, errOpNoSupport
}
- return getInt(s, &sockOpts[ssoTTL])
+ return so.GetInt(c.Conn)
}
// SetTTL sets the time-to-live field value for future outgoing
@@ -55,9 +49,9 @@ func (c *genericOpt) SetTTL(ttl int) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoTTL]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoTTL], ttl)
+ return so.SetInt(c.Conn, ttl)
}
diff --git a/vendor/golang.org/x/net/ipv4/genericopt_stub.go b/vendor/golang.org/x/net/ipv4/genericopt_stub.go
deleted file mode 100644
index 661a4d1ab..000000000
--- a/vendor/golang.org/x/net/ipv4/genericopt_stub.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2012 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 nacl plan9
-
-package ipv4
-
-// TOS returns the type-of-service field value for outgoing packets.
-func (c *genericOpt) TOS() (int, error) {
- return 0, errOpNoSupport
-}
-
-// SetTOS sets the type-of-service field value for future outgoing
-// packets.
-func (c *genericOpt) SetTOS(tos int) error {
- return errOpNoSupport
-}
-
-// TTL returns the time-to-live field value for outgoing packets.
-func (c *genericOpt) TTL() (int, error) {
- return 0, errOpNoSupport
-}
-
-// SetTTL sets the time-to-live field value for future outgoing
-// packets.
-func (c *genericOpt) SetTTL(ttl int) error {
- return errOpNoSupport
-}
diff --git a/vendor/golang.org/x/net/ipv4/header.go b/vendor/golang.org/x/net/ipv4/header.go
index 6dc26d43f..8bb0f0f4d 100644
--- a/vendor/golang.org/x/net/ipv4/header.go
+++ b/vendor/golang.org/x/net/ipv4/header.go
@@ -10,6 +10,8 @@ import (
"net"
"runtime"
"syscall"
+
+ "golang.org/x/net/internal/socket"
)
const (
@@ -49,7 +51,7 @@ func (h *Header) String() string {
return fmt.Sprintf("ver=%d hdrlen=%d tos=%#x totallen=%d id=%#x flags=%#x fragoff=%#x ttl=%d proto=%d cksum=%#x src=%v dst=%v", h.Version, h.Len, h.TOS, h.TotalLen, h.ID, h.Flags, h.FragOff, h.TTL, h.Protocol, h.Checksum, h.Src, h.Dst)
}
-// Marshal returns the binary encoding of the IPv4 header h.
+// Marshal returns the binary encoding of h.
func (h *Header) Marshal() ([]byte, error) {
if h == nil {
return nil, syscall.EINVAL
@@ -64,12 +66,12 @@ func (h *Header) Marshal() ([]byte, error) {
flagsAndFragOff := (h.FragOff & 0x1fff) | int(h.Flags<<13)
switch runtime.GOOS {
case "darwin", "dragonfly", "netbsd":
- nativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
- nativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
+ socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
+ socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
case "freebsd":
if freebsdVersion < 1100000 {
- nativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
- nativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
+ socket.NativeEndian.PutUint16(b[2:4], uint16(h.TotalLen))
+ socket.NativeEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
} else {
binary.BigEndian.PutUint16(b[2:4], uint16(h.TotalLen))
binary.BigEndian.PutUint16(b[6:8], uint16(flagsAndFragOff))
@@ -96,37 +98,35 @@ func (h *Header) Marshal() ([]byte, error) {
return b, nil
}
-// ParseHeader parses b as an IPv4 header.
-func ParseHeader(b []byte) (*Header, error) {
- if len(b) < HeaderLen {
- return nil, errHeaderTooShort
+// Parse parses b as an IPv4 header and sotres the result in h.
+func (h *Header) Parse(b []byte) error {
+ if h == nil || len(b) < HeaderLen {
+ return errHeaderTooShort
}
hdrlen := int(b[0]&0x0f) << 2
if hdrlen > len(b) {
- return nil, errBufferTooShort
- }
- h := &Header{
- Version: int(b[0] >> 4),
- Len: hdrlen,
- TOS: int(b[1]),
- ID: int(binary.BigEndian.Uint16(b[4:6])),
- TTL: int(b[8]),
- Protocol: int(b[9]),
- Checksum: int(binary.BigEndian.Uint16(b[10:12])),
- Src: net.IPv4(b[12], b[13], b[14], b[15]),
- Dst: net.IPv4(b[16], b[17], b[18], b[19]),
+ return errBufferTooShort
}
+ h.Version = int(b[0] >> 4)
+ h.Len = hdrlen
+ h.TOS = int(b[1])
+ h.ID = int(binary.BigEndian.Uint16(b[4:6]))
+ h.TTL = int(b[8])
+ h.Protocol = int(b[9])
+ h.Checksum = int(binary.BigEndian.Uint16(b[10:12]))
+ h.Src = net.IPv4(b[12], b[13], b[14], b[15])
+ h.Dst = net.IPv4(b[16], b[17], b[18], b[19])
switch runtime.GOOS {
case "darwin", "dragonfly", "netbsd":
- h.TotalLen = int(nativeEndian.Uint16(b[2:4])) + hdrlen
- h.FragOff = int(nativeEndian.Uint16(b[6:8]))
+ h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4])) + hdrlen
+ h.FragOff = int(socket.NativeEndian.Uint16(b[6:8]))
case "freebsd":
if freebsdVersion < 1100000 {
- h.TotalLen = int(nativeEndian.Uint16(b[2:4]))
+ h.TotalLen = int(socket.NativeEndian.Uint16(b[2:4]))
if freebsdVersion < 1000000 {
h.TotalLen += hdrlen
}
- h.FragOff = int(nativeEndian.Uint16(b[6:8]))
+ h.FragOff = int(socket.NativeEndian.Uint16(b[6:8]))
} else {
h.TotalLen = int(binary.BigEndian.Uint16(b[2:4]))
h.FragOff = int(binary.BigEndian.Uint16(b[6:8]))
@@ -137,9 +137,23 @@ func ParseHeader(b []byte) (*Header, error) {
}
h.Flags = HeaderFlags(h.FragOff&0xe000) >> 13
h.FragOff = h.FragOff & 0x1fff
- if hdrlen-HeaderLen > 0 {
- h.Options = make([]byte, hdrlen-HeaderLen)
- copy(h.Options, b[HeaderLen:])
+ optlen := hdrlen - HeaderLen
+ if optlen > 0 && len(b) >= hdrlen {
+ if cap(h.Options) < optlen {
+ h.Options = make([]byte, optlen)
+ } else {
+ h.Options = h.Options[:optlen]
+ }
+ copy(h.Options, b[HeaderLen:hdrlen])
+ }
+ return nil
+}
+
+// ParseHeader parses b as an IPv4 header.
+func ParseHeader(b []byte) (*Header, error) {
+ h := new(Header)
+ if err := h.Parse(b); err != nil {
+ return nil, err
}
return h, nil
}
diff --git a/vendor/golang.org/x/net/ipv4/header_test.go b/vendor/golang.org/x/net/ipv4/header_test.go
index cdf27fd03..a246aeea1 100644
--- a/vendor/golang.org/x/net/ipv4/header_test.go
+++ b/vendor/golang.org/x/net/ipv4/header_test.go
@@ -12,141 +12,217 @@ import (
"runtime"
"strings"
"testing"
+
+ "golang.org/x/net/internal/socket"
)
type headerTest struct {
- wireHeaderFromKernel [HeaderLen]byte
- wireHeaderToKernel [HeaderLen]byte
- wireHeaderFromTradBSDKernel [HeaderLen]byte
- wireHeaderToTradBSDKernel [HeaderLen]byte
- wireHeaderFromFreeBSD10Kernel [HeaderLen]byte
- wireHeaderToFreeBSD10Kernel [HeaderLen]byte
+ wireHeaderFromKernel []byte
+ wireHeaderToKernel []byte
+ wireHeaderFromTradBSDKernel []byte
+ wireHeaderToTradBSDKernel []byte
+ wireHeaderFromFreeBSD10Kernel []byte
+ wireHeaderToFreeBSD10Kernel []byte
*Header
}
-var headerLittleEndianTest = headerTest{
+var headerLittleEndianTests = []headerTest{
// TODO(mikio): Add platform dependent wire header formats when
// we support new platforms.
- wireHeaderFromKernel: [HeaderLen]byte{
- 0x45, 0x01, 0xbe, 0xef,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
+ {
+ wireHeaderFromKernel: []byte{
+ 0x45, 0x01, 0xbe, 0xef,
+ 0xca, 0xfe, 0x45, 0xdc,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ },
+ wireHeaderToKernel: []byte{
+ 0x45, 0x01, 0xbe, 0xef,
+ 0xca, 0xfe, 0x45, 0xdc,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ },
+ wireHeaderFromTradBSDKernel: []byte{
+ 0x45, 0x01, 0xdb, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ },
+ wireHeaderToTradBSDKernel: []byte{
+ 0x45, 0x01, 0xef, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ },
+ wireHeaderFromFreeBSD10Kernel: []byte{
+ 0x45, 0x01, 0xef, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ },
+ wireHeaderToFreeBSD10Kernel: []byte{
+ 0x45, 0x01, 0xef, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ },
+ Header: &Header{
+ Version: Version,
+ Len: HeaderLen,
+ TOS: 1,
+ TotalLen: 0xbeef,
+ ID: 0xcafe,
+ Flags: DontFragment,
+ FragOff: 1500,
+ TTL: 255,
+ Protocol: 1,
+ Checksum: 0xdead,
+ Src: net.IPv4(172, 16, 254, 254),
+ Dst: net.IPv4(192, 168, 0, 1),
+ },
},
- wireHeaderToKernel: [HeaderLen]byte{
- 0x45, 0x01, 0xbe, 0xef,
- 0xca, 0xfe, 0x45, 0xdc,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderFromTradBSDKernel: [HeaderLen]byte{
- 0x45, 0x01, 0xdb, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderToTradBSDKernel: [HeaderLen]byte{
- 0x45, 0x01, 0xef, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderFromFreeBSD10Kernel: [HeaderLen]byte{
- 0x45, 0x01, 0xef, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- wireHeaderToFreeBSD10Kernel: [HeaderLen]byte{
- 0x45, 0x01, 0xef, 0xbe,
- 0xca, 0xfe, 0xdc, 0x45,
- 0xff, 0x01, 0xde, 0xad,
- 172, 16, 254, 254,
- 192, 168, 0, 1,
- },
- Header: &Header{
- Version: Version,
- Len: HeaderLen,
- TOS: 1,
- TotalLen: 0xbeef,
- ID: 0xcafe,
- Flags: DontFragment,
- FragOff: 1500,
- TTL: 255,
- Protocol: 1,
- Checksum: 0xdead,
- Src: net.IPv4(172, 16, 254, 254),
- Dst: net.IPv4(192, 168, 0, 1),
+
+ // with option headers
+ {
+ wireHeaderFromKernel: []byte{
+ 0x46, 0x01, 0xbe, 0xf3,
+ 0xca, 0xfe, 0x45, 0xdc,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ 0xff, 0xfe, 0xfe, 0xff,
+ },
+ wireHeaderToKernel: []byte{
+ 0x46, 0x01, 0xbe, 0xf3,
+ 0xca, 0xfe, 0x45, 0xdc,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ 0xff, 0xfe, 0xfe, 0xff,
+ },
+ wireHeaderFromTradBSDKernel: []byte{
+ 0x46, 0x01, 0xdb, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ 0xff, 0xfe, 0xfe, 0xff,
+ },
+ wireHeaderToTradBSDKernel: []byte{
+ 0x46, 0x01, 0xf3, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ 0xff, 0xfe, 0xfe, 0xff,
+ },
+ wireHeaderFromFreeBSD10Kernel: []byte{
+ 0x46, 0x01, 0xf3, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ 0xff, 0xfe, 0xfe, 0xff,
+ },
+ wireHeaderToFreeBSD10Kernel: []byte{
+ 0x46, 0x01, 0xf3, 0xbe,
+ 0xca, 0xfe, 0xdc, 0x45,
+ 0xff, 0x01, 0xde, 0xad,
+ 172, 16, 254, 254,
+ 192, 168, 0, 1,
+ 0xff, 0xfe, 0xfe, 0xff,
+ },
+ Header: &Header{
+ Version: Version,
+ Len: HeaderLen + 4,
+ TOS: 1,
+ TotalLen: 0xbef3,
+ ID: 0xcafe,
+ Flags: DontFragment,
+ FragOff: 1500,
+ TTL: 255,
+ Protocol: 1,
+ Checksum: 0xdead,
+ Src: net.IPv4(172, 16, 254, 254),
+ Dst: net.IPv4(192, 168, 0, 1),
+ Options: []byte{0xff, 0xfe, 0xfe, 0xff},
+ },
},
}
func TestMarshalHeader(t *testing.T) {
- tt := &headerLittleEndianTest
- if nativeEndian != binary.LittleEndian {
+ if socket.NativeEndian != binary.LittleEndian {
t.Skip("no test for non-little endian machine yet")
}
- b, err := tt.Header.Marshal()
- if err != nil {
- t.Fatal(err)
- }
- var wh []byte
- switch runtime.GOOS {
- case "darwin", "dragonfly", "netbsd":
- wh = tt.wireHeaderToTradBSDKernel[:]
- case "freebsd":
- switch {
- case freebsdVersion < 1000000:
- wh = tt.wireHeaderToTradBSDKernel[:]
- case 1000000 <= freebsdVersion && freebsdVersion < 1100000:
- wh = tt.wireHeaderToFreeBSD10Kernel[:]
- default:
- wh = tt.wireHeaderToKernel[:]
+ for _, tt := range headerLittleEndianTests {
+ b, err := tt.Header.Marshal()
+ if err != nil {
+ t.Fatal(err)
+ }
+ var wh []byte
+ switch runtime.GOOS {
+ case "darwin", "dragonfly", "netbsd":
+ wh = tt.wireHeaderToTradBSDKernel
+ case "freebsd":
+ switch {
+ case freebsdVersion < 1000000:
+ wh = tt.wireHeaderToTradBSDKernel
+ case 1000000 <= freebsdVersion && freebsdVersion < 1100000:
+ wh = tt.wireHeaderToFreeBSD10Kernel
+ default:
+ wh = tt.wireHeaderToKernel
+ }
+ default:
+ wh = tt.wireHeaderToKernel
+ }
+ if !bytes.Equal(b, wh) {
+ t.Fatalf("got %#v; want %#v", b, wh)
}
- default:
- wh = tt.wireHeaderToKernel[:]
- }
- if !bytes.Equal(b, wh) {
- t.Fatalf("got %#v; want %#v", b, wh)
}
}
func TestParseHeader(t *testing.T) {
- tt := &headerLittleEndianTest
- if nativeEndian != binary.LittleEndian {
+ if socket.NativeEndian != binary.LittleEndian {
t.Skip("no test for big endian machine yet")
}
- var wh []byte
- switch runtime.GOOS {
- case "darwin", "dragonfly", "netbsd":
- wh = tt.wireHeaderFromTradBSDKernel[:]
- case "freebsd":
- switch {
- case freebsdVersion < 1000000:
- wh = tt.wireHeaderFromTradBSDKernel[:]
- case 1000000 <= freebsdVersion && freebsdVersion < 1100000:
- wh = tt.wireHeaderFromFreeBSD10Kernel[:]
+ for _, tt := range headerLittleEndianTests {
+ var wh []byte
+ switch runtime.GOOS {
+ case "darwin", "dragonfly", "netbsd":
+ wh = tt.wireHeaderFromTradBSDKernel
+ case "freebsd":
+ switch {
+ case freebsdVersion < 1000000:
+ wh = tt.wireHeaderFromTradBSDKernel
+ case 1000000 <= freebsdVersion && freebsdVersion < 1100000:
+ wh = tt.wireHeaderFromFreeBSD10Kernel
+ default:
+ wh = tt.wireHeaderFromKernel
+ }
default:
- wh = tt.wireHeaderFromKernel[:]
+ wh = tt.wireHeaderFromKernel
+ }
+ h, err := ParseHeader(wh)
+ if err != nil {
+ t.Fatal(err)
+ }
+ if err := h.Parse(wh); err != nil {
+ t.Fatal(err)
+ }
+ if !reflect.DeepEqual(h, tt.Header) {
+ t.Fatalf("got %#v; want %#v", h, tt.Header)
+ }
+ s := h.String()
+ if strings.Contains(s, ",") {
+ t.Fatalf("should be space-separated values: %s", s)
}
- default:
- wh = tt.wireHeaderFromKernel[:]
- }
- h, err := ParseHeader(wh)
- if err != nil {
- t.Fatal(err)
- }
- if !reflect.DeepEqual(h, tt.Header) {
- t.Fatalf("got %#v; want %#v", h, tt.Header)
- }
- s := h.String()
- if strings.Contains(s, ",") {
- t.Fatalf("should be space-separated values: %s", s)
}
}
diff --git a/vendor/golang.org/x/net/ipv4/helper.go b/vendor/golang.org/x/net/ipv4/helper.go
index 083897995..a5052e324 100644
--- a/vendor/golang.org/x/net/ipv4/helper.go
+++ b/vendor/golang.org/x/net/ipv4/helper.go
@@ -5,10 +5,8 @@
package ipv4
import (
- "encoding/binary"
"errors"
"net"
- "unsafe"
)
var (
@@ -23,20 +21,8 @@ var (
// See http://www.freebsd.org/doc/en/books/porters-handbook/freebsd-versions.html.
freebsdVersion uint32
-
- nativeEndian binary.ByteOrder
)
-func init() {
- i := uint32(1)
- b := (*[4]byte)(unsafe.Pointer(&i))
- if b[0] == 1 {
- nativeEndian = binary.LittleEndian
- } else {
- nativeEndian = binary.BigEndian
- }
-}
-
func boolint(b bool) int {
if b {
return 1
@@ -57,3 +43,21 @@ func netAddrToIP4(a net.Addr) net.IP {
}
return nil
}
+
+func opAddr(a net.Addr) net.Addr {
+ switch a.(type) {
+ case *net.TCPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.UDPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.IPAddr:
+ if a == nil {
+ return nil
+ }
+ }
+ return a
+}
diff --git a/vendor/golang.org/x/net/ipv4/icmp.go b/vendor/golang.org/x/net/ipv4/icmp.go
index 097bea846..9902bb3d2 100644
--- a/vendor/golang.org/x/net/ipv4/icmp.go
+++ b/vendor/golang.org/x/net/ipv4/icmp.go
@@ -26,7 +26,7 @@ func (typ ICMPType) Protocol() int {
// packets. The filter belongs to a packet delivery path on a host and
// it cannot interact with forwarding packets or tunnel-outer packets.
//
-// Note: RFC 2460 defines a reasonable role model and it works not
+// Note: RFC 8200 defines a reasonable role model and it works not
// only for IPv6 but IPv4. A node means a device that implements IP.
// A router means a node that forwards IP packets not explicitly
// addressed to itself, and a host means a node that is not a router.
diff --git a/vendor/golang.org/x/net/ipv4/ipv4_test.go b/vendor/golang.org/x/net/ipv4/ipv4_test.go
deleted file mode 100644
index 917299283..000000000
--- a/vendor/golang.org/x/net/ipv4/ipv4_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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 ipv4
-
-import (
- "fmt"
- "os"
- "testing"
-)
-
-var disableTests = false
-
-func TestMain(m *testing.M) {
- if disableTests {
- fmt.Fprintf(os.Stderr, "ipv4 tests disabled in Go 1.9 until netreflect is fixed. (Issue 19051)\n")
- os.Exit(0)
- }
- // call flag.Parse() here if TestMain uses flags
- os.Exit(m.Run())
-}
diff --git a/vendor/golang.org/x/net/ipv4/multicastlistener_test.go b/vendor/golang.org/x/net/ipv4/multicastlistener_test.go
index a0c24b55b..e43fbbe08 100644
--- a/vendor/golang.org/x/net/ipv4/multicastlistener_test.go
+++ b/vendor/golang.org/x/net/ipv4/multicastlistener_test.go
@@ -69,13 +69,16 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
}
for _, gaddr := range udpMultipleGroupListenerTests {
- c1, err := net.ListenPacket("udp4", "224.0.0.0:1024") // wildcard address with reusable port
+ c1, err := net.ListenPacket("udp4", "224.0.0.0:0") // wildcard address with reusable port
if err != nil {
t.Fatal(err)
}
defer c1.Close()
-
- c2, err := net.ListenPacket("udp4", "224.0.0.0:1024") // wildcard address with reusable port
+ _, port, err := net.SplitHostPort(c1.LocalAddr().String())
+ if err != nil {
+ t.Fatal(err)
+ }
+ c2, err := net.ListenPacket("udp4", net.JoinHostPort("224.0.0.0", port)) // wildcard address with reusable port
if err != nil {
t.Fatal(err)
}
@@ -131,16 +134,29 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ port := "0"
for i, ifi := range ift {
ip, ok := nettest.IsMulticastCapable("ip4", &ifi)
if !ok {
continue
}
- c, err := net.ListenPacket("udp4", ip.String()+":"+"1024") // unicast address with non-reusable port
+ c, err := net.ListenPacket("udp4", net.JoinHostPort(ip.String(), port)) // unicast address with non-reusable port
if err != nil {
- t.Fatal(err)
+ // The listen may fail when the serivce is
+ // already in use, but it's fine because the
+ // purpose of this is not to test the
+ // bookkeeping of IP control block inside the
+ // kernel.
+ t.Log(err)
+ continue
}
defer c.Close()
+ if port == "0" {
+ _, port, err = net.SplitHostPort(c.LocalAddr().String())
+ if err != nil {
+ t.Fatal(err)
+ }
+ }
p := ipv4.NewPacketConn(c)
if err := p.JoinGroup(&ifi, &gaddr); err != nil {
t.Fatal(err)
diff --git a/vendor/golang.org/x/net/ipv4/packet.go b/vendor/golang.org/x/net/ipv4/packet.go
index d43723ca9..f00f5b052 100644
--- a/vendor/golang.org/x/net/ipv4/packet.go
+++ b/vendor/golang.org/x/net/ipv4/packet.go
@@ -7,6 +7,8 @@ package ipv4
import (
"net"
"syscall"
+
+ "golang.org/x/net/internal/socket"
)
// BUG(mikio): On Windows, the ReadFrom and WriteTo methods of RawConn
@@ -14,11 +16,12 @@ import (
// A packetHandler represents the IPv4 datagram handler.
type packetHandler struct {
- c *net.IPConn
+ *net.IPConn
+ *socket.Conn
rawOpt
}
-func (c *packetHandler) ok() bool { return c != nil && c.c != nil }
+func (c *packetHandler) ok() bool { return c != nil && c.IPConn != nil && c.Conn != nil }
// ReadFrom reads an IPv4 datagram from the endpoint c, copying the
// datagram into b. It returns the received datagram as the IPv4
@@ -27,25 +30,7 @@ func (c *packetHandler) ReadFrom(b []byte) (h *Header, p []byte, cm *ControlMess
if !c.ok() {
return nil, nil, nil, syscall.EINVAL
}
- oob := newControlMessage(&c.rawOpt)
- n, oobn, _, src, err := c.c.ReadMsgIP(b, oob)
- if err != nil {
- return nil, nil, nil, err
- }
- var hs []byte
- if hs, p, err = slicePacket(b[:n]); err != nil {
- return nil, nil, nil, err
- }
- if h, err = ParseHeader(hs); err != nil {
- return nil, nil, nil, err
- }
- if cm, err = parseControlMessage(oob[:oobn]); err != nil {
- return nil, nil, nil, err
- }
- if src != nil && cm != nil {
- cm.Src = src.IP
- }
- return
+ return c.readFrom(b)
}
func slicePacket(b []byte) (h, p []byte, err error) {
@@ -80,21 +65,5 @@ func (c *packetHandler) WriteTo(h *Header, p []byte, cm *ControlMessage) error {
if !c.ok() {
return syscall.EINVAL
}
- oob := marshalControlMessage(cm)
- wh, err := h.Marshal()
- if err != nil {
- return err
- }
- dst := &net.IPAddr{}
- if cm != nil {
- if ip := cm.Dst.To4(); ip != nil {
- dst.IP = ip
- }
- }
- if dst.IP == nil {
- dst.IP = h.Dst
- }
- wh = append(wh, p...)
- _, _, err = c.c.WriteMsgIP(wh, oob, dst)
- return err
+ return c.writeTo(h, p, cm)
}
diff --git a/vendor/golang.org/x/net/ipv4/packet_go1_8.go b/vendor/golang.org/x/net/ipv4/packet_go1_8.go
new file mode 100644
index 000000000..b47d18683
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/packet_go1_8.go
@@ -0,0 +1,56 @@
+// Copyright 2012 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.9
+
+package ipv4
+
+import "net"
+
+func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
+ c.rawOpt.RLock()
+ oob := NewControlMessage(c.rawOpt.cflags)
+ c.rawOpt.RUnlock()
+ n, nn, _, src, err := c.ReadMsgIP(b, oob)
+ if err != nil {
+ return nil, nil, nil, err
+ }
+ var hs []byte
+ if hs, p, err = slicePacket(b[:n]); err != nil {
+ return nil, nil, nil, err
+ }
+ if h, err = ParseHeader(hs); err != nil {
+ return nil, nil, nil, err
+ }
+ if nn > 0 {
+ cm = new(ControlMessage)
+ if err := cm.Parse(oob[:nn]); err != nil {
+ return nil, nil, nil, err
+ }
+ }
+ if src != nil && cm != nil {
+ cm.Src = src.IP
+ }
+ return
+}
+
+func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error {
+ oob := cm.Marshal()
+ wh, err := h.Marshal()
+ if err != nil {
+ return err
+ }
+ dst := new(net.IPAddr)
+ if cm != nil {
+ if ip := cm.Dst.To4(); ip != nil {
+ dst.IP = ip
+ }
+ }
+ if dst.IP == nil {
+ dst.IP = h.Dst
+ }
+ wh = append(wh, p...)
+ _, _, err = c.WriteMsgIP(wh, oob, dst)
+ return err
+}
diff --git a/vendor/golang.org/x/net/ipv4/packet_go1_9.go b/vendor/golang.org/x/net/ipv4/packet_go1_9.go
new file mode 100644
index 000000000..082c36d73
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/packet_go1_9.go
@@ -0,0 +1,67 @@
+// Copyright 2017 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.9
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (c *packetHandler) readFrom(b []byte) (h *Header, p []byte, cm *ControlMessage, err error) {
+ c.rawOpt.RLock()
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: NewControlMessage(c.rawOpt.cflags),
+ }
+ c.rawOpt.RUnlock()
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ var hs []byte
+ if hs, p, err = slicePacket(b[:m.N]); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ if h, err = ParseHeader(hs); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ if m.NN > 0 {
+ cm = new(ControlMessage)
+ if err := cm.Parse(m.OOB[:m.NN]); err != nil {
+ return nil, nil, nil, &net.OpError{Op: "read", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Err: err}
+ }
+ }
+ if src, ok := m.Addr.(*net.IPAddr); ok && cm != nil {
+ cm.Src = src.IP
+ }
+ return
+}
+
+func (c *packetHandler) writeTo(h *Header, p []byte, cm *ControlMessage) error {
+ m := socket.Message{
+ OOB: cm.Marshal(),
+ }
+ wh, err := h.Marshal()
+ if err != nil {
+ return err
+ }
+ m.Buffers = [][]byte{wh, p}
+ dst := new(net.IPAddr)
+ if cm != nil {
+ if ip := cm.Dst.To4(); ip != nil {
+ dst.IP = ip
+ }
+ }
+ if dst.IP == nil {
+ dst.IP = h.Dst
+ }
+ m.Addr = dst
+ if err := c.SendMsg(&m, 0); err != nil {
+ return &net.OpError{Op: "write", Net: c.IPConn.LocalAddr().Network(), Source: c.IPConn.LocalAddr(), Addr: opAddr(dst), Err: err}
+ }
+ return nil
+}
diff --git a/vendor/golang.org/x/net/ipv4/payload.go b/vendor/golang.org/x/net/ipv4/payload.go
index be130e424..f95f811ac 100644
--- a/vendor/golang.org/x/net/ipv4/payload.go
+++ b/vendor/golang.org/x/net/ipv4/payload.go
@@ -4,7 +4,11 @@
package ipv4
-import "net"
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
// methods of PacketConn is not implemented.
@@ -12,7 +16,8 @@ import "net"
// A payloadHandler represents the IPv4 datagram payload handler.
type payloadHandler struct {
net.PacketConn
+ *socket.Conn
rawOpt
}
-func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil }
+func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
diff --git a/vendor/golang.org/x/net/ipv4/payload_cmsg.go b/vendor/golang.org/x/net/ipv4/payload_cmsg.go
index 5e6e55c20..3f06d7606 100644
--- a/vendor/golang.org/x/net/ipv4/payload_cmsg.go
+++ b/vendor/golang.org/x/net/ipv4/payload_cmsg.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build !plan9,!windows
+// +build !nacl,!plan9,!windows
package ipv4
@@ -19,37 +19,7 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
if !c.ok() {
return 0, nil, nil, syscall.EINVAL
}
- oob := newControlMessage(&c.rawOpt)
- var oobn int
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- if n, oobn, _, src, err = c.ReadMsgUDP(b, oob); err != nil {
- return 0, nil, nil, err
- }
- case *net.IPConn:
- if sockOpts[ssoStripHeader].name > 0 {
- if n, oobn, _, src, err = c.ReadMsgIP(b, oob); err != nil {
- return 0, nil, nil, err
- }
- } else {
- nb := make([]byte, maxHeaderLen+len(b))
- if n, oobn, _, src, err = c.ReadMsgIP(nb, oob); err != nil {
- return 0, nil, nil, err
- }
- hdrlen := int(nb[0]&0x0f) << 2
- copy(b, nb[hdrlen:])
- n -= hdrlen
- }
- default:
- return 0, nil, nil, errInvalidConnType
- }
- if cm, err = parseControlMessage(oob[:oobn]); err != nil {
- return 0, nil, nil, err
- }
- if cm != nil {
- cm.Src = netAddrToIP4(src)
- }
- return
+ return c.readFrom(b)
}
// WriteTo writes a payload of the IPv4 datagram, to the destination
@@ -62,20 +32,5 @@ func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n
if !c.ok() {
return 0, syscall.EINVAL
}
- oob := marshalControlMessage(cm)
- if dst == nil {
- return 0, errMissingAddress
- }
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr))
- case *net.IPConn:
- n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr))
- default:
- return 0, errInvalidConnType
- }
- if err != nil {
- return 0, err
- }
- return
+ return c.writeTo(b, cm, dst)
}
diff --git a/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go
new file mode 100644
index 000000000..d26ccd90c
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_8.go
@@ -0,0 +1,59 @@
+// Copyright 2012 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.9
+// +build !nacl,!plan9,!windows
+
+package ipv4
+
+import "net"
+
+func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
+ c.rawOpt.RLock()
+ oob := NewControlMessage(c.rawOpt.cflags)
+ c.rawOpt.RUnlock()
+ var nn int
+ switch c := c.PacketConn.(type) {
+ case *net.UDPConn:
+ if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil {
+ return 0, nil, nil, err
+ }
+ case *net.IPConn:
+ nb := make([]byte, maxHeaderLen+len(b))
+ if n, nn, _, src, err = c.ReadMsgIP(nb, oob); err != nil {
+ return 0, nil, nil, err
+ }
+ hdrlen := int(nb[0]&0x0f) << 2
+ copy(b, nb[hdrlen:])
+ n -= hdrlen
+ default:
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType}
+ }
+ if nn > 0 {
+ cm = new(ControlMessage)
+ if err = cm.Parse(oob[:nn]); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ }
+ if cm != nil {
+ cm.Src = netAddrToIP4(src)
+ }
+ return
+}
+
+func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
+ oob := cm.Marshal()
+ if dst == nil {
+ return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress}
+ }
+ switch c := c.PacketConn.(type) {
+ case *net.UDPConn:
+ n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr))
+ case *net.IPConn:
+ n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr))
+ default:
+ return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType}
+ }
+ return
+}
diff --git a/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go
new file mode 100644
index 000000000..2f1931183
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/payload_cmsg_go1_9.go
@@ -0,0 +1,67 @@
+// Copyright 2017 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.9
+// +build !nacl,!plan9,!windows
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) {
+ c.rawOpt.RLock()
+ m := socket.Message{
+ OOB: NewControlMessage(c.rawOpt.cflags),
+ }
+ c.rawOpt.RUnlock()
+ switch c.PacketConn.(type) {
+ case *net.UDPConn:
+ m.Buffers = [][]byte{b}
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ case *net.IPConn:
+ h := make([]byte, HeaderLen)
+ m.Buffers = [][]byte{h, b}
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ hdrlen := int(h[0]&0x0f) << 2
+ if hdrlen > len(h) {
+ d := hdrlen - len(h)
+ copy(b, b[d:])
+ m.N -= d
+ } else {
+ m.N -= hdrlen
+ }
+ default:
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType}
+ }
+ var cm *ControlMessage
+ if m.NN > 0 {
+ cm = new(ControlMessage)
+ if err := cm.Parse(m.OOB[:m.NN]); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ cm.Src = netAddrToIP4(m.Addr)
+ }
+ return m.N, cm, m.Addr, nil
+}
+
+func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) {
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: cm.Marshal(),
+ Addr: dst,
+ }
+ err := c.SendMsg(&m, 0)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err}
+ }
+ return m.N, err
+}
diff --git a/vendor/golang.org/x/net/ipv4/payload_nocmsg.go b/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
index 6f9d5b0ef..3926de70b 100644
--- a/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
+++ b/vendor/golang.org/x/net/ipv4/payload_nocmsg.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build plan9 windows
+// +build nacl plan9 windows
package ipv4
diff --git a/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go b/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go
new file mode 100644
index 000000000..1cd926e7f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/readwrite_go1_8_test.go
@@ -0,0 +1,248 @@
+// Copyright 2012 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.9
+
+package ipv4_test
+
+import (
+ "bytes"
+ "fmt"
+ "net"
+ "runtime"
+ "strings"
+ "sync"
+ "testing"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/nettest"
+ "golang.org/x/net/ipv4"
+)
+
+func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ b.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph, err := (&ipv4.Header{
+ Version: ipv4.Version,
+ Len: ipv4.HeaderLen,
+ TotalLen: ipv4.HeaderLen + len(payload),
+ TTL: 1,
+ Protocol: iana.ProtocolReserved,
+ Src: net.IPv4(192, 0, 2, 1),
+ Dst: net.IPv4(192, 0, 2, 254),
+ }).Marshal()
+ if err != nil {
+ b.Fatal(err)
+ }
+ greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+ bb := make([]byte, 128)
+ cm := ipv4.ControlMessage{
+ Src: net.IPv4(127, 0, 0, 1),
+ }
+ if ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+
+ b.Run("UDP", func(b *testing.B) {
+ c, err := nettest.NewLocalPacketListener("udp4")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv4.FlagTTL | ipv4.FlagInterface
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(payload, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(payload, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+ b.Run("IP", func(b *testing.B) {
+ switch runtime.GOOS {
+ case "netbsd":
+ b.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ b.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv4.FlagTTL | ipv4.FlagInterface
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(datagram, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+}
+
+func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph, err := (&ipv4.Header{
+ Version: ipv4.Version,
+ Len: ipv4.HeaderLen,
+ TotalLen: ipv4.HeaderLen + len(payload),
+ TTL: 1,
+ Protocol: iana.ProtocolReserved,
+ Src: net.IPv4(192, 0, 2, 1),
+ Dst: net.IPv4(192, 0, 2, 254),
+ }).Marshal()
+ if err != nil {
+ t.Fatal(err)
+ }
+ greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+
+ t.Run("UDP", func(t *testing.T) {
+ c, err := nettest.NewLocalPacketListener("udp4")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr())
+ })
+ })
+ t.Run("IP", func(t *testing.T) {
+ switch runtime.GOOS {
+ case "netbsd":
+ t.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ t.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr())
+ })
+ })
+}
+
+func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv4.PacketConn, data []byte, dst net.Addr) {
+ ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
+ cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface
+
+ if err := p.SetControlMessage(cf, true); err != nil { // probe before test
+ if nettest.ProtocolNotSupported(err) {
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+ t.Fatal(err)
+ }
+
+ var wg sync.WaitGroup
+ reader := func() {
+ defer wg.Done()
+ b := make([]byte, 128)
+ n, cm, _, err := p.ReadFrom(b)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if !bytes.Equal(b[:n], data) {
+ t.Errorf("got %#v; want %#v", b[:n], data)
+ return
+ }
+ s := cm.String()
+ if strings.Contains(s, ",") {
+ t.Errorf("should be space-separated values: %s", s)
+ return
+ }
+ }
+ writer := func(toggle bool) {
+ defer wg.Done()
+ cm := ipv4.ControlMessage{
+ Src: net.IPv4(127, 0, 0, 1),
+ }
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+ if err := p.SetControlMessage(cf, toggle); err != nil {
+ t.Error(err)
+ return
+ }
+ n, err := p.WriteTo(data, &cm, dst)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(data) {
+ t.Errorf("got %d; want %d", n, len(data))
+ return
+ }
+ }
+
+ const N = 10
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ go reader()
+ }
+ wg.Add(2 * N)
+ for i := 0; i < 2*N; i++ {
+ go writer(i%2 != 0)
+
+ }
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ go reader()
+ }
+ wg.Wait()
+}
diff --git a/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go b/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go
new file mode 100644
index 000000000..365de022a
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/readwrite_go1_9_test.go
@@ -0,0 +1,388 @@
+// Copyright 2017 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.9
+
+package ipv4_test
+
+import (
+ "bytes"
+ "fmt"
+ "net"
+ "runtime"
+ "strings"
+ "sync"
+ "testing"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/nettest"
+ "golang.org/x/net/ipv4"
+)
+
+func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ b.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph, err := (&ipv4.Header{
+ Version: ipv4.Version,
+ Len: ipv4.HeaderLen,
+ TotalLen: ipv4.HeaderLen + len(payload),
+ TTL: 1,
+ Protocol: iana.ProtocolReserved,
+ Src: net.IPv4(192, 0, 2, 1),
+ Dst: net.IPv4(192, 0, 2, 254),
+ }).Marshal()
+ if err != nil {
+ b.Fatal(err)
+ }
+ greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+ bb := make([]byte, 128)
+ cm := ipv4.ControlMessage{
+ Src: net.IPv4(127, 0, 0, 1),
+ }
+ if ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback); ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+
+ b.Run("UDP", func(b *testing.B) {
+ c, err := nettest.NewLocalPacketListener("udp4")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv4.FlagTTL | ipv4.FlagInterface
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ wms := []ipv4.Message{
+ {
+ Buffers: [][]byte{payload},
+ Addr: dst,
+ OOB: cm.Marshal(),
+ },
+ }
+ rms := []ipv4.Message{
+ {
+ Buffers: [][]byte{bb},
+ OOB: ipv4.NewControlMessage(cf),
+ },
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(payload, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(payload, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("Batch", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteBatch(wms, 0); err != nil {
+ b.Fatal(err)
+ }
+ if _, err := p.ReadBatch(rms, 0); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+ b.Run("IP", func(b *testing.B) {
+ switch runtime.GOOS {
+ case "netbsd":
+ b.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ b.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv4.FlagTTL | ipv4.FlagInterface
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ wms := []ipv4.Message{
+ {
+ Buffers: [][]byte{datagram},
+ Addr: dst,
+ OOB: cm.Marshal(),
+ },
+ }
+ rms := []ipv4.Message{
+ {
+ Buffers: [][]byte{bb},
+ OOB: ipv4.NewControlMessage(cf),
+ },
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(datagram, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("Batch", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteBatch(wms, 0); err != nil {
+ b.Fatal(err)
+ }
+ if _, err := p.ReadBatch(rms, 0); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+}
+
+func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph, err := (&ipv4.Header{
+ Version: ipv4.Version,
+ Len: ipv4.HeaderLen,
+ TotalLen: ipv4.HeaderLen + len(payload),
+ TTL: 1,
+ Protocol: iana.ProtocolReserved,
+ Src: net.IPv4(192, 0, 2, 1),
+ Dst: net.IPv4(192, 0, 2, 254),
+ }).Marshal()
+ if err != nil {
+ t.Fatal(err)
+ }
+ greh := []byte{0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+
+ t.Run("UDP", func(t *testing.T) {
+ c, err := nettest.NewLocalPacketListener("udp4")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), false)
+ })
+ t.Run("Batch", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), true)
+ })
+ })
+ t.Run("IP", func(t *testing.T) {
+ switch runtime.GOOS {
+ case "netbsd":
+ t.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ t.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip4:%d", iana.ProtocolGRE), "127.0.0.1")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv4.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), false)
+ })
+ t.Run("Batch", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), true)
+ })
+ })
+}
+
+func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv4.PacketConn, data []byte, dst net.Addr, batch bool) {
+ ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
+ cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface
+
+ if err := p.SetControlMessage(cf, true); err != nil { // probe before test
+ if nettest.ProtocolNotSupported(err) {
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+ t.Fatal(err)
+ }
+
+ var wg sync.WaitGroup
+ reader := func() {
+ defer wg.Done()
+ b := make([]byte, 128)
+ n, cm, _, err := p.ReadFrom(b)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if !bytes.Equal(b[:n], data) {
+ t.Errorf("got %#v; want %#v", b[:n], data)
+ return
+ }
+ s := cm.String()
+ if strings.Contains(s, ",") {
+ t.Errorf("should be space-separated values: %s", s)
+ return
+ }
+ }
+ batchReader := func() {
+ defer wg.Done()
+ ms := []ipv4.Message{
+ {
+ Buffers: [][]byte{make([]byte, 128)},
+ OOB: ipv4.NewControlMessage(cf),
+ },
+ }
+ n, err := p.ReadBatch(ms, 0)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(ms) {
+ t.Errorf("got %d; want %d", n, len(ms))
+ return
+ }
+ var cm ipv4.ControlMessage
+ if err := cm.Parse(ms[0].OOB[:ms[0].NN]); err != nil {
+ t.Error(err)
+ return
+ }
+ var b []byte
+ if _, ok := dst.(*net.IPAddr); ok {
+ var h ipv4.Header
+ if err := h.Parse(ms[0].Buffers[0][:ms[0].N]); err != nil {
+ t.Error(err)
+ return
+ }
+ b = ms[0].Buffers[0][h.Len:ms[0].N]
+ } else {
+ b = ms[0].Buffers[0][:ms[0].N]
+ }
+ if !bytes.Equal(b, data) {
+ t.Errorf("got %#v; want %#v", b, data)
+ return
+ }
+ s := cm.String()
+ if strings.Contains(s, ",") {
+ t.Errorf("should be space-separated values: %s", s)
+ return
+ }
+ }
+ writer := func(toggle bool) {
+ defer wg.Done()
+ cm := ipv4.ControlMessage{
+ Src: net.IPv4(127, 0, 0, 1),
+ }
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+ if err := p.SetControlMessage(cf, toggle); err != nil {
+ t.Error(err)
+ return
+ }
+ n, err := p.WriteTo(data, &cm, dst)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(data) {
+ t.Errorf("got %d; want %d", n, len(data))
+ return
+ }
+ }
+ batchWriter := func(toggle bool) {
+ defer wg.Done()
+ cm := ipv4.ControlMessage{
+ Src: net.IPv4(127, 0, 0, 1),
+ }
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+ if err := p.SetControlMessage(cf, toggle); err != nil {
+ t.Error(err)
+ return
+ }
+ ms := []ipv4.Message{
+ {
+ Buffers: [][]byte{data},
+ OOB: cm.Marshal(),
+ Addr: dst,
+ },
+ }
+ n, err := p.WriteBatch(ms, 0)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(ms) {
+ t.Errorf("got %d; want %d", n, len(ms))
+ return
+ }
+ if ms[0].N != len(data) {
+ t.Errorf("got %d; want %d", ms[0].N, len(data))
+ return
+ }
+ }
+
+ const N = 10
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ if batch {
+ go batchReader()
+ } else {
+ go reader()
+ }
+ }
+ wg.Add(2 * N)
+ for i := 0; i < 2*N; i++ {
+ if batch {
+ go batchWriter(i%2 != 0)
+ } else {
+ go writer(i%2 != 0)
+ }
+
+ }
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ if batch {
+ go batchReader()
+ } else {
+ go reader()
+ }
+ }
+ wg.Wait()
+}
diff --git a/vendor/golang.org/x/net/ipv4/readwrite_test.go b/vendor/golang.org/x/net/ipv4/readwrite_test.go
index a2384b8f9..3896a8ae4 100644
--- a/vendor/golang.org/x/net/ipv4/readwrite_test.go
+++ b/vendor/golang.org/x/net/ipv4/readwrite_test.go
@@ -16,77 +16,47 @@ import (
"golang.org/x/net/ipv4"
)
-func benchmarkUDPListener() (net.PacketConn, net.Addr, error) {
- c, err := net.ListenPacket("udp4", "127.0.0.1:0")
+func BenchmarkReadWriteUnicast(b *testing.B) {
+ c, err := nettest.NewLocalPacketListener("udp4")
if err != nil {
- return nil, nil, err
- }
- dst, err := net.ResolveUDPAddr("udp4", c.LocalAddr().String())
- if err != nil {
- c.Close()
- return nil, nil, err
- }
- return c, dst, nil
-}
-
-func BenchmarkReadWriteNetUDP(b *testing.B) {
- c, dst, err := benchmarkUDPListener()
- if err != nil {
- b.Fatal(err)
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
}
defer c.Close()
+ dst := c.LocalAddr()
wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- benchmarkReadWriteNetUDP(b, c, wb, rb, dst)
- }
-}
-func benchmarkReadWriteNetUDP(b *testing.B, c net.PacketConn, wb, rb []byte, dst net.Addr) {
- if _, err := c.WriteTo(wb, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
-}
+ b.Run("NetUDP", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(wb, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(rb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("IPv4UDP", func(b *testing.B) {
+ p := ipv4.NewPacketConn(c)
+ cf := ipv4.FlagTTL | ipv4.FlagInterface
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ cm := ipv4.ControlMessage{TTL: 1}
+ ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
-func BenchmarkReadWriteIPv4UDP(b *testing.B) {
- c, dst, err := benchmarkUDPListener()
- if err != nil {
- b.Fatal(err)
- }
- defer c.Close()
-
- p := ipv4.NewPacketConn(c)
- defer p.Close()
- cf := ipv4.FlagTTL | ipv4.FlagInterface
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
-
- wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- benchmarkReadWriteIPv4UDP(b, p, wb, rb, dst, ifi)
- }
-}
-
-func benchmarkReadWriteIPv4UDP(b *testing.B, p *ipv4.PacketConn, wb, rb []byte, dst net.Addr, ifi *net.Interface) {
- cm := ipv4.ControlMessage{TTL: 1}
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if n, err := p.WriteTo(wb, &cm, dst); err != nil {
- b.Fatal(err)
- } else if n != len(wb) {
- b.Fatalf("got %v; want %v", n, len(wb))
- }
- if _, _, _, err := p.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(wb, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(rb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
}
func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
@@ -95,7 +65,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
t.Skipf("not supported on %s", runtime.GOOS)
}
- c, err := net.ListenPacket("udp4", "127.0.0.1:0")
+ c, err := nettest.NewLocalPacketListener("udp4")
if err != nil {
t.Fatal(err)
}
@@ -103,11 +73,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
p := ipv4.NewPacketConn(c)
defer p.Close()
- dst, err := net.ResolveUDPAddr("udp4", c.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
-
+ dst := c.LocalAddr()
ifi := nettest.RoutedInterface("ip4", net.FlagUp|net.FlagLoopback)
cf := ipv4.FlagTTL | ipv4.FlagSrc | ipv4.FlagDst | ipv4.FlagInterface
wb := []byte("HELLO-R-U-THERE")
@@ -152,7 +118,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
t.Error(err)
return
} else if n != len(wb) {
- t.Errorf("short write: %v", n)
+ t.Errorf("got %d; want %d", n, len(wb))
return
}
}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt.go b/vendor/golang.org/x/net/ipv4/sockopt.go
index ace37d30f..22e90c039 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt.go
+++ b/vendor/golang.org/x/net/ipv4/sockopt.go
@@ -4,6 +4,8 @@
package ipv4
+import "golang.org/x/net/internal/socket"
+
// Sticky socket options
const (
ssoTOS = iota // header field for unicast packet
@@ -24,16 +26,12 @@ const (
ssoLeaveSourceGroup // source-specific multicast
ssoBlockSourceGroup // any-source or source-specific multicast
ssoUnblockSourceGroup // any-source or source-specific multicast
- ssoMax
+ ssoAttachFilter // attach BPF for filtering inbound traffic
)
// Sticky socket option value types
const (
- ssoTypeByte = iota + 1
- ssoTypeInt
- ssoTypeInterface
- ssoTypeICMPFilter
- ssoTypeIPMreq
+ ssoTypeIPMreq = iota + 1
ssoTypeIPMreqn
ssoTypeGroupReq
ssoTypeGroupSourceReq
@@ -41,6 +39,6 @@ const (
// A sockOpt represents a binding for sticky socket option.
type sockOpt struct {
- name int // option name, must be equal or greater than 1
- typ int // option value type, must be equal or greater than 1
+ socket.Option
+ typ int // hint for option value type; optional
}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_posix.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_posix.go
deleted file mode 100644
index 2259a3903..000000000
--- a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_posix.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright 2012 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 darwin dragonfly freebsd netbsd openbsd solaris windows
-
-package ipv4
-
-import (
- "net"
- "os"
- "unsafe"
-
- "golang.org/x/net/internal/iana"
-)
-
-func setsockoptIPMreq(s uintptr, name int, ifi *net.Interface, grp net.IP) error {
- mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}}
- if err := setIPMreqInterface(&mreq, ifi); err != nil {
- return err
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, iana.ProtocolIP, name, unsafe.Pointer(&mreq), sizeofIPMreq))
-}
-
-func getsockoptInterface(s uintptr, name int) (*net.Interface, error) {
- var b [4]byte
- l := uint32(4)
- if err := getsockopt(s, iana.ProtocolIP, name, unsafe.Pointer(&b[0]), &l); err != nil {
- return nil, os.NewSyscallError("getsockopt", err)
- }
- ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3]))
- if err != nil {
- return nil, err
- }
- return ifi, nil
-}
-
-func setsockoptInterface(s uintptr, name int, ifi *net.Interface) error {
- ip, err := netInterfaceToIP4(ifi)
- if err != nil {
- return err
- }
- var b [4]byte
- copy(b[:], ip)
- return os.NewSyscallError("setsockopt", setsockopt(s, iana.ProtocolIP, name, unsafe.Pointer(&b[0]), uint32(4)))
-}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_stub.go b/vendor/golang.org/x/net/ipv4/sockopt_asmreq_stub.go
deleted file mode 100644
index e655635ec..000000000
--- a/vendor/golang.org/x/net/ipv4/sockopt_asmreq_stub.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright 2012 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 !darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows
-
-package ipv4
-
-import "net"
-
-func setsockoptIPMreq(s uintptr, name int, ifi *net.Interface, grp net.IP) error {
- return errOpNoSupport
-}
-
-func getsockoptInterface(s uintptr, name int) (*net.Interface, error) {
- return nil, errOpNoSupport
-}
-
-func setsockoptInterface(s uintptr, name int, ifi *net.Interface) error {
- return errOpNoSupport
-}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_posix.go b/vendor/golang.org/x/net/ipv4/sockopt_posix.go
index d80680373..e96955bc1 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt_posix.go
+++ b/vendor/golang.org/x/net/ipv4/sockopt_posix.go
@@ -8,115 +8,64 @@ package ipv4
import (
"net"
- "os"
"unsafe"
- "golang.org/x/net/internal/iana"
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
)
-func getInt(s uintptr, opt *sockOpt) (int, error) {
- if opt.name < 1 || (opt.typ != ssoTypeByte && opt.typ != ssoTypeInt) {
- return 0, errOpNoSupport
- }
- var i int32
- var b byte
- p := unsafe.Pointer(&i)
- l := uint32(4)
- if opt.typ == ssoTypeByte {
- p = unsafe.Pointer(&b)
- l = 1
- }
- if err := getsockopt(s, iana.ProtocolIP, opt.name, p, &l); err != nil {
- return 0, os.NewSyscallError("getsockopt", err)
- }
- if opt.typ == ssoTypeByte {
- return int(b), nil
- }
- return int(i), nil
-}
-
-func setInt(s uintptr, opt *sockOpt, v int) error {
- if opt.name < 1 || (opt.typ != ssoTypeByte && opt.typ != ssoTypeInt) {
- return errOpNoSupport
- }
- i := int32(v)
- var b byte
- p := unsafe.Pointer(&i)
- l := uint32(4)
- if opt.typ == ssoTypeByte {
- b = byte(v)
- p = unsafe.Pointer(&b)
- l = 1
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, iana.ProtocolIP, opt.name, p, l))
-}
-
-func getInterface(s uintptr, opt *sockOpt) (*net.Interface, error) {
- if opt.name < 1 {
- return nil, errOpNoSupport
- }
- switch opt.typ {
- case ssoTypeInterface:
- return getsockoptInterface(s, opt.name)
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ switch so.typ {
case ssoTypeIPMreqn:
- return getsockoptIPMreqn(s, opt.name)
+ return so.getIPMreqn(c)
default:
- return nil, errOpNoSupport
+ return so.getMulticastIf(c)
}
}
-func setInterface(s uintptr, opt *sockOpt, ifi *net.Interface) error {
- if opt.name < 1 {
- return errOpNoSupport
- }
- switch opt.typ {
- case ssoTypeInterface:
- return setsockoptInterface(s, opt.name, ifi)
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ switch so.typ {
case ssoTypeIPMreqn:
- return setsockoptIPMreqn(s, opt.name, ifi, nil)
+ return so.setIPMreqn(c, ifi, nil)
default:
- return errOpNoSupport
+ return so.setMulticastIf(c, ifi)
}
}
-func getICMPFilter(s uintptr, opt *sockOpt) (*ICMPFilter, error) {
- if opt.name < 1 || opt.typ != ssoTypeICMPFilter {
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ b := make([]byte, so.Len)
+ n, err := so.Get(c, b)
+ if err != nil {
+ return nil, err
+ }
+ if n != sizeofICMPFilter {
return nil, errOpNoSupport
}
- var f ICMPFilter
- l := uint32(sizeofICMPFilter)
- if err := getsockopt(s, iana.ProtocolReserved, opt.name, unsafe.Pointer(&f.icmpFilter), &l); err != nil {
- return nil, os.NewSyscallError("getsockopt", err)
- }
- return &f, nil
+ return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil
}
-func setICMPFilter(s uintptr, opt *sockOpt, f *ICMPFilter) error {
- if opt.name < 1 || opt.typ != ssoTypeICMPFilter {
- return errOpNoSupport
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, iana.ProtocolReserved, opt.name, unsafe.Pointer(&f.icmpFilter), sizeofICMPFilter))
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ b := (*[sizeofICMPFilter]byte)(unsafe.Pointer(f))[:sizeofICMPFilter]
+ return so.Set(c, b)
}
-func setGroup(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
- if opt.name < 1 {
- return errOpNoSupport
- }
- switch opt.typ {
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ switch so.typ {
case ssoTypeIPMreq:
- return setsockoptIPMreq(s, opt.name, ifi, grp)
+ return so.setIPMreq(c, ifi, grp)
case ssoTypeIPMreqn:
- return setsockoptIPMreqn(s, opt.name, ifi, grp)
+ return so.setIPMreqn(c, ifi, grp)
case ssoTypeGroupReq:
- return setsockoptGroupReq(s, opt.name, ifi, grp)
+ return so.setGroupReq(c, ifi, grp)
default:
return errOpNoSupport
}
}
-func setSourceGroup(s uintptr, opt *sockOpt, ifi *net.Interface, grp, src net.IP) error {
- if opt.name < 1 || opt.typ != ssoTypeGroupSourceReq {
- return errOpNoSupport
- }
- return setsockoptGroupSourceReq(s, opt.name, ifi, grp, src)
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return so.setGroupSourceReq(c, ifi, grp, src)
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
+ return so.setAttachFilter(c, f)
}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_stub.go b/vendor/golang.org/x/net/ipv4/sockopt_stub.go
index 4ff609917..23249b782 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt_stub.go
+++ b/vendor/golang.org/x/net/ipv4/sockopt_stub.go
@@ -2,10 +2,41 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build nacl plan9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv4
-func setInt(s uintptr, opt *sockOpt, v int) error {
+import (
+ "net"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ return nil, errOpNoSupport
+}
+
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ return nil, errOpNoSupport
+}
+
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
return errOpNoSupport
}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreq.go b/vendor/golang.org/x/net/ipv4/sys_asmreq.go
similarity index 65%
rename from vendor/golang.org/x/net/ipv4/sockopt_asmreq.go
rename to vendor/golang.org/x/net/ipv4/sys_asmreq.go
index 8092f1db0..0388cba00 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt_asmreq.go
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreq.go
@@ -6,7 +6,43 @@
package ipv4
-import "net"
+import (
+ "net"
+ "unsafe"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ mreq := ipMreq{Multiaddr: [4]byte{grp[0], grp[1], grp[2], grp[3]}}
+ if err := setIPMreqInterface(&mreq, ifi); err != nil {
+ return err
+ }
+ b := (*[sizeofIPMreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPMreq]
+ return so.Set(c, b)
+}
+
+func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) {
+ var b [4]byte
+ if _, err := so.Get(c, b[:]); err != nil {
+ return nil, err
+ }
+ ifi, err := netIP4ToInterface(net.IPv4(b[0], b[1], b[2], b[3]))
+ if err != nil {
+ return nil, err
+ }
+ return ifi, nil
+}
+
+func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error {
+ ip, err := netInterfaceToIP4(ifi)
+ if err != nil {
+ return err
+ }
+ var b [4]byte
+ copy(b[:], ip)
+ return so.Set(c, b[:])
+}
func setIPMreqInterface(mreq *ipMreq, ifi *net.Interface) error {
if ifi == nil {
diff --git a/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go b/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
new file mode 100644
index 000000000..f3919208b
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreq_stub.go
@@ -0,0 +1,25 @@
+// Copyright 2017 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 !darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!windows
+
+package ipv4
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) getMulticastIf(c *socket.Conn) (*net.Interface, error) {
+ return nil, errOpNoSupport
+}
+
+func (so *sockOpt) setMulticastIf(c *socket.Conn, ifi *net.Interface) error {
+ return errOpNoSupport
+}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go b/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
similarity index 52%
rename from vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go
rename to vendor/golang.org/x/net/ipv4/sys_asmreqn.go
index 92daffb0d..1f24f69f3 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_unix.go
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreqn.go
@@ -8,18 +8,17 @@ package ipv4
import (
"net"
- "os"
"unsafe"
- "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
-func getsockoptIPMreqn(s uintptr, name int) (*net.Interface, error) {
- var mreqn ipMreqn
- l := uint32(sizeofIPMreqn)
- if err := getsockopt(s, iana.ProtocolIP, name, unsafe.Pointer(&mreqn), &l); err != nil {
- return nil, os.NewSyscallError("getsockopt", err)
+func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
+ b := make([]byte, so.Len)
+ if _, err := so.Get(c, b); err != nil {
+ return nil, err
}
+ mreqn := (*ipMreqn)(unsafe.Pointer(&b[0]))
if mreqn.Ifindex == 0 {
return nil, nil
}
@@ -30,7 +29,7 @@ func getsockoptIPMreqn(s uintptr, name int) (*net.Interface, error) {
return ifi, nil
}
-func setsockoptIPMreqn(s uintptr, name int, ifi *net.Interface, grp net.IP) error {
+func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
var mreqn ipMreqn
if ifi != nil {
mreqn.Ifindex = int32(ifi.Index)
@@ -38,5 +37,6 @@ func setsockoptIPMreqn(s uintptr, name int, ifi *net.Interface, grp net.IP) erro
if grp != nil {
mreqn.Multiaddr = [4]byte{grp[0], grp[1], grp[2], grp[3]}
}
- return os.NewSyscallError("setsockopt", setsockopt(s, iana.ProtocolIP, name, unsafe.Pointer(&mreqn), sizeofIPMreqn))
+ b := (*[sizeofIPMreqn]byte)(unsafe.Pointer(&mreqn))[:sizeofIPMreqn]
+ return so.Set(c, b)
}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go b/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
similarity index 55%
rename from vendor/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go
rename to vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
index 0c7f0f816..0711d3d78 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt_asmreqn_stub.go
+++ b/vendor/golang.org/x/net/ipv4/sys_asmreqn_stub.go
@@ -6,12 +6,16 @@
package ipv4
-import "net"
+import (
+ "net"
-func getsockoptIPMreqn(s uintptr, name int) (*net.Interface, error) {
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getIPMreqn(c *socket.Conn) (*net.Interface, error) {
return nil, errOpNoSupport
}
-func setsockoptIPMreqn(s uintptr, name int, ifi *net.Interface, grp net.IP) error {
+func (so *sockOpt) setIPMreqn(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
return errOpNoSupport
}
diff --git a/vendor/golang.org/x/net/ipv4/sys_bpf.go b/vendor/golang.org/x/net/ipv4/sys_bpf.go
new file mode 100644
index 000000000..9f30b7308
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_bpf.go
@@ -0,0 +1,23 @@
+// Copyright 2017 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 linux
+
+package ipv4
+
+import (
+ "unsafe"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ prog := sockFProg{
+ Len: uint16(len(f)),
+ Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
+ }
+ b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go b/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
new file mode 100644
index 000000000..9a2132093
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_bpf_stub.go
@@ -0,0 +1,16 @@
+// Copyright 2017 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 !linux
+
+package ipv4
+
+import (
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ return errOpNoSupport
+}
diff --git a/vendor/golang.org/x/net/ipv4/sys_bsd.go b/vendor/golang.org/x/net/ipv4/sys_bsd.go
index 203033db0..58256dd9d 100644
--- a/vendor/golang.org/x/net/ipv4/sys_bsd.go
+++ b/vendor/golang.org/x/net/ipv4/sys_bsd.go
@@ -2,13 +2,16 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build dragonfly netbsd
+// +build netbsd openbsd
package ipv4
import (
"net"
"syscall"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -18,17 +21,17 @@ var (
ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTOS: {sysIP_TOS, ssoTypeInt},
- ssoTTL: {sysIP_TTL, ssoTypeInt},
- ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte},
- ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt},
- ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt},
- ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt},
- ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt},
- ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq},
- ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq},
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
}
)
diff --git a/vendor/golang.org/x/net/ipv4/sys_darwin.go b/vendor/golang.org/x/net/ipv4/sys_darwin.go
index abfffca87..e8fb19169 100644
--- a/vendor/golang.org/x/net/ipv4/sys_darwin.go
+++ b/vendor/golang.org/x/net/ipv4/sys_darwin.go
@@ -10,6 +10,9 @@ import (
"strings"
"syscall"
"unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -19,19 +22,19 @@ var (
ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTOS: {sysIP_TOS, ssoTypeInt},
- ssoTTL: {sysIP_TTL, ssoTypeInt},
- ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte},
- ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt},
- ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt},
- ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt},
- ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt},
- ssoStripHeader: {sysIP_STRIPHDR, ssoTypeInt},
- ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq},
- ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq},
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
+ ssoStripHeader: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_STRIPHDR, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
}
)
@@ -57,21 +60,14 @@ func init() {
ctlOpts[ctlPacketInfo].length = sizeofInetPktinfo
ctlOpts[ctlPacketInfo].marshal = marshalPacketInfo
ctlOpts[ctlPacketInfo].parse = parsePacketInfo
- sockOpts[ssoPacketInfo].name = sysIP_RECVPKTINFO
- sockOpts[ssoPacketInfo].typ = ssoTypeInt
- sockOpts[ssoMulticastInterface].typ = ssoTypeIPMreqn
- sockOpts[ssoJoinGroup].name = sysMCAST_JOIN_GROUP
- sockOpts[ssoJoinGroup].typ = ssoTypeGroupReq
- sockOpts[ssoLeaveGroup].name = sysMCAST_LEAVE_GROUP
- sockOpts[ssoLeaveGroup].typ = ssoTypeGroupReq
- sockOpts[ssoJoinSourceGroup].name = sysMCAST_JOIN_SOURCE_GROUP
- sockOpts[ssoJoinSourceGroup].typ = ssoTypeGroupSourceReq
- sockOpts[ssoLeaveSourceGroup].name = sysMCAST_LEAVE_SOURCE_GROUP
- sockOpts[ssoLeaveSourceGroup].typ = ssoTypeGroupSourceReq
- sockOpts[ssoBlockSourceGroup].name = sysMCAST_BLOCK_SOURCE
- sockOpts[ssoBlockSourceGroup].typ = ssoTypeGroupSourceReq
- sockOpts[ssoUnblockSourceGroup].name = sysMCAST_UNBLOCK_SOURCE
- sockOpts[ssoUnblockSourceGroup].typ = ssoTypeGroupSourceReq
+ sockOpts[ssoPacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}}
+ sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn}
+ sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
+ sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
+ sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
+ sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
+ sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
+ sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
}
func (pi *inetPktinfo) setIfindex(i int) {
diff --git a/vendor/golang.org/x/net/ipv4/sys_dragonfly.go b/vendor/golang.org/x/net/ipv4/sys_dragonfly.go
new file mode 100644
index 000000000..859764f33
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv4/sys_dragonfly.go
@@ -0,0 +1,35 @@
+// Copyright 2017 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 ipv4
+
+import (
+ "net"
+ "syscall"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+)
+
+var (
+ ctlOpts = [ctlMax]ctlOpt{
+ ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL},
+ ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
+ ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
+ }
+
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ }
+)
diff --git a/vendor/golang.org/x/net/ipv4/sys_freebsd.go b/vendor/golang.org/x/net/ipv4/sys_freebsd.go
index fceffe98e..b80032454 100644
--- a/vendor/golang.org/x/net/ipv4/sys_freebsd.go
+++ b/vendor/golang.org/x/net/ipv4/sys_freebsd.go
@@ -10,6 +10,9 @@ import (
"strings"
"syscall"
"unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -19,29 +22,29 @@ var (
ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTOS: {sysIP_TOS, ssoTypeInt},
- ssoTTL: {sysIP_TTL, ssoTypeInt},
- ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte},
- ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt},
- ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt},
- ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt},
- ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt},
- ssoJoinGroup: {sysMCAST_JOIN_GROUP, ssoTypeGroupReq},
- ssoLeaveGroup: {sysMCAST_LEAVE_GROUP, ssoTypeGroupReq},
- ssoJoinSourceGroup: {sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq},
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
+ ssoReceiveDst: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVDSTADDR, Len: 4}},
+ ssoReceiveInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVIF, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
}
)
func init() {
freebsdVersion, _ = syscall.SysctlUint32("kern.osreldate")
if freebsdVersion >= 1000000 {
- sockOpts[ssoMulticastInterface].typ = ssoTypeIPMreqn
+ sockOpts[ssoMulticastInterface] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn}
}
if runtime.GOOS == "freebsd" && runtime.GOARCH == "386" {
archs, _ := syscall.Sysctl("kern.supported_archs")
diff --git a/vendor/golang.org/x/net/ipv4/sys_linux.go b/vendor/golang.org/x/net/ipv4/sys_linux.go
index c6c2a5067..60defe132 100644
--- a/vendor/golang.org/x/net/ipv4/sys_linux.go
+++ b/vendor/golang.org/x/net/ipv4/sys_linux.go
@@ -8,6 +8,9 @@ import (
"net"
"syscall"
"unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -16,22 +19,23 @@ var (
ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTOS: {sysIP_TOS, ssoTypeInt},
- ssoTTL: {sysIP_TTL, ssoTypeInt},
- ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeInt},
- ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeIPMreqn},
- ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt},
- ssoPacketInfo: {sysIP_PKTINFO, ssoTypeInt},
- ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt},
- ssoICMPFilter: {sysICMP_FILTER, ssoTypeICMPFilter},
- ssoJoinGroup: {sysMCAST_JOIN_GROUP, ssoTypeGroupReq},
- ssoLeaveGroup: {sysMCAST_LEAVE_GROUP, ssoTypeGroupReq},
- ssoJoinSourceGroup: {sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq},
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: sizeofIPMreqn}, typ: ssoTypeIPMreqn},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
+ ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_PKTINFO, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysICMP_FILTER, Len: sizeofICMPFilter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}},
}
)
diff --git a/vendor/golang.org/x/net/ipv4/sys_openbsd.go b/vendor/golang.org/x/net/ipv4/sys_openbsd.go
deleted file mode 100644
index d78083a28..000000000
--- a/vendor/golang.org/x/net/ipv4/sys_openbsd.go
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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 ipv4
-
-import (
- "net"
- "syscall"
-)
-
-var (
- ctlOpts = [ctlMax]ctlOpt{
- ctlTTL: {sysIP_RECVTTL, 1, marshalTTL, parseTTL},
- ctlDst: {sysIP_RECVDSTADDR, net.IPv4len, marshalDst, parseDst},
- ctlInterface: {sysIP_RECVIF, syscall.SizeofSockaddrDatalink, marshalInterface, parseInterface},
- }
-
- sockOpts = [ssoMax]sockOpt{
- ssoTOS: {sysIP_TOS, ssoTypeInt},
- ssoTTL: {sysIP_TTL, ssoTypeInt},
- ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte},
- ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeByte},
- ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt},
- ssoReceiveDst: {sysIP_RECVDSTADDR, ssoTypeInt},
- ssoReceiveInterface: {sysIP_RECVIF, ssoTypeInt},
- ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt},
- ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq},
- ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq},
- }
-)
diff --git a/vendor/golang.org/x/net/ipv4/sys_solaris.go b/vendor/golang.org/x/net/ipv4/sys_solaris.go
index 879f39e0a..832fef1e2 100644
--- a/vendor/golang.org/x/net/ipv4/sys_solaris.go
+++ b/vendor/golang.org/x/net/ipv4/sys_solaris.go
@@ -8,6 +8,9 @@ import (
"net"
"syscall"
"unsafe"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -16,21 +19,21 @@ var (
ctlPacketInfo: {sysIP_PKTINFO, sizeofInetPktinfo, marshalPacketInfo, parsePacketInfo},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTOS: {sysIP_TOS, ssoTypeInt},
- ssoTTL: {sysIP_TTL, ssoTypeInt},
- ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeByte},
- ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeByte},
- ssoReceiveTTL: {sysIP_RECVTTL, ssoTypeInt},
- ssoPacketInfo: {sysIP_RECVPKTINFO, ssoTypeInt},
- ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt},
- ssoJoinGroup: {sysMCAST_JOIN_GROUP, ssoTypeGroupReq},
- ssoLeaveGroup: {sysMCAST_LEAVE_GROUP, ssoTypeGroupReq},
- ssoJoinSourceGroup: {sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq},
+ sockOpts = map[int]sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 1}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 1}},
+ ssoReceiveTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVTTL, Len: 4}},
+ ssoPacketInfo: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_RECVPKTINFO, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
}
)
diff --git a/vendor/golang.org/x/net/ipv4/sys_solaris_amd64.s b/vendor/golang.org/x/net/ipv4/sys_solaris_amd64.s
deleted file mode 100644
index 39d76af79..000000000
--- a/vendor/golang.org/x/net/ipv4/sys_solaris_amd64.s
+++ /dev/null
@@ -1,8 +0,0 @@
-// 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.
-
-#include "textflag.h"
-
-TEXT ·sysvicall6(SB),NOSPLIT,$0-88
- JMP syscall·sysvicall6(SB)
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go b/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
similarity index 54%
rename from vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go
rename to vendor/golang.org/x/net/ipv4/sys_ssmreq.go
index c9af55b91..ae5704e77 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_unix.go
+++ b/vendor/golang.org/x/net/ipv4/sys_ssmreq.go
@@ -8,54 +8,47 @@ package ipv4
import (
"net"
- "os"
"unsafe"
- "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var freebsd32o64 bool
-func setsockoptGroupReq(s uintptr, name int, ifi *net.Interface, grp net.IP) error {
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
var gr groupReq
if ifi != nil {
gr.Interface = uint32(ifi.Index)
}
gr.setGroup(grp)
- var p unsafe.Pointer
- var l uint32
+ var b []byte
if freebsd32o64 {
var d [sizeofGroupReq + 4]byte
s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
copy(d[:4], s[:4])
copy(d[8:], s[4:])
- p = unsafe.Pointer(&d[0])
- l = sizeofGroupReq + 4
+ b = d[:]
} else {
- p = unsafe.Pointer(&gr)
- l = sizeofGroupReq
+ b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq]
}
- return os.NewSyscallError("setsockopt", setsockopt(s, iana.ProtocolIP, name, p, l))
+ return so.Set(c, b)
}
-func setsockoptGroupSourceReq(s uintptr, name int, ifi *net.Interface, grp, src net.IP) error {
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
var gsr groupSourceReq
if ifi != nil {
gsr.Interface = uint32(ifi.Index)
}
gsr.setSourceGroup(grp, src)
- var p unsafe.Pointer
- var l uint32
+ var b []byte
if freebsd32o64 {
var d [sizeofGroupSourceReq + 4]byte
s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
copy(d[:4], s[:4])
copy(d[8:], s[4:])
- p = unsafe.Pointer(&d[0])
- l = sizeofGroupSourceReq + 4
+ b = d[:]
} else {
- p = unsafe.Pointer(&gsr)
- l = sizeofGroupSourceReq
+ b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq]
}
- return os.NewSyscallError("setsockopt", setsockopt(s, iana.ProtocolIP, name, p, l))
+ return so.Set(c, b)
}
diff --git a/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go b/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
similarity index 52%
rename from vendor/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go
rename to vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
index 02873962e..e6b7623d0 100644
--- a/vendor/golang.org/x/net/ipv4/sockopt_ssmreq_stub.go
+++ b/vendor/golang.org/x/net/ipv4/sys_ssmreq_stub.go
@@ -6,12 +6,16 @@
package ipv4
-import "net"
+import (
+ "net"
-func setsockoptGroupReq(s uintptr, name int, ifi *net.Interface, grp net.IP) error {
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
return errOpNoSupport
}
-func setsockoptGroupSourceReq(s uintptr, name int, ifi *net.Interface, grp, src net.IP) error {
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
return errOpNoSupport
}
diff --git a/vendor/golang.org/x/net/ipv4/sys_stub.go b/vendor/golang.org/x/net/ipv4/sys_stub.go
index d6dd812fd..4f076473b 100644
--- a/vendor/golang.org/x/net/ipv4/sys_stub.go
+++ b/vendor/golang.org/x/net/ipv4/sys_stub.go
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build nacl plan9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv4
var (
ctlOpts = [ctlMax]ctlOpt{}
- sockOpts = [ssoMax]sockOpt{}
+ sockOpts = map[int]*sockOpt{}
)
diff --git a/vendor/golang.org/x/net/ipv4/sys_windows.go b/vendor/golang.org/x/net/ipv4/sys_windows.go
index fac00bda8..b0913d539 100644
--- a/vendor/golang.org/x/net/ipv4/sys_windows.go
+++ b/vendor/golang.org/x/net/ipv4/sys_windows.go
@@ -4,6 +4,11 @@
package ipv4
+import (
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
+)
+
const (
// See ws2tcpip.h.
sysIP_OPTIONS = 0x1
@@ -45,15 +50,15 @@ type ipMreqSource struct {
var (
ctlOpts = [ctlMax]ctlOpt{}
- sockOpts = [ssoMax]sockOpt{
- ssoTOS: {sysIP_TOS, ssoTypeInt},
- ssoTTL: {sysIP_TTL, ssoTypeInt},
- ssoMulticastTTL: {sysIP_MULTICAST_TTL, ssoTypeInt},
- ssoMulticastInterface: {sysIP_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastLoopback: {sysIP_MULTICAST_LOOP, ssoTypeInt},
- ssoHeaderPrepend: {sysIP_HDRINCL, ssoTypeInt},
- ssoJoinGroup: {sysIP_ADD_MEMBERSHIP, ssoTypeIPMreq},
- ssoLeaveGroup: {sysIP_DROP_MEMBERSHIP, ssoTypeIPMreq},
+ sockOpts = map[int]*sockOpt{
+ ssoTOS: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TOS, Len: 4}},
+ ssoTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_TTL, Len: 4}},
+ ssoMulticastTTL: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_TTL, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_IF, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_MULTICAST_LOOP, Len: 4}},
+ ssoHeaderPrepend: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_HDRINCL, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_ADD_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIP, Name: sysIP_DROP_MEMBERSHIP, Len: sizeofIPMreq}, typ: ssoTypeIPMreq},
}
)
diff --git a/vendor/golang.org/x/net/ipv4/syscall_linux_386.go b/vendor/golang.org/x/net/ipv4/syscall_linux_386.go
deleted file mode 100644
index 84f60bfb2..000000000
--- a/vendor/golang.org/x/net/ipv4/syscall_linux_386.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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 ipv4
-
-import (
- "syscall"
- "unsafe"
-)
-
-const (
- sysGETSOCKOPT = 0xf
- sysSETSOCKOPT = 0xe
-)
-
-func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- if _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- if _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv4/syscall_solaris.go b/vendor/golang.org/x/net/ipv4/syscall_solaris.go
deleted file mode 100644
index 8b0e1e447..000000000
--- a/vendor/golang.org/x/net/ipv4/syscall_solaris.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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 ipv4
-
-import (
- "syscall"
- "unsafe"
-)
-
-//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
-//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
-
-//go:linkname procGetsockopt libc___xnet_getsockopt
-//go:linkname procSetsockopt libc_setsockopt
-
-var (
- procGetsockopt uintptr
- procSetsockopt uintptr
-)
-
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0)
- if errno != 0 {
- return error(errno)
- }
- return nil
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- if _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv4/syscall_unix.go b/vendor/golang.org/x/net/ipv4/syscall_unix.go
deleted file mode 100644
index d952763f5..000000000
--- a/vendor/golang.org/x/net/ipv4/syscall_unix.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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 darwin dragonfly freebsd linux,!386 netbsd openbsd
-
-package ipv4
-
-import (
- "syscall"
- "unsafe"
-)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- if _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- if _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv4/syscall_windows.go b/vendor/golang.org/x/net/ipv4/syscall_windows.go
deleted file mode 100644
index 0f42d22eb..000000000
--- a/vendor/golang.org/x/net/ipv4/syscall_windows.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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 ipv4
-
-import (
- "syscall"
- "unsafe"
-)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- return syscall.Getsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(v), (*int32)(unsafe.Pointer(l)))
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- return syscall.Setsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(v), int32(l))
-}
diff --git a/vendor/golang.org/x/net/ipv4/unicast_test.go b/vendor/golang.org/x/net/ipv4/unicast_test.go
index bce8763f7..02c089f00 100644
--- a/vendor/golang.org/x/net/ipv4/unicast_test.go
+++ b/vendor/golang.org/x/net/ipv4/unicast_test.go
@@ -28,18 +28,15 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
t.Skipf("not available on %s", runtime.GOOS)
}
- c, err := net.ListenPacket("udp4", "127.0.0.1:0")
+ c, err := nettest.NewLocalPacketListener("udp4")
if err != nil {
t.Fatal(err)
}
defer c.Close()
-
- dst, err := net.ResolveUDPAddr("udp4", c.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
p := ipv4.NewPacketConn(c)
defer p.Close()
+
+ dst := c.LocalAddr()
cf := ipv4.FlagTTL | ipv4.FlagDst | ipv4.FlagInterface
wb := []byte("HELLO-R-U-THERE")
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_386.go b/vendor/golang.org/x/net/ipv4/zsys_linux_386.go
index 4da672013..c0260f0ce 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_386.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_386.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
index 65945bbd0..9c967eaa6 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_amd64.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go b/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
index 4da672013..c0260f0ce 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_arm.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
index 65945bbd0..9c967eaa6 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_arm64.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
index 4da672013..c0260f0ce 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mips.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
index 65945bbd0..9c967eaa6 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
index 65945bbd0..9c967eaa6 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mips64le.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go b/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
index 4da672013..c0260f0ce 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_mipsle.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
index b825a18e9..f65bd9a7a 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
index 65945bbd0..9c967eaa6 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
index 65945bbd0..9c967eaa6 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_ppc64le.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go b/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
index 65945bbd0..9c967eaa6 100644
--- a/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
+++ b/vendor/golang.org/x/net/ipv4/zsys_linux_s390x.go
@@ -70,6 +70,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPFilter = 0x4
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/batch.go b/vendor/golang.org/x/net/ipv6/batch.go
new file mode 100644
index 000000000..4f5fe683d
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/batch.go
@@ -0,0 +1,119 @@
+// Copyright 2017 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.9
+
+package ipv6
+
+import (
+ "net"
+ "runtime"
+ "syscall"
+
+ "golang.org/x/net/internal/socket"
+)
+
+// BUG(mikio): On Windows, the ReadBatch and WriteBatch methods of
+// PacketConn are not implemented.
+
+// A Message represents an IO message.
+//
+// type Message struct {
+// Buffers [][]byte
+// OOB []byte
+// Addr net.Addr
+// N int
+// NN int
+// Flags int
+// }
+//
+// The Buffers fields represents a list of contiguous buffers, which
+// can be used for vectored IO, for example, putting a header and a
+// payload in each slice.
+// When writing, the Buffers field must contain at least one byte to
+// write.
+// When reading, the Buffers field will always contain a byte to read.
+//
+// The OOB field contains protocol-specific control or miscellaneous
+// ancillary data known as out-of-band data.
+// It can be nil when not required.
+//
+// The Addr field specifies a destination address when writing.
+// It can be nil when the underlying protocol of the endpoint uses
+// connection-oriented communication.
+// After a successful read, it may contain the source address on the
+// received packet.
+//
+// The N field indicates the number of bytes read or written from/to
+// Buffers.
+//
+// The NN field indicates the number of bytes read or written from/to
+// OOB.
+//
+// The Flags field contains protocol-specific information on the
+// received message.
+type Message = socket.Message
+
+// ReadBatch reads a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_PEEK.
+//
+// On a successful read it returns the number of messages received, up
+// to len(ms).
+//
+// On Linux, a batch read will be optimized.
+// On other platforms, this method will read only a single message.
+func (c *payloadHandler) ReadBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, syscall.EINVAL
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.RecvMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.RecvMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
+
+// WriteBatch writes a batch of messages.
+//
+// The provided flags is a set of platform-dependent flags, such as
+// syscall.MSG_DONTROUTE.
+//
+// It returns the number of messages written on a successful write.
+//
+// On Linux, a batch write will be optimized.
+// On other platforms, this method will write only a single message.
+func (c *payloadHandler) WriteBatch(ms []Message, flags int) (int, error) {
+ if !c.ok() {
+ return 0, syscall.EINVAL
+ }
+ switch runtime.GOOS {
+ case "linux":
+ n, err := c.SendMsgs([]socket.Message(ms), flags)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ default:
+ n := 1
+ err := c.SendMsg(&ms[0], flags)
+ if err != nil {
+ n = 0
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ return n, err
+ }
+}
diff --git a/vendor/golang.org/x/net/ipv6/bpfopt_linux.go b/vendor/golang.org/x/net/ipv6/bpfopt_linux.go
deleted file mode 100644
index daf7ea853..000000000
--- a/vendor/golang.org/x/net/ipv6/bpfopt_linux.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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 ipv6
-
-import (
- "os"
- "unsafe"
-
- "golang.org/x/net/bpf"
- "golang.org/x/net/internal/netreflect"
-)
-
-// SetBPF attaches a BPF program to the connection.
-//
-// Only supported on Linux.
-func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
- }
- prog := sockFProg{
- Len: uint16(len(filter)),
- Filter: (*sockFilter)(unsafe.Pointer(&filter[0])),
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, sysSOL_SOCKET, sysSO_ATTACH_FILTER, unsafe.Pointer(&prog), uint32(unsafe.Sizeof(prog))))
-}
diff --git a/vendor/golang.org/x/net/ipv6/bpfopt_stub.go b/vendor/golang.org/x/net/ipv6/bpfopt_stub.go
deleted file mode 100644
index 2e4de5f0d..000000000
--- a/vendor/golang.org/x/net/ipv6/bpfopt_stub.go
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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 !linux
-
-package ipv6
-
-import "golang.org/x/net/bpf"
-
-// SetBPF attaches a BPF program to the connection.
-//
-// Only supported on Linux.
-func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
- return errOpNoSupport
-}
diff --git a/vendor/golang.org/x/net/ipv6/control.go b/vendor/golang.org/x/net/ipv6/control.go
index 674628d3f..2da644413 100644
--- a/vendor/golang.org/x/net/ipv6/control.go
+++ b/vendor/golang.org/x/net/ipv6/control.go
@@ -8,6 +8,9 @@ import (
"fmt"
"net"
"sync"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
// Note that RFC 3542 obsoletes RFC 2292 but OS X Snow Leopard and the
@@ -66,6 +69,105 @@ func (cm *ControlMessage) String() string {
return fmt.Sprintf("tclass=%#x hoplim=%d src=%v dst=%v ifindex=%d nexthop=%v mtu=%d", cm.TrafficClass, cm.HopLimit, cm.Src, cm.Dst, cm.IfIndex, cm.NextHop, cm.MTU)
}
+// Marshal returns the binary encoding of cm.
+func (cm *ControlMessage) Marshal() []byte {
+ if cm == nil {
+ return nil
+ }
+ var l int
+ tclass := false
+ if ctlOpts[ctlTrafficClass].name > 0 && cm.TrafficClass > 0 {
+ tclass = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length)
+ }
+ hoplimit := false
+ if ctlOpts[ctlHopLimit].name > 0 && cm.HopLimit > 0 {
+ hoplimit = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length)
+ }
+ pktinfo := false
+ if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To16() != nil && cm.Src.To4() == nil || cm.IfIndex > 0) {
+ pktinfo = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
+ }
+ nexthop := false
+ if ctlOpts[ctlNextHop].name > 0 && cm.NextHop.To16() != nil && cm.NextHop.To4() == nil {
+ nexthop = true
+ l += socket.ControlMessageSpace(ctlOpts[ctlNextHop].length)
+ }
+ var b []byte
+ if l > 0 {
+ b = make([]byte, l)
+ bb := b
+ if tclass {
+ bb = ctlOpts[ctlTrafficClass].marshal(bb, cm)
+ }
+ if hoplimit {
+ bb = ctlOpts[ctlHopLimit].marshal(bb, cm)
+ }
+ if pktinfo {
+ bb = ctlOpts[ctlPacketInfo].marshal(bb, cm)
+ }
+ if nexthop {
+ bb = ctlOpts[ctlNextHop].marshal(bb, cm)
+ }
+ }
+ return b
+}
+
+// Parse parses b as a control message and stores the result in cm.
+func (cm *ControlMessage) Parse(b []byte) error {
+ ms, err := socket.ControlMessage(b).Parse()
+ if err != nil {
+ return err
+ }
+ for _, m := range ms {
+ lvl, typ, l, err := m.ParseHeader()
+ if err != nil {
+ return err
+ }
+ if lvl != iana.ProtocolIPv6 {
+ continue
+ }
+ switch {
+ case typ == ctlOpts[ctlTrafficClass].name && l >= ctlOpts[ctlTrafficClass].length:
+ ctlOpts[ctlTrafficClass].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlHopLimit].name && l >= ctlOpts[ctlHopLimit].length:
+ ctlOpts[ctlHopLimit].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlPacketInfo].name && l >= ctlOpts[ctlPacketInfo].length:
+ ctlOpts[ctlPacketInfo].parse(cm, m.Data(l))
+ case typ == ctlOpts[ctlPathMTU].name && l >= ctlOpts[ctlPathMTU].length:
+ ctlOpts[ctlPathMTU].parse(cm, m.Data(l))
+ }
+ }
+ return nil
+}
+
+// NewControlMessage returns a new control message.
+//
+// The returned message is large enough for options specified by cf.
+func NewControlMessage(cf ControlFlags) []byte {
+ opt := rawOpt{cflags: cf}
+ var l int
+ if opt.isset(FlagTrafficClass) && ctlOpts[ctlTrafficClass].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlTrafficClass].length)
+ }
+ if opt.isset(FlagHopLimit) && ctlOpts[ctlHopLimit].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlHopLimit].length)
+ }
+ if opt.isset(flagPacketInfo) && ctlOpts[ctlPacketInfo].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlPacketInfo].length)
+ }
+ if opt.isset(FlagPathMTU) && ctlOpts[ctlPathMTU].name > 0 {
+ l += socket.ControlMessageSpace(ctlOpts[ctlPathMTU].length)
+ }
+ var b []byte
+ if l > 0 {
+ b = make([]byte, l)
+ }
+ return b
+}
+
// Ancillary data socket options
const (
ctlTrafficClass = iota // header field
diff --git a/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go
index d1693af1f..9fd9eb15e 100644
--- a/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go
+++ b/vendor/golang.org/x/net/ipv6/control_rfc2292_unix.go
@@ -7,31 +7,26 @@
package ipv6
import (
- "syscall"
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
func marshal2292HopLimit(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_2292HOPLIMIT
- m.SetLen(syscall.CmsgLen(4))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292HOPLIMIT, 4)
if cm != nil {
- data := b[syscall.CmsgLen(0):]
- nativeEndian.PutUint32(data[:4], uint32(cm.HopLimit))
+ socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit))
}
- return b[syscall.CmsgSpace(4):]
+ return m.Next(4)
}
func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_2292PKTINFO
- m.SetLen(syscall.CmsgLen(sizeofInet6Pktinfo))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292PKTINFO, sizeofInet6Pktinfo)
if cm != nil {
- pi := (*inet6Pktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
+ pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0]))
if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
copy(pi.Addr[:], ip)
}
@@ -39,17 +34,15 @@ func marshal2292PacketInfo(b []byte, cm *ControlMessage) []byte {
pi.setIfindex(cm.IfIndex)
}
}
- return b[syscall.CmsgSpace(sizeofInet6Pktinfo):]
+ return m.Next(sizeofInet6Pktinfo)
}
func marshal2292NextHop(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_2292NEXTHOP
- m.SetLen(syscall.CmsgLen(sizeofSockaddrInet6))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_2292NEXTHOP, sizeofSockaddrInet6)
if cm != nil {
- sa := (*sockaddrInet6)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
+ sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0]))
sa.setSockaddr(cm.NextHop, cm.IfIndex)
}
- return b[syscall.CmsgSpace(sizeofSockaddrInet6):]
+ return m.Next(sizeofSockaddrInet6)
}
diff --git a/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go b/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go
index 2800df4bc..eec529c20 100644
--- a/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go
+++ b/vendor/golang.org/x/net/ipv6/control_rfc3542_unix.go
@@ -7,51 +7,44 @@
package ipv6
import (
- "syscall"
+ "net"
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
func marshalTrafficClass(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_TCLASS
- m.SetLen(syscall.CmsgLen(4))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_TCLASS, 4)
if cm != nil {
- data := b[syscall.CmsgLen(0):]
- nativeEndian.PutUint32(data[:4], uint32(cm.TrafficClass))
+ socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.TrafficClass))
}
- return b[syscall.CmsgSpace(4):]
+ return m.Next(4)
}
func parseTrafficClass(cm *ControlMessage, b []byte) {
- cm.TrafficClass = int(nativeEndian.Uint32(b[:4]))
+ cm.TrafficClass = int(socket.NativeEndian.Uint32(b[:4]))
}
func marshalHopLimit(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_HOPLIMIT
- m.SetLen(syscall.CmsgLen(4))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_HOPLIMIT, 4)
if cm != nil {
- data := b[syscall.CmsgLen(0):]
- nativeEndian.PutUint32(data[:4], uint32(cm.HopLimit))
+ socket.NativeEndian.PutUint32(m.Data(4), uint32(cm.HopLimit))
}
- return b[syscall.CmsgSpace(4):]
+ return m.Next(4)
}
func parseHopLimit(cm *ControlMessage, b []byte) {
- cm.HopLimit = int(nativeEndian.Uint32(b[:4]))
+ cm.HopLimit = int(socket.NativeEndian.Uint32(b[:4]))
}
func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_PKTINFO
- m.SetLen(syscall.CmsgLen(sizeofInet6Pktinfo))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PKTINFO, sizeofInet6Pktinfo)
if cm != nil {
- pi := (*inet6Pktinfo)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
+ pi := (*inet6Pktinfo)(unsafe.Pointer(&m.Data(sizeofInet6Pktinfo)[0]))
if ip := cm.Src.To16(); ip != nil && ip.To4() == nil {
copy(pi.Addr[:], ip)
}
@@ -59,41 +52,43 @@ func marshalPacketInfo(b []byte, cm *ControlMessage) []byte {
pi.setIfindex(cm.IfIndex)
}
}
- return b[syscall.CmsgSpace(sizeofInet6Pktinfo):]
+ return m.Next(sizeofInet6Pktinfo)
}
func parsePacketInfo(cm *ControlMessage, b []byte) {
pi := (*inet6Pktinfo)(unsafe.Pointer(&b[0]))
- cm.Dst = pi.Addr[:]
+ if len(cm.Dst) < net.IPv6len {
+ cm.Dst = make(net.IP, net.IPv6len)
+ }
+ copy(cm.Dst, pi.Addr[:])
cm.IfIndex = int(pi.Ifindex)
}
func marshalNextHop(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_NEXTHOP
- m.SetLen(syscall.CmsgLen(sizeofSockaddrInet6))
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_NEXTHOP, sizeofSockaddrInet6)
if cm != nil {
- sa := (*sockaddrInet6)(unsafe.Pointer(&b[syscall.CmsgLen(0)]))
+ sa := (*sockaddrInet6)(unsafe.Pointer(&m.Data(sizeofSockaddrInet6)[0]))
sa.setSockaddr(cm.NextHop, cm.IfIndex)
}
- return b[syscall.CmsgSpace(sizeofSockaddrInet6):]
+ return m.Next(sizeofSockaddrInet6)
}
func parseNextHop(cm *ControlMessage, b []byte) {
}
func marshalPathMTU(b []byte, cm *ControlMessage) []byte {
- m := (*syscall.Cmsghdr)(unsafe.Pointer(&b[0]))
- m.Level = iana.ProtocolIPv6
- m.Type = sysIPV6_PATHMTU
- m.SetLen(syscall.CmsgLen(sizeofIPv6Mtuinfo))
- return b[syscall.CmsgSpace(sizeofIPv6Mtuinfo):]
+ m := socket.ControlMessage(b)
+ m.MarshalHeader(iana.ProtocolIPv6, sysIPV6_PATHMTU, sizeofIPv6Mtuinfo)
+ return m.Next(sizeofIPv6Mtuinfo)
}
func parsePathMTU(cm *ControlMessage, b []byte) {
mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
- cm.Dst = mi.Addr.Addr[:]
+ if len(cm.Dst) < net.IPv6len {
+ cm.Dst = make(net.IP, net.IPv6len)
+ }
+ copy(cm.Dst, mi.Addr.Addr[:])
cm.IfIndex = int(mi.Addr.Scope_id)
cm.MTU = int(mi.Mtu)
}
diff --git a/vendor/golang.org/x/net/ipv6/control_stub.go b/vendor/golang.org/x/net/ipv6/control_stub.go
index 24b40a82d..a045f28f7 100644
--- a/vendor/golang.org/x/net/ipv6/control_stub.go
+++ b/vendor/golang.org/x/net/ipv6/control_stub.go
@@ -2,22 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build nacl plan9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv6
-func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
+import "golang.org/x/net/internal/socket"
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
return errOpNoSupport
}
-
-func newControlMessage(opt *rawOpt) (oob []byte) {
- return nil
-}
-
-func parseControlMessage(b []byte) (*ControlMessage, error) {
- return nil, errOpNoSupport
-}
-
-func marshalControlMessage(cm *ControlMessage) (oob []byte) {
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv6/control_test.go b/vendor/golang.org/x/net/ipv6/control_test.go
new file mode 100644
index 000000000..c186ca99f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/control_test.go
@@ -0,0 +1,21 @@
+// Copyright 2017 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 ipv6_test
+
+import (
+ "testing"
+
+ "golang.org/x/net/ipv6"
+)
+
+func TestControlMessageParseWithFuzz(t *testing.T) {
+ var cm ipv6.ControlMessage
+ for _, fuzz := range []string{
+ "\f\x00\x00\x00)\x00\x00\x00.\x00\x00\x00",
+ "\f\x00\x00\x00)\x00\x00\x00,\x00\x00\x00",
+ } {
+ cm.Parse([]byte(fuzz))
+ }
+}
diff --git a/vendor/golang.org/x/net/ipv6/control_unix.go b/vendor/golang.org/x/net/ipv6/control_unix.go
index 7bd421053..66515060a 100644
--- a/vendor/golang.org/x/net/ipv6/control_unix.go
+++ b/vendor/golang.org/x/net/ipv6/control_unix.go
@@ -6,18 +6,13 @@
package ipv6
-import (
- "os"
- "syscall"
+import "golang.org/x/net/internal/socket"
- "golang.org/x/net/internal/iana"
-)
-
-func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
opt.Lock()
defer opt.Unlock()
- if cf&FlagTrafficClass != 0 && sockOpts[ssoReceiveTrafficClass].name > 0 {
- if err := setInt(s, &sockOpts[ssoReceiveTrafficClass], boolint(on)); err != nil {
+ if so, ok := sockOpts[ssoReceiveTrafficClass]; ok && cf&FlagTrafficClass != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -26,8 +21,8 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
opt.clear(FlagTrafficClass)
}
}
- if cf&FlagHopLimit != 0 && sockOpts[ssoReceiveHopLimit].name > 0 {
- if err := setInt(s, &sockOpts[ssoReceiveHopLimit], boolint(on)); err != nil {
+ if so, ok := sockOpts[ssoReceiveHopLimit]; ok && cf&FlagHopLimit != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -36,8 +31,8 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
opt.clear(FlagHopLimit)
}
}
- if cf&flagPacketInfo != 0 && sockOpts[ssoReceivePacketInfo].name > 0 {
- if err := setInt(s, &sockOpts[ssoReceivePacketInfo], boolint(on)); err != nil {
+ if so, ok := sockOpts[ssoReceivePacketInfo]; ok && cf&flagPacketInfo != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -46,8 +41,8 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
opt.clear(cf & flagPacketInfo)
}
}
- if cf&FlagPathMTU != 0 && sockOpts[ssoReceivePathMTU].name > 0 {
- if err := setInt(s, &sockOpts[ssoReceivePathMTU], boolint(on)); err != nil {
+ if so, ok := sockOpts[ssoReceivePathMTU]; ok && cf&FlagPathMTU != 0 {
+ if err := so.SetInt(c, boolint(on)); err != nil {
return err
}
if on {
@@ -58,96 +53,3 @@ func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
}
return nil
}
-
-func newControlMessage(opt *rawOpt) (oob []byte) {
- opt.RLock()
- var l int
- if opt.isset(FlagTrafficClass) && ctlOpts[ctlTrafficClass].name > 0 {
- l += syscall.CmsgSpace(ctlOpts[ctlTrafficClass].length)
- }
- if opt.isset(FlagHopLimit) && ctlOpts[ctlHopLimit].name > 0 {
- l += syscall.CmsgSpace(ctlOpts[ctlHopLimit].length)
- }
- if opt.isset(flagPacketInfo) && ctlOpts[ctlPacketInfo].name > 0 {
- l += syscall.CmsgSpace(ctlOpts[ctlPacketInfo].length)
- }
- if opt.isset(FlagPathMTU) && ctlOpts[ctlPathMTU].name > 0 {
- l += syscall.CmsgSpace(ctlOpts[ctlPathMTU].length)
- }
- if l > 0 {
- oob = make([]byte, l)
- }
- opt.RUnlock()
- return
-}
-
-func parseControlMessage(b []byte) (*ControlMessage, error) {
- if len(b) == 0 {
- return nil, nil
- }
- cmsgs, err := syscall.ParseSocketControlMessage(b)
- if err != nil {
- return nil, os.NewSyscallError("parse socket control message", err)
- }
- cm := &ControlMessage{}
- for _, m := range cmsgs {
- if m.Header.Level != iana.ProtocolIPv6 {
- continue
- }
- switch int(m.Header.Type) {
- case ctlOpts[ctlTrafficClass].name:
- ctlOpts[ctlTrafficClass].parse(cm, m.Data[:])
- case ctlOpts[ctlHopLimit].name:
- ctlOpts[ctlHopLimit].parse(cm, m.Data[:])
- case ctlOpts[ctlPacketInfo].name:
- ctlOpts[ctlPacketInfo].parse(cm, m.Data[:])
- case ctlOpts[ctlPathMTU].name:
- ctlOpts[ctlPathMTU].parse(cm, m.Data[:])
- }
- }
- return cm, nil
-}
-
-func marshalControlMessage(cm *ControlMessage) (oob []byte) {
- if cm == nil {
- return
- }
- var l int
- tclass := false
- if ctlOpts[ctlTrafficClass].name > 0 && cm.TrafficClass > 0 {
- tclass = true
- l += syscall.CmsgSpace(ctlOpts[ctlTrafficClass].length)
- }
- hoplimit := false
- if ctlOpts[ctlHopLimit].name > 0 && cm.HopLimit > 0 {
- hoplimit = true
- l += syscall.CmsgSpace(ctlOpts[ctlHopLimit].length)
- }
- pktinfo := false
- if ctlOpts[ctlPacketInfo].name > 0 && (cm.Src.To16() != nil && cm.Src.To4() == nil || cm.IfIndex > 0) {
- pktinfo = true
- l += syscall.CmsgSpace(ctlOpts[ctlPacketInfo].length)
- }
- nexthop := false
- if ctlOpts[ctlNextHop].name > 0 && cm.NextHop.To16() != nil && cm.NextHop.To4() == nil {
- nexthop = true
- l += syscall.CmsgSpace(ctlOpts[ctlNextHop].length)
- }
- if l > 0 {
- oob = make([]byte, l)
- b := oob
- if tclass {
- b = ctlOpts[ctlTrafficClass].marshal(b, cm)
- }
- if hoplimit {
- b = ctlOpts[ctlHopLimit].marshal(b, cm)
- }
- if pktinfo {
- b = ctlOpts[ctlPacketInfo].marshal(b, cm)
- }
- if nexthop {
- b = ctlOpts[ctlNextHop].marshal(b, cm)
- }
- }
- return
-}
diff --git a/vendor/golang.org/x/net/ipv6/control_windows.go b/vendor/golang.org/x/net/ipv6/control_windows.go
index feef6ab86..ef2563b3f 100644
--- a/vendor/golang.org/x/net/ipv6/control_windows.go
+++ b/vendor/golang.org/x/net/ipv6/control_windows.go
@@ -4,24 +4,13 @@
package ipv6
-import "syscall"
+import (
+ "syscall"
-func setControlMessage(s uintptr, opt *rawOpt, cf ControlFlags, on bool) error {
+ "golang.org/x/net/internal/socket"
+)
+
+func setControlMessage(c *socket.Conn, opt *rawOpt, cf ControlFlags, on bool) error {
// TODO(mikio): implement this
return syscall.EWINDOWS
}
-
-func newControlMessage(opt *rawOpt) (oob []byte) {
- // TODO(mikio): implement this
- return nil
-}
-
-func parseControlMessage(b []byte) (*ControlMessage, error) {
- // TODO(mikio): implement this
- return nil, syscall.EWINDOWS
-}
-
-func marshalControlMessage(cm *ControlMessage) (oob []byte) {
- // TODO(mikio): implement this
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv6/defs_linux.go b/vendor/golang.org/x/net/ipv6/defs_linux.go
index 8a967fd21..3308cb2c3 100644
--- a/vendor/golang.org/x/net/ipv6/defs_linux.go
+++ b/vendor/golang.org/x/net/ipv6/defs_linux.go
@@ -120,6 +120,8 @@ const (
sizeofGroupSourceReq = C.sizeof_struct_group_source_req
sizeofICMPv6Filter = C.sizeof_struct_icmp6_filter
+
+ sizeofSockFprog = C.sizeof_struct_sock_fprog
)
type kernelSockaddrStorage C.struct___kernel_sockaddr_storage
diff --git a/vendor/golang.org/x/net/ipv6/dgramopt_posix.go b/vendor/golang.org/x/net/ipv6/dgramopt.go
similarity index 69%
rename from vendor/golang.org/x/net/ipv6/dgramopt_posix.go
rename to vendor/golang.org/x/net/ipv6/dgramopt.go
index a448cbaa5..703dafe84 100644
--- a/vendor/golang.org/x/net/ipv6/dgramopt_posix.go
+++ b/vendor/golang.org/x/net/ipv6/dgramopt.go
@@ -2,15 +2,13 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
package ipv6
import (
"net"
"syscall"
- "golang.org/x/net/internal/netreflect"
+ "golang.org/x/net/bpf"
)
// MulticastHopLimit returns the hop limit field value for outgoing
@@ -19,11 +17,11 @@ func (c *dgramOpt) MulticastHopLimit() (int, error) {
if !c.ok() {
return 0, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return 0, err
+ so, ok := sockOpts[ssoMulticastHopLimit]
+ if !ok {
+ return 0, errOpNoSupport
}
- return getInt(s, &sockOpts[ssoMulticastHopLimit])
+ return so.GetInt(c.Conn)
}
// SetMulticastHopLimit sets the hop limit field value for future
@@ -32,11 +30,11 @@ func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoMulticastHopLimit]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoMulticastHopLimit], hoplim)
+ return so.SetInt(c.Conn, hoplim)
}
// MulticastInterface returns the default interface for multicast
@@ -45,11 +43,11 @@ func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
if !c.ok() {
return nil, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return nil, err
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return nil, errOpNoSupport
}
- return getInterface(s, &sockOpts[ssoMulticastInterface])
+ return so.getMulticastInterface(c.Conn)
}
// SetMulticastInterface sets the default interface for future
@@ -58,11 +56,11 @@ func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoMulticastInterface]
+ if !ok {
+ return errOpNoSupport
}
- return setInterface(s, &sockOpts[ssoMulticastInterface], ifi)
+ return so.setMulticastInterface(c.Conn, ifi)
}
// MulticastLoopback reports whether transmitted multicast packets
@@ -71,11 +69,11 @@ func (c *dgramOpt) MulticastLoopback() (bool, error) {
if !c.ok() {
return false, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return false, err
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return false, errOpNoSupport
}
- on, err := getInt(s, &sockOpts[ssoMulticastLoopback])
+ on, err := so.GetInt(c.Conn)
if err != nil {
return false, err
}
@@ -88,11 +86,11 @@ func (c *dgramOpt) SetMulticastLoopback(on bool) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoMulticastLoopback]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoMulticastLoopback], boolint(on))
+ return so.SetInt(c.Conn, boolint(on))
}
// JoinGroup joins the group address group on the interface ifi.
@@ -108,15 +106,15 @@ func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoJoinGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP16(group)
if grp == nil {
return errMissingAddress
}
- return setGroup(s, &sockOpts[ssoJoinGroup], ifi, grp)
+ return so.setGroup(c.Conn, ifi, grp)
}
// LeaveGroup leaves the group address group on the interface ifi
@@ -126,15 +124,15 @@ func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoLeaveGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP16(group)
if grp == nil {
return errMissingAddress
}
- return setGroup(s, &sockOpts[ssoLeaveGroup], ifi, grp)
+ return so.setGroup(c.Conn, ifi, grp)
}
// JoinSourceSpecificGroup joins the source-specific group comprising
@@ -147,9 +145,9 @@ func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoJoinSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP16(group)
if grp == nil {
@@ -159,7 +157,7 @@ func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoJoinSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// LeaveSourceSpecificGroup leaves the source-specific group on the
@@ -168,9 +166,9 @@ func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source ne
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoLeaveSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP16(group)
if grp == nil {
@@ -180,7 +178,7 @@ func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source ne
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoLeaveSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// ExcludeSourceSpecificGroup excludes the source-specific group from
@@ -190,9 +188,9 @@ func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoBlockSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP16(group)
if grp == nil {
@@ -202,7 +200,7 @@ func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoBlockSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// IncludeSourceSpecificGroup includes the excluded source-specific
@@ -211,9 +209,9 @@ func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoUnblockSourceGroup]
+ if !ok {
+ return errOpNoSupport
}
grp := netAddrToIP16(group)
if grp == nil {
@@ -223,7 +221,7 @@ func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source
if src == nil {
return errMissingAddress
}
- return setSourceGroup(s, &sockOpts[ssoUnblockSourceGroup], ifi, grp, src)
+ return so.setSourceGroup(c.Conn, ifi, grp, src)
}
// Checksum reports whether the kernel will compute, store or verify a
@@ -234,11 +232,11 @@ func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
if !c.ok() {
return false, 0, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return false, 0, err
+ so, ok := sockOpts[ssoChecksum]
+ if !ok {
+ return false, 0, errOpNoSupport
}
- offset, err = getInt(s, &sockOpts[ssoChecksum])
+ offset, err = so.GetInt(c.Conn)
if err != nil {
return false, 0, err
}
@@ -255,14 +253,14 @@ func (c *dgramOpt) SetChecksum(on bool, offset int) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoChecksum]
+ if !ok {
+ return errOpNoSupport
}
if !on {
offset = -1
}
- return setInt(s, &sockOpts[ssoChecksum], offset)
+ return so.SetInt(c.Conn, offset)
}
// ICMPFilter returns an ICMP filter.
@@ -270,11 +268,11 @@ func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
if !c.ok() {
return nil, syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return nil, err
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return nil, errOpNoSupport
}
- return getICMPFilter(s, &sockOpts[ssoICMPFilter])
+ return so.getICMPFilter(c.Conn)
}
// SetICMPFilter deploys the ICMP filter.
@@ -282,9 +280,23 @@ func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.PacketConn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoICMPFilter]
+ if !ok {
+ return errOpNoSupport
}
- return setICMPFilter(s, &sockOpts[ssoICMPFilter], f)
+ return so.setICMPFilter(c.Conn, f)
+}
+
+// SetBPF attaches a BPF program to the connection.
+//
+// Only supported on Linux.
+func (c *dgramOpt) SetBPF(filter []bpf.RawInstruction) error {
+ if !c.ok() {
+ return syscall.EINVAL
+ }
+ so, ok := sockOpts[ssoAttachFilter]
+ if !ok {
+ return errOpNoSupport
+ }
+ return so.setBPF(c.Conn, filter)
}
diff --git a/vendor/golang.org/x/net/ipv6/dgramopt_stub.go b/vendor/golang.org/x/net/ipv6/dgramopt_stub.go
deleted file mode 100644
index 82b0686ae..000000000
--- a/vendor/golang.org/x/net/ipv6/dgramopt_stub.go
+++ /dev/null
@@ -1,119 +0,0 @@
-// 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.
-
-// +build nacl plan9
-
-package ipv6
-
-import "net"
-
-// MulticastHopLimit returns the hop limit field value for outgoing
-// multicast packets.
-func (c *dgramOpt) MulticastHopLimit() (int, error) {
- return 0, errOpNoSupport
-}
-
-// SetMulticastHopLimit sets the hop limit field value for future
-// outgoing multicast packets.
-func (c *dgramOpt) SetMulticastHopLimit(hoplim int) error {
- return errOpNoSupport
-}
-
-// MulticastInterface returns the default interface for multicast
-// packet transmissions.
-func (c *dgramOpt) MulticastInterface() (*net.Interface, error) {
- return nil, errOpNoSupport
-}
-
-// SetMulticastInterface sets the default interface for future
-// multicast packet transmissions.
-func (c *dgramOpt) SetMulticastInterface(ifi *net.Interface) error {
- return errOpNoSupport
-}
-
-// MulticastLoopback reports whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) MulticastLoopback() (bool, error) {
- return false, errOpNoSupport
-}
-
-// SetMulticastLoopback sets whether transmitted multicast packets
-// should be copied and send back to the originator.
-func (c *dgramOpt) SetMulticastLoopback(on bool) error {
- return errOpNoSupport
-}
-
-// JoinGroup joins the group address group on the interface ifi.
-// By default all sources that can cast data to group are accepted.
-// It's possible to mute and unmute data transmission from a specific
-// source by using ExcludeSourceSpecificGroup and
-// IncludeSourceSpecificGroup.
-// JoinGroup uses the system assigned multicast interface when ifi is
-// nil, although this is not recommended because the assignment
-// depends on platforms and sometimes it might require routing
-// configuration.
-func (c *dgramOpt) JoinGroup(ifi *net.Interface, group net.Addr) error {
- return errOpNoSupport
-}
-
-// LeaveGroup leaves the group address group on the interface ifi
-// regardless of whether the group is any-source group or
-// source-specific group.
-func (c *dgramOpt) LeaveGroup(ifi *net.Interface, group net.Addr) error {
- return errOpNoSupport
-}
-
-// JoinSourceSpecificGroup joins the source-specific group comprising
-// group and source on the interface ifi.
-// JoinSourceSpecificGroup uses the system assigned multicast
-// interface when ifi is nil, although this is not recommended because
-// the assignment depends on platforms and sometimes it might require
-// routing configuration.
-func (c *dgramOpt) JoinSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// LeaveSourceSpecificGroup leaves the source-specific group on the
-// interface ifi.
-func (c *dgramOpt) LeaveSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// ExcludeSourceSpecificGroup excludes the source-specific group from
-// the already joined any-source groups by JoinGroup on the interface
-// ifi.
-func (c *dgramOpt) ExcludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// IncludeSourceSpecificGroup includes the excluded source-specific
-// group by ExcludeSourceSpecificGroup again on the interface ifi.
-func (c *dgramOpt) IncludeSourceSpecificGroup(ifi *net.Interface, group, source net.Addr) error {
- return errOpNoSupport
-}
-
-// Checksum reports whether the kernel will compute, store or verify a
-// checksum for both incoming and outgoing packets. If on is true, it
-// returns an offset in bytes into the data of where the checksum
-// field is located.
-func (c *dgramOpt) Checksum() (on bool, offset int, err error) {
- return false, 0, errOpNoSupport
-}
-
-// SetChecksum enables the kernel checksum processing. If on is ture,
-// the offset should be an offset in bytes into the data of where the
-// checksum field is located.
-func (c *dgramOpt) SetChecksum(on bool, offset int) error {
- return errOpNoSupport
-}
-
-// ICMPFilter returns an ICMP filter.
-func (c *dgramOpt) ICMPFilter() (*ICMPFilter, error) {
- return nil, errOpNoSupport
-}
-
-// SetICMPFilter deploys the ICMP filter.
-func (c *dgramOpt) SetICMPFilter(f *ICMPFilter) error {
- return errOpNoSupport
-}
diff --git a/vendor/golang.org/x/net/ipv6/doc.go b/vendor/golang.org/x/net/ipv6/doc.go
index eaa24c580..664a97dea 100644
--- a/vendor/golang.org/x/net/ipv6/doc.go
+++ b/vendor/golang.org/x/net/ipv6/doc.go
@@ -8,7 +8,7 @@
// The package provides IP-level socket options that allow
// manipulation of IPv6 facilities.
//
-// The IPv6 protocol is defined in RFC 2460.
+// The IPv6 protocol is defined in RFC 8200.
// Socket interface extensions are defined in RFC 3493, RFC 3542 and
// RFC 3678.
// MLDv1 and MLDv2 are defined in RFC 2710 and RFC 3810.
diff --git a/vendor/golang.org/x/net/ipv6/endpoint.go b/vendor/golang.org/x/net/ipv6/endpoint.go
index ce0b0ce27..0624c1740 100644
--- a/vendor/golang.org/x/net/ipv6/endpoint.go
+++ b/vendor/golang.org/x/net/ipv6/endpoint.go
@@ -9,7 +9,7 @@ import (
"syscall"
"time"
- "golang.org/x/net/internal/netreflect"
+ "golang.org/x/net/internal/socket"
)
// BUG(mikio): On Windows, the JoinSourceSpecificGroup,
@@ -25,7 +25,7 @@ type Conn struct {
}
type genericOpt struct {
- net.Conn
+ *socket.Conn
}
func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
@@ -33,14 +33,14 @@ func (c *genericOpt) ok() bool { return c != nil && c.Conn != nil }
// PathMTU returns a path MTU value for the destination associated
// with the endpoint.
func (c *Conn) PathMTU() (int, error) {
- if !c.genericOpt.ok() {
+ if !c.ok() {
return 0, syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.genericOpt.Conn)
- if err != nil {
- return 0, err
+ so, ok := sockOpts[ssoPathMTU]
+ if !ok {
+ return 0, errOpNoSupport
}
- _, mtu, err := getMTUInfo(s, &sockOpts[ssoPathMTU])
+ _, mtu, err := so.getMTUInfo(c.Conn)
if err != nil {
return 0, err
}
@@ -49,8 +49,9 @@ func (c *Conn) PathMTU() (int, error) {
// NewConn returns a new Conn.
func NewConn(c net.Conn) *Conn {
+ cc, _ := socket.NewConn(c)
return &Conn{
- genericOpt: genericOpt{Conn: c},
+ genericOpt: genericOpt{Conn: cc},
}
}
@@ -66,10 +67,10 @@ type PacketConn struct {
}
type dgramOpt struct {
- net.PacketConn
+ *socket.Conn
}
-func (c *dgramOpt) ok() bool { return c != nil && c.PacketConn != nil }
+func (c *dgramOpt) ok() bool { return c != nil && c.Conn != nil }
// SetControlMessage allows to receive the per packet basis IP-level
// socket options.
@@ -77,11 +78,7 @@ func (c *PacketConn) SetControlMessage(cf ControlFlags, on bool) error {
if !c.payloadHandler.ok() {
return syscall.EINVAL
}
- s, err := netreflect.PacketSocketOf(c.dgramOpt.PacketConn)
- if err != nil {
- return err
- }
- return setControlMessage(s, &c.payloadHandler.rawOpt, cf, on)
+ return setControlMessage(c.dgramOpt.Conn, &c.payloadHandler.rawOpt, cf, on)
}
// SetDeadline sets the read and write deadlines associated with the
@@ -122,9 +119,10 @@ func (c *PacketConn) Close() error {
// NewPacketConn returns a new PacketConn using c as its underlying
// transport.
func NewPacketConn(c net.PacketConn) *PacketConn {
+ cc, _ := socket.NewConn(c.(net.Conn))
return &PacketConn{
- genericOpt: genericOpt{Conn: c.(net.Conn)},
- dgramOpt: dgramOpt{PacketConn: c},
- payloadHandler: payloadHandler{PacketConn: c},
+ genericOpt: genericOpt{Conn: cc},
+ dgramOpt: dgramOpt{Conn: cc},
+ payloadHandler: payloadHandler{PacketConn: c, Conn: cc},
}
}
diff --git a/vendor/golang.org/x/net/ipv6/genericopt_posix.go b/vendor/golang.org/x/net/ipv6/genericopt.go
similarity index 59%
rename from vendor/golang.org/x/net/ipv6/genericopt_posix.go
rename to vendor/golang.org/x/net/ipv6/genericopt.go
index 0a8d9883d..e9dbc2e18 100644
--- a/vendor/golang.org/x/net/ipv6/genericopt_posix.go
+++ b/vendor/golang.org/x/net/ipv6/genericopt.go
@@ -2,15 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris windows
-
package ipv6
-import (
- "syscall"
-
- "golang.org/x/net/internal/netreflect"
-)
+import "syscall"
// TrafficClass returns the traffic class field value for outgoing
// packets.
@@ -18,11 +12,11 @@ func (c *genericOpt) TrafficClass() (int, error) {
if !c.ok() {
return 0, syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return 0, err
+ so, ok := sockOpts[ssoTrafficClass]
+ if !ok {
+ return 0, errOpNoSupport
}
- return getInt(s, &sockOpts[ssoTrafficClass])
+ return so.GetInt(c.Conn)
}
// SetTrafficClass sets the traffic class field value for future
@@ -31,11 +25,11 @@ func (c *genericOpt) SetTrafficClass(tclass int) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoTrafficClass]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoTrafficClass], tclass)
+ return so.SetInt(c.Conn, tclass)
}
// HopLimit returns the hop limit field value for outgoing packets.
@@ -43,11 +37,11 @@ func (c *genericOpt) HopLimit() (int, error) {
if !c.ok() {
return 0, syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return 0, err
+ so, ok := sockOpts[ssoHopLimit]
+ if !ok {
+ return 0, errOpNoSupport
}
- return getInt(s, &sockOpts[ssoHopLimit])
+ return so.GetInt(c.Conn)
}
// SetHopLimit sets the hop limit field value for future outgoing
@@ -56,9 +50,9 @@ func (c *genericOpt) SetHopLimit(hoplim int) error {
if !c.ok() {
return syscall.EINVAL
}
- s, err := netreflect.SocketOf(c.Conn)
- if err != nil {
- return err
+ so, ok := sockOpts[ssoHopLimit]
+ if !ok {
+ return errOpNoSupport
}
- return setInt(s, &sockOpts[ssoHopLimit], hoplim)
+ return so.SetInt(c.Conn, hoplim)
}
diff --git a/vendor/golang.org/x/net/ipv6/genericopt_stub.go b/vendor/golang.org/x/net/ipv6/genericopt_stub.go
deleted file mode 100644
index 9dfc57dae..000000000
--- a/vendor/golang.org/x/net/ipv6/genericopt_stub.go
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-// +build nacl plan9
-
-package ipv6
-
-// TrafficClass returns the traffic class field value for outgoing
-// packets.
-func (c *genericOpt) TrafficClass() (int, error) {
- return 0, errOpNoSupport
-}
-
-// SetTrafficClass sets the traffic class field value for future
-// outgoing packets.
-func (c *genericOpt) SetTrafficClass(tclass int) error {
- return errOpNoSupport
-}
-
-// HopLimit returns the hop limit field value for outgoing packets.
-func (c *genericOpt) HopLimit() (int, error) {
- return 0, errOpNoSupport
-}
-
-// SetHopLimit sets the hop limit field value for future outgoing
-// packets.
-func (c *genericOpt) SetHopLimit(hoplim int) error {
- return errOpNoSupport
-}
diff --git a/vendor/golang.org/x/net/ipv6/helper.go b/vendor/golang.org/x/net/ipv6/helper.go
index 7a42e5860..259740132 100644
--- a/vendor/golang.org/x/net/ipv6/helper.go
+++ b/vendor/golang.org/x/net/ipv6/helper.go
@@ -5,10 +5,8 @@
package ipv6
import (
- "encoding/binary"
"errors"
"net"
- "unsafe"
)
var (
@@ -17,20 +15,8 @@ var (
errInvalidConnType = errors.New("invalid conn type")
errOpNoSupport = errors.New("operation not supported")
errNoSuchInterface = errors.New("no such interface")
-
- nativeEndian binary.ByteOrder
)
-func init() {
- i := uint32(1)
- b := (*[4]byte)(unsafe.Pointer(&i))
- if b[0] == 1 {
- nativeEndian = binary.LittleEndian
- } else {
- nativeEndian = binary.BigEndian
- }
-}
-
func boolint(b bool) int {
if b {
return 1
@@ -51,3 +37,21 @@ func netAddrToIP16(a net.Addr) net.IP {
}
return nil
}
+
+func opAddr(a net.Addr) net.Addr {
+ switch a.(type) {
+ case *net.TCPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.UDPAddr:
+ if a == nil {
+ return nil
+ }
+ case *net.IPAddr:
+ if a == nil {
+ return nil
+ }
+ }
+ return a
+}
diff --git a/vendor/golang.org/x/net/ipv6/icmp.go b/vendor/golang.org/x/net/ipv6/icmp.go
index ff21d1071..b7f48e27b 100644
--- a/vendor/golang.org/x/net/ipv6/icmp.go
+++ b/vendor/golang.org/x/net/ipv6/icmp.go
@@ -29,7 +29,7 @@ func (typ ICMPType) Protocol() int {
// packets. The filter belongs to a packet delivery path on a host and
// it cannot interact with forwarding packets or tunnel-outer packets.
//
-// Note: RFC 2460 defines a reasonable role model. A node means a
+// Note: RFC 8200 defines a reasonable role model. A node means a
// device that implements IP. A router means a node that forwards IP
// packets not explicitly addressed to itself, and a host means a node
// that is not a router.
diff --git a/vendor/golang.org/x/net/ipv6/icmp_stub.go b/vendor/golang.org/x/net/ipv6/icmp_stub.go
index 3cd84e195..c4b9be6db 100644
--- a/vendor/golang.org/x/net/ipv6/icmp_stub.go
+++ b/vendor/golang.org/x/net/ipv6/icmp_stub.go
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build nacl plan9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv6
diff --git a/vendor/golang.org/x/net/ipv6/ipv6_test.go b/vendor/golang.org/x/net/ipv6/ipv6_test.go
deleted file mode 100644
index 8d2d23542..000000000
--- a/vendor/golang.org/x/net/ipv6/ipv6_test.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright 2017 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 ipv6
-
-import (
- "fmt"
- "os"
- "testing"
-)
-
-var disableTests = false
-
-func TestMain(m *testing.M) {
- if disableTests {
- fmt.Fprintf(os.Stderr, "ipv6 tests disabled in Go 1.9 until netreflect is fixed (Issue 19051)\n")
- os.Exit(0)
- }
- // call flag.Parse() here if TestMain uses flags
- os.Exit(m.Run())
-}
diff --git a/vendor/golang.org/x/net/ipv6/multicastlistener_test.go b/vendor/golang.org/x/net/ipv6/multicastlistener_test.go
index 044db157b..b27713e2f 100644
--- a/vendor/golang.org/x/net/ipv6/multicastlistener_test.go
+++ b/vendor/golang.org/x/net/ipv6/multicastlistener_test.go
@@ -5,7 +5,6 @@
package ipv6_test
import (
- "fmt"
"net"
"runtime"
"testing"
@@ -70,13 +69,16 @@ func TestUDPMultiplePacketConnWithMultipleGroupListeners(t *testing.T) {
}
for _, gaddr := range udpMultipleGroupListenerTests {
- c1, err := net.ListenPacket("udp6", "[ff02::]:1024") // wildcard address with reusable port
+ c1, err := net.ListenPacket("udp6", "[ff02::]:0") // wildcard address with reusable port
if err != nil {
t.Fatal(err)
}
defer c1.Close()
-
- c2, err := net.ListenPacket("udp6", "[ff02::]:1024") // wildcard address with reusable port
+ _, port, err := net.SplitHostPort(c1.LocalAddr().String())
+ if err != nil {
+ t.Fatal(err)
+ }
+ c2, err := net.ListenPacket("udp6", net.JoinHostPort("ff02::", port)) // wildcard address with reusable port
if err != nil {
t.Fatal(err)
}
@@ -132,16 +134,29 @@ func TestUDPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
if err != nil {
t.Fatal(err)
}
+ port := "0"
for i, ifi := range ift {
ip, ok := nettest.IsMulticastCapable("ip6", &ifi)
if !ok {
continue
}
- c, err := net.ListenPacket("udp6", fmt.Sprintf("[%s%%%s]:1024", ip.String(), ifi.Name)) // unicast address with non-reusable port
+ c, err := net.ListenPacket("udp6", net.JoinHostPort(ip.String()+"%"+ifi.Name, port)) // unicast address with non-reusable port
if err != nil {
- t.Fatal(err)
+ // The listen may fail when the serivce is
+ // already in use, but it's fine because the
+ // purpose of this is not to test the
+ // bookkeeping of IP control block inside the
+ // kernel.
+ t.Log(err)
+ continue
}
defer c.Close()
+ if port == "0" {
+ _, port, err = net.SplitHostPort(c.LocalAddr().String())
+ if err != nil {
+ t.Fatal(err)
+ }
+ }
p := ipv6.NewPacketConn(c)
if err := p.JoinGroup(&ifi, &gaddr); err != nil {
t.Fatal(err)
@@ -227,7 +242,7 @@ func TestIPPerInterfaceSinglePacketConnWithSingleGroupListener(t *testing.T) {
if !ok {
continue
}
- c, err := net.ListenPacket("ip6:ipv6-icmp", fmt.Sprintf("%s%%%s", ip.String(), ifi.Name)) // unicast address
+ c, err := net.ListenPacket("ip6:ipv6-icmp", ip.String()+"%"+ifi.Name) // unicast address
if err != nil {
t.Fatal(err)
}
diff --git a/vendor/golang.org/x/net/ipv6/payload.go b/vendor/golang.org/x/net/ipv6/payload.go
index d9f822510..a8197f169 100644
--- a/vendor/golang.org/x/net/ipv6/payload.go
+++ b/vendor/golang.org/x/net/ipv6/payload.go
@@ -4,7 +4,11 @@
package ipv6
-import "net"
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
// BUG(mikio): On Windows, the ControlMessage for ReadFrom and WriteTo
// methods of PacketConn is not implemented.
@@ -12,7 +16,8 @@ import "net"
// A payloadHandler represents the IPv6 datagram payload handler.
type payloadHandler struct {
net.PacketConn
+ *socket.Conn
rawOpt
}
-func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil }
+func (c *payloadHandler) ok() bool { return c != nil && c.PacketConn != nil && c.Conn != nil }
diff --git a/vendor/golang.org/x/net/ipv6/payload_cmsg.go b/vendor/golang.org/x/net/ipv6/payload_cmsg.go
index e853c8059..4ee4b062c 100644
--- a/vendor/golang.org/x/net/ipv6/payload_cmsg.go
+++ b/vendor/golang.org/x/net/ipv6/payload_cmsg.go
@@ -19,27 +19,7 @@ func (c *payloadHandler) ReadFrom(b []byte) (n int, cm *ControlMessage, src net.
if !c.ok() {
return 0, nil, nil, syscall.EINVAL
}
- oob := newControlMessage(&c.rawOpt)
- var oobn int
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- if n, oobn, _, src, err = c.ReadMsgUDP(b, oob); err != nil {
- return 0, nil, nil, err
- }
- case *net.IPConn:
- if n, oobn, _, src, err = c.ReadMsgIP(b, oob); err != nil {
- return 0, nil, nil, err
- }
- default:
- return 0, nil, nil, errInvalidConnType
- }
- if cm, err = parseControlMessage(oob[:oobn]); err != nil {
- return 0, nil, nil, err
- }
- if cm != nil {
- cm.Src = netAddrToIP16(src)
- }
- return
+ return c.readFrom(b)
}
// WriteTo writes a payload of the IPv6 datagram, to the destination
@@ -51,20 +31,5 @@ func (c *payloadHandler) WriteTo(b []byte, cm *ControlMessage, dst net.Addr) (n
if !c.ok() {
return 0, syscall.EINVAL
}
- oob := marshalControlMessage(cm)
- if dst == nil {
- return 0, errMissingAddress
- }
- switch c := c.PacketConn.(type) {
- case *net.UDPConn:
- n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr))
- case *net.IPConn:
- n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr))
- default:
- return 0, errInvalidConnType
- }
- if err != nil {
- return 0, err
- }
- return
+ return c.writeTo(b, cm, dst)
}
diff --git a/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go
new file mode 100644
index 000000000..fdc6c3994
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_8.go
@@ -0,0 +1,55 @@
+// 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.
+
+// +build !go1.9
+// +build !nacl,!plan9,!windows
+
+package ipv6
+
+import "net"
+
+func (c *payloadHandler) readFrom(b []byte) (n int, cm *ControlMessage, src net.Addr, err error) {
+ c.rawOpt.RLock()
+ oob := NewControlMessage(c.rawOpt.cflags)
+ c.rawOpt.RUnlock()
+ var nn int
+ switch c := c.PacketConn.(type) {
+ case *net.UDPConn:
+ if n, nn, _, src, err = c.ReadMsgUDP(b, oob); err != nil {
+ return 0, nil, nil, err
+ }
+ case *net.IPConn:
+ if n, nn, _, src, err = c.ReadMsgIP(b, oob); err != nil {
+ return 0, nil, nil, err
+ }
+ default:
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Err: errInvalidConnType}
+ }
+ if nn > 0 {
+ cm = new(ControlMessage)
+ if err = cm.Parse(oob[:nn]); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ }
+ if cm != nil {
+ cm.Src = netAddrToIP16(src)
+ }
+ return
+}
+
+func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (n int, err error) {
+ oob := cm.Marshal()
+ if dst == nil {
+ return 0, &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errMissingAddress}
+ }
+ switch c := c.PacketConn.(type) {
+ case *net.UDPConn:
+ n, _, err = c.WriteMsgUDP(b, oob, dst.(*net.UDPAddr))
+ case *net.IPConn:
+ n, _, err = c.WriteMsgIP(b, oob, dst.(*net.IPAddr))
+ default:
+ return 0, &net.OpError{Op: "write", Net: c.LocalAddr().Network(), Source: c.LocalAddr(), Addr: opAddr(dst), Err: errInvalidConnType}
+ }
+ return
+}
diff --git a/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go
new file mode 100644
index 000000000..8f6d02e2f
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/payload_cmsg_go1_9.go
@@ -0,0 +1,57 @@
+// Copyright 2017 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.9
+// +build !nacl,!plan9,!windows
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (c *payloadHandler) readFrom(b []byte) (int, *ControlMessage, net.Addr, error) {
+ c.rawOpt.RLock()
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: NewControlMessage(c.rawOpt.cflags),
+ }
+ c.rawOpt.RUnlock()
+ switch c.PacketConn.(type) {
+ case *net.UDPConn:
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ case *net.IPConn:
+ if err := c.RecvMsg(&m, 0); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ default:
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: errInvalidConnType}
+ }
+ var cm *ControlMessage
+ if m.NN > 0 {
+ cm = new(ControlMessage)
+ if err := cm.Parse(m.OOB[:m.NN]); err != nil {
+ return 0, nil, nil, &net.OpError{Op: "read", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Err: err}
+ }
+ cm.Src = netAddrToIP16(m.Addr)
+ }
+ return m.N, cm, m.Addr, nil
+}
+
+func (c *payloadHandler) writeTo(b []byte, cm *ControlMessage, dst net.Addr) (int, error) {
+ m := socket.Message{
+ Buffers: [][]byte{b},
+ OOB: cm.Marshal(),
+ Addr: dst,
+ }
+ err := c.SendMsg(&m, 0)
+ if err != nil {
+ err = &net.OpError{Op: "write", Net: c.PacketConn.LocalAddr().Network(), Source: c.PacketConn.LocalAddr(), Addr: opAddr(dst), Err: err}
+ }
+ return m.N, err
+}
diff --git a/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go b/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go
new file mode 100644
index 000000000..c11d92ae9
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/readwrite_go1_8_test.go
@@ -0,0 +1,242 @@
+// 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.
+
+// +build !go1.9
+
+package ipv6_test
+
+import (
+ "bytes"
+ "fmt"
+ "net"
+ "runtime"
+ "strings"
+ "sync"
+ "testing"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/nettest"
+ "golang.org/x/net/ipv6"
+)
+
+func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ b.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph := []byte{
+ 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ }
+ greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+ bb := make([]byte, 128)
+ cm := ipv6.ControlMessage{
+ TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
+ HopLimit: 1,
+ Src: net.IPv6loopback,
+ }
+ if ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+
+ b.Run("UDP", func(b *testing.B) {
+ c, err := nettest.NewLocalPacketListener("udp6")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv6.FlagHopLimit | ipv6.FlagInterface
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(payload, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(payload, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+ b.Run("IP", func(b *testing.B) {
+ switch runtime.GOOS {
+ case "netbsd":
+ b.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ b.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(datagram, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+}
+
+func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph := []byte{
+ 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ }
+ greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+
+ t.Run("UDP", func(t *testing.T) {
+ c, err := nettest.NewLocalPacketListener("udp6")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr())
+ })
+ })
+ t.Run("IP", func(t *testing.T) {
+ switch runtime.GOOS {
+ case "netbsd":
+ t.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ t.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr())
+ })
+ })
+}
+
+func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv6.PacketConn, data []byte, dst net.Addr) {
+ ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
+ cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
+
+ if err := p.SetControlMessage(cf, true); err != nil { // probe before test
+ if nettest.ProtocolNotSupported(err) {
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+ t.Fatal(err)
+ }
+
+ var wg sync.WaitGroup
+ reader := func() {
+ defer wg.Done()
+ b := make([]byte, 128)
+ n, cm, _, err := p.ReadFrom(b)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if !bytes.Equal(b[:n], data) {
+ t.Errorf("got %#v; want %#v", b[:n], data)
+ return
+ }
+ s := cm.String()
+ if strings.Contains(s, ",") {
+ t.Errorf("should be space-separated values: %s", s)
+ return
+ }
+ }
+ writer := func(toggle bool) {
+ defer wg.Done()
+ cm := ipv6.ControlMessage{
+ TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
+ HopLimit: 1,
+ Src: net.IPv6loopback,
+ }
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+ if err := p.SetControlMessage(cf, toggle); err != nil {
+ t.Error(err)
+ return
+ }
+ n, err := p.WriteTo(data, &cm, dst)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(data) {
+ t.Errorf("got %d; want %d", n, len(data))
+ return
+ }
+ }
+
+ const N = 10
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ go reader()
+ }
+ wg.Add(2 * N)
+ for i := 0; i < 2*N; i++ {
+ go writer(i%2 != 0)
+
+ }
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ go reader()
+ }
+ wg.Wait()
+}
diff --git a/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go b/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go
new file mode 100644
index 000000000..e2fd73370
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/readwrite_go1_9_test.go
@@ -0,0 +1,373 @@
+// Copyright 2017 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.9
+
+package ipv6_test
+
+import (
+ "bytes"
+ "fmt"
+ "net"
+ "runtime"
+ "strings"
+ "sync"
+ "testing"
+
+ "golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/nettest"
+ "golang.org/x/net/ipv6"
+)
+
+func BenchmarkPacketConnReadWriteUnicast(b *testing.B) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ b.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph := []byte{
+ 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ }
+ greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+ bb := make([]byte, 128)
+ cm := ipv6.ControlMessage{
+ TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
+ HopLimit: 1,
+ Src: net.IPv6loopback,
+ }
+ if ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback); ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+
+ b.Run("UDP", func(b *testing.B) {
+ c, err := nettest.NewLocalPacketListener("udp6")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv6.FlagHopLimit | ipv6.FlagInterface
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ wms := []ipv6.Message{
+ {
+ Buffers: [][]byte{payload},
+ Addr: dst,
+ OOB: cm.Marshal(),
+ },
+ }
+ rms := []ipv6.Message{
+ {
+ Buffers: [][]byte{bb},
+ OOB: ipv6.NewControlMessage(cf),
+ },
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(payload, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(payload, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("Batch", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteBatch(wms, 0); err != nil {
+ b.Fatal(err)
+ }
+ if _, err := p.ReadBatch(rms, 0); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+ b.Run("IP", func(b *testing.B) {
+ switch runtime.GOOS {
+ case "netbsd":
+ b.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ b.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
+ if err != nil {
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ dst := c.LocalAddr()
+ cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ wms := []ipv6.Message{
+ {
+ Buffers: [][]byte{datagram},
+ Addr: dst,
+ OOB: cm.Marshal(),
+ },
+ }
+ rms := []ipv6.Message{
+ {
+ Buffers: [][]byte{bb},
+ OOB: ipv6.NewControlMessage(cf),
+ },
+ }
+ b.Run("Net", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(datagram, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("ToFrom", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(datagram, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(bb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("Batch", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteBatch(wms, 0); err != nil {
+ b.Fatal(err)
+ }
+ if _, err := p.ReadBatch(rms, 0); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ })
+}
+
+func TestPacketConnConcurrentReadWriteUnicast(t *testing.T) {
+ switch runtime.GOOS {
+ case "nacl", "plan9", "windows":
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+
+ payload := []byte("HELLO-R-U-THERE")
+ iph := []byte{
+ 0x69, 0x8b, 0xee, 0xf1, 0xca, 0xfe, 0xff, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x01, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ 0x20, 0x01, 0x0d, 0xb8, 0x00, 0x02, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+ }
+ greh := []byte{0x00, 0x00, 0x86, 0xdd, 0x00, 0x00, 0x00, 0x00}
+ datagram := append(greh, append(iph, payload...)...)
+
+ t.Run("UDP", func(t *testing.T) {
+ c, err := nettest.NewLocalPacketListener("udp6")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), false)
+ })
+ t.Run("Batch", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, payload, c.LocalAddr(), true)
+ })
+ })
+ t.Run("IP", func(t *testing.T) {
+ switch runtime.GOOS {
+ case "netbsd":
+ t.Skip("need to configure gre on netbsd")
+ case "openbsd":
+ t.Skip("net.inet.gre.allow=0 by default on openbsd")
+ }
+
+ c, err := net.ListenPacket(fmt.Sprintf("ip6:%d", iana.ProtocolGRE), "::1")
+ if err != nil {
+ t.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
+ }
+ defer c.Close()
+ p := ipv6.NewPacketConn(c)
+ t.Run("ToFrom", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), false)
+ })
+ t.Run("Batch", func(t *testing.T) {
+ testPacketConnConcurrentReadWriteUnicast(t, p, datagram, c.LocalAddr(), true)
+ })
+ })
+}
+
+func testPacketConnConcurrentReadWriteUnicast(t *testing.T, p *ipv6.PacketConn, data []byte, dst net.Addr, batch bool) {
+ ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
+ cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
+
+ if err := p.SetControlMessage(cf, true); err != nil { // probe before test
+ if nettest.ProtocolNotSupported(err) {
+ t.Skipf("not supported on %s", runtime.GOOS)
+ }
+ t.Fatal(err)
+ }
+
+ var wg sync.WaitGroup
+ reader := func() {
+ defer wg.Done()
+ b := make([]byte, 128)
+ n, cm, _, err := p.ReadFrom(b)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if !bytes.Equal(b[:n], data) {
+ t.Errorf("got %#v; want %#v", b[:n], data)
+ return
+ }
+ s := cm.String()
+ if strings.Contains(s, ",") {
+ t.Errorf("should be space-separated values: %s", s)
+ return
+ }
+ }
+ batchReader := func() {
+ defer wg.Done()
+ ms := []ipv6.Message{
+ {
+ Buffers: [][]byte{make([]byte, 128)},
+ OOB: ipv6.NewControlMessage(cf),
+ },
+ }
+ n, err := p.ReadBatch(ms, 0)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(ms) {
+ t.Errorf("got %d; want %d", n, len(ms))
+ return
+ }
+ var cm ipv6.ControlMessage
+ if err := cm.Parse(ms[0].OOB[:ms[0].NN]); err != nil {
+ t.Error(err)
+ return
+ }
+ b := ms[0].Buffers[0][:ms[0].N]
+ if !bytes.Equal(b, data) {
+ t.Errorf("got %#v; want %#v", b, data)
+ return
+ }
+ s := cm.String()
+ if strings.Contains(s, ",") {
+ t.Errorf("should be space-separated values: %s", s)
+ return
+ }
+ }
+ writer := func(toggle bool) {
+ defer wg.Done()
+ cm := ipv6.ControlMessage{
+ TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
+ HopLimit: 1,
+ Src: net.IPv6loopback,
+ }
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+ if err := p.SetControlMessage(cf, toggle); err != nil {
+ t.Error(err)
+ return
+ }
+ n, err := p.WriteTo(data, &cm, dst)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(data) {
+ t.Errorf("got %d; want %d", n, len(data))
+ return
+ }
+ }
+ batchWriter := func(toggle bool) {
+ defer wg.Done()
+ cm := ipv6.ControlMessage{
+ TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
+ HopLimit: 1,
+ Src: net.IPv6loopback,
+ }
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
+ if err := p.SetControlMessage(cf, toggle); err != nil {
+ t.Error(err)
+ return
+ }
+ ms := []ipv6.Message{
+ {
+ Buffers: [][]byte{data},
+ OOB: cm.Marshal(),
+ Addr: dst,
+ },
+ }
+ n, err := p.WriteBatch(ms, 0)
+ if err != nil {
+ t.Error(err)
+ return
+ }
+ if n != len(ms) {
+ t.Errorf("got %d; want %d", n, len(ms))
+ return
+ }
+ if ms[0].N != len(data) {
+ t.Errorf("got %d; want %d", ms[0].N, len(data))
+ return
+ }
+ }
+
+ const N = 10
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ if batch {
+ go batchReader()
+ } else {
+ go reader()
+ }
+ }
+ wg.Add(2 * N)
+ for i := 0; i < 2*N; i++ {
+ if batch {
+ go batchWriter(i%2 != 0)
+ } else {
+ go writer(i%2 != 0)
+ }
+ }
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ if batch {
+ go batchReader()
+ } else {
+ go reader()
+ }
+ }
+ wg.Wait()
+}
diff --git a/vendor/golang.org/x/net/ipv6/readwrite_test.go b/vendor/golang.org/x/net/ipv6/readwrite_test.go
index 41f59be5a..206b915ce 100644
--- a/vendor/golang.org/x/net/ipv6/readwrite_test.go
+++ b/vendor/golang.org/x/net/ipv6/readwrite_test.go
@@ -17,87 +17,50 @@ import (
"golang.org/x/net/ipv6"
)
-func benchmarkUDPListener() (net.PacketConn, net.Addr, error) {
- c, err := net.ListenPacket("udp6", "[::1]:0")
+func BenchmarkReadWriteUnicast(b *testing.B) {
+ c, err := nettest.NewLocalPacketListener("udp6")
if err != nil {
- return nil, nil, err
- }
- dst, err := net.ResolveUDPAddr("udp6", c.LocalAddr().String())
- if err != nil {
- c.Close()
- return nil, nil, err
- }
- return c, dst, nil
-}
-
-func BenchmarkReadWriteNetUDP(b *testing.B) {
- if !supportsIPv6 {
- b.Skip("ipv6 is not supported")
- }
-
- c, dst, err := benchmarkUDPListener()
- if err != nil {
- b.Fatal(err)
+ b.Skipf("not supported on %s/%s: %v", runtime.GOOS, runtime.GOARCH, err)
}
defer c.Close()
+ dst := c.LocalAddr()
wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- benchmarkReadWriteNetUDP(b, c, wb, rb, dst)
- }
-}
-func benchmarkReadWriteNetUDP(b *testing.B, c net.PacketConn, wb, rb []byte, dst net.Addr) {
- if _, err := c.WriteTo(wb, dst); err != nil {
- b.Fatal(err)
- }
- if _, _, err := c.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
-}
+ b.Run("NetUDP", func(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ if _, err := c.WriteTo(wb, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, err := c.ReadFrom(rb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
+ b.Run("IPv6UDP", func(b *testing.B) {
+ p := ipv6.NewPacketConn(c)
+ cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
+ if err := p.SetControlMessage(cf, true); err != nil {
+ b.Fatal(err)
+ }
+ cm := ipv6.ControlMessage{
+ TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
+ HopLimit: 1,
+ }
+ ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
+ if ifi != nil {
+ cm.IfIndex = ifi.Index
+ }
-func BenchmarkReadWriteIPv6UDP(b *testing.B) {
- if !supportsIPv6 {
- b.Skip("ipv6 is not supported")
- }
-
- c, dst, err := benchmarkUDPListener()
- if err != nil {
- b.Fatal(err)
- }
- defer c.Close()
-
- p := ipv6.NewPacketConn(c)
- cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
- if err := p.SetControlMessage(cf, true); err != nil {
- b.Fatal(err)
- }
- ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
-
- wb, rb := []byte("HELLO-R-U-THERE"), make([]byte, 128)
- b.ResetTimer()
- for i := 0; i < b.N; i++ {
- benchmarkReadWriteIPv6UDP(b, p, wb, rb, dst, ifi)
- }
-}
-
-func benchmarkReadWriteIPv6UDP(b *testing.B, p *ipv6.PacketConn, wb, rb []byte, dst net.Addr, ifi *net.Interface) {
- cm := ipv6.ControlMessage{
- TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
- HopLimit: 1,
- }
- if ifi != nil {
- cm.IfIndex = ifi.Index
- }
- if n, err := p.WriteTo(wb, &cm, dst); err != nil {
- b.Fatal(err)
- } else if n != len(wb) {
- b.Fatalf("got %v; want %v", n, len(wb))
- }
- if _, _, _, err := p.ReadFrom(rb); err != nil {
- b.Fatal(err)
- }
+ for i := 0; i < b.N; i++ {
+ if _, err := p.WriteTo(wb, &cm, dst); err != nil {
+ b.Fatal(err)
+ }
+ if _, _, _, err := p.ReadFrom(rb); err != nil {
+ b.Fatal(err)
+ }
+ }
+ })
}
func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
@@ -109,7 +72,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
t.Skip("ipv6 is not supported")
}
- c, err := net.ListenPacket("udp6", "[::1]:0")
+ c, err := nettest.NewLocalPacketListener("udp6")
if err != nil {
t.Fatal(err)
}
@@ -117,11 +80,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
p := ipv6.NewPacketConn(c)
defer p.Close()
- dst, err := net.ResolveUDPAddr("udp6", c.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
-
+ dst := c.LocalAddr()
ifi := nettest.RoutedInterface("ip6", net.FlagUp|net.FlagLoopback)
cf := ipv6.FlagTrafficClass | ipv6.FlagHopLimit | ipv6.FlagSrc | ipv6.FlagDst | ipv6.FlagInterface | ipv6.FlagPathMTU
wb := []byte("HELLO-R-U-THERE")
@@ -167,7 +126,7 @@ func TestPacketConnConcurrentReadWriteUnicastUDP(t *testing.T) {
t.Error(err)
return
} else if n != len(wb) {
- t.Errorf("got %v; want %v", n, len(wb))
+ t.Errorf("got %d; want %d", n, len(wb))
return
}
}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt.go b/vendor/golang.org/x/net/ipv6/sockopt.go
index f0cfc2f94..cc3907df3 100644
--- a/vendor/golang.org/x/net/ipv6/sockopt.go
+++ b/vendor/golang.org/x/net/ipv6/sockopt.go
@@ -4,6 +4,8 @@
package ipv6
+import "golang.org/x/net/internal/socket"
+
// Sticky socket options
const (
ssoTrafficClass = iota // header field for unicast packet, RFC 3542
@@ -24,23 +26,18 @@ const (
ssoLeaveSourceGroup // source-specific multicast
ssoBlockSourceGroup // any-source or source-specific multicast
ssoUnblockSourceGroup // any-source or source-specific multicast
- ssoMax
+ ssoAttachFilter // attach BPF for filtering inbound traffic
)
// Sticky socket option value types
const (
- ssoTypeInt = iota + 1
- ssoTypeInterface
- ssoTypeICMPFilter
- ssoTypeMTUInfo
- ssoTypeIPMreq
+ ssoTypeIPMreq = iota + 1
ssoTypeGroupReq
ssoTypeGroupSourceReq
)
// A sockOpt represents a binding for sticky socket option.
type sockOpt struct {
- level int // option level
- name int // option name, must be equal or greater than 1
- typ int // option value type, must be equal or greater than 1
+ socket.Option
+ typ int // hint for option value type; optional
}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt_posix.go b/vendor/golang.org/x/net/ipv6/sockopt_posix.go
index e0a3fa693..0eac86eb8 100644
--- a/vendor/golang.org/x/net/ipv6/sockopt_posix.go
+++ b/vendor/golang.org/x/net/ipv6/sockopt_posix.go
@@ -8,88 +8,55 @@ package ipv6
import (
"net"
- "os"
"unsafe"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
)
-func getInt(s uintptr, opt *sockOpt) (int, error) {
- if opt.name < 1 || opt.typ != ssoTypeInt {
- return 0, errOpNoSupport
- }
- var i int32
- l := uint32(4)
- if err := getsockopt(s, opt.level, opt.name, unsafe.Pointer(&i), &l); err != nil {
- return 0, os.NewSyscallError("getsockopt", err)
- }
- return int(i), nil
-}
-
-func setInt(s uintptr, opt *sockOpt, v int) error {
- if opt.name < 1 || opt.typ != ssoTypeInt {
- return errOpNoSupport
- }
- i := int32(v)
- return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&i), 4))
-}
-
-func getInterface(s uintptr, opt *sockOpt) (*net.Interface, error) {
- if opt.name < 1 || opt.typ != ssoTypeInterface {
- return nil, errOpNoSupport
- }
- var i int32
- l := uint32(4)
- if err := getsockopt(s, opt.level, opt.name, unsafe.Pointer(&i), &l); err != nil {
- return nil, os.NewSyscallError("getsockopt", err)
- }
- if i == 0 {
- return nil, nil
- }
- ifi, err := net.InterfaceByIndex(int(i))
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ n, err := so.GetInt(c)
if err != nil {
return nil, err
}
- return ifi, nil
+ return net.InterfaceByIndex(n)
}
-func setInterface(s uintptr, opt *sockOpt, ifi *net.Interface) error {
- if opt.name < 1 || opt.typ != ssoTypeInterface {
- return errOpNoSupport
- }
- var i int32
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ var n int
if ifi != nil {
- i = int32(ifi.Index)
+ n = ifi.Index
}
- return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&i), 4))
+ return so.SetInt(c, n)
}
-func getICMPFilter(s uintptr, opt *sockOpt) (*ICMPFilter, error) {
- if opt.name < 1 || opt.typ != ssoTypeICMPFilter {
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ b := make([]byte, so.Len)
+ n, err := so.Get(c, b)
+ if err != nil {
+ return nil, err
+ }
+ if n != sizeofICMPv6Filter {
return nil, errOpNoSupport
}
- var f ICMPFilter
- l := uint32(sizeofICMPv6Filter)
- if err := getsockopt(s, opt.level, opt.name, unsafe.Pointer(&f.icmpv6Filter), &l); err != nil {
- return nil, os.NewSyscallError("getsockopt", err)
- }
- return &f, nil
+ return (*ICMPFilter)(unsafe.Pointer(&b[0])), nil
}
-func setICMPFilter(s uintptr, opt *sockOpt, f *ICMPFilter) error {
- if opt.name < 1 || opt.typ != ssoTypeICMPFilter {
- return errOpNoSupport
- }
- return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&f.icmpv6Filter), sizeofICMPv6Filter))
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ b := (*[sizeofICMPv6Filter]byte)(unsafe.Pointer(f))[:sizeofICMPv6Filter]
+ return so.Set(c, b)
}
-func getMTUInfo(s uintptr, opt *sockOpt) (*net.Interface, int, error) {
- if opt.name < 1 || opt.typ != ssoTypeMTUInfo {
+func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
+ b := make([]byte, so.Len)
+ n, err := so.Get(c, b)
+ if err != nil {
+ return nil, 0, err
+ }
+ if n != sizeofIPv6Mtuinfo {
return nil, 0, errOpNoSupport
}
- var mi ipv6Mtuinfo
- l := uint32(sizeofIPv6Mtuinfo)
- if err := getsockopt(s, opt.level, opt.name, unsafe.Pointer(&mi), &l); err != nil {
- return nil, 0, os.NewSyscallError("getsockopt", err)
- }
+ mi := (*ipv6Mtuinfo)(unsafe.Pointer(&b[0]))
if mi.Addr.Scope_id == 0 {
return nil, int(mi.Mtu), nil
}
@@ -100,23 +67,21 @@ func getMTUInfo(s uintptr, opt *sockOpt) (*net.Interface, int, error) {
return ifi, int(mi.Mtu), nil
}
-func setGroup(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
- if opt.name < 1 {
- return errOpNoSupport
- }
- switch opt.typ {
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ switch so.typ {
case ssoTypeIPMreq:
- return setsockoptIPMreq(s, opt, ifi, grp)
+ return so.setIPMreq(c, ifi, grp)
case ssoTypeGroupReq:
- return setsockoptGroupReq(s, opt, ifi, grp)
+ return so.setGroupReq(c, ifi, grp)
default:
return errOpNoSupport
}
}
-func setSourceGroup(s uintptr, opt *sockOpt, ifi *net.Interface, grp, src net.IP) error {
- if opt.name < 1 || opt.typ != ssoTypeGroupSourceReq {
- return errOpNoSupport
- }
- return setsockoptGroupSourceReq(s, opt, ifi, grp, src)
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return so.setGroupSourceReq(c, ifi, grp, src)
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
+ return so.setAttachFilter(c, f)
}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt_stub.go b/vendor/golang.org/x/net/ipv6/sockopt_stub.go
index 6d59a00c2..1f4a273e4 100644
--- a/vendor/golang.org/x/net/ipv6/sockopt_stub.go
+++ b/vendor/golang.org/x/net/ipv6/sockopt_stub.go
@@ -2,12 +2,45 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build nacl plan9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv6
-import "net"
+import (
+ "net"
-func getMTUInfo(s uintptr, opt *sockOpt) (*net.Interface, int, error) {
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) getMulticastInterface(c *socket.Conn) (*net.Interface, error) {
+ return nil, errOpNoSupport
+}
+
+func (so *sockOpt) setMulticastInterface(c *socket.Conn, ifi *net.Interface) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) getICMPFilter(c *socket.Conn) (*ICMPFilter, error) {
+ return nil, errOpNoSupport
+}
+
+func (so *sockOpt) setICMPFilter(c *socket.Conn, f *ICMPFilter) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) getMTUInfo(c *socket.Conn) (*net.Interface, int, error) {
return nil, 0, errOpNoSupport
}
+
+func (so *sockOpt) setGroup(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) setSourceGroup(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
+ return errOpNoSupport
+}
+
+func (so *sockOpt) setBPF(c *socket.Conn, f []bpf.RawInstruction) error {
+ return errOpNoSupport
+}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt_asmreq_posix.go b/vendor/golang.org/x/net/ipv6/sys_asmreq.go
similarity index 63%
rename from vendor/golang.org/x/net/ipv6/sockopt_asmreq_posix.go
rename to vendor/golang.org/x/net/ipv6/sys_asmreq.go
index cd36739df..b0510c0b5 100644
--- a/vendor/golang.org/x/net/ipv6/sockopt_asmreq_posix.go
+++ b/vendor/golang.org/x/net/ipv6/sys_asmreq.go
@@ -8,15 +8,17 @@ package ipv6
import (
"net"
- "os"
"unsafe"
+
+ "golang.org/x/net/internal/socket"
)
-func setsockoptIPMreq(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
var mreq ipv6Mreq
copy(mreq.Multiaddr[:], grp)
if ifi != nil {
mreq.setIfindex(ifi.Index)
}
- return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, unsafe.Pointer(&mreq), sizeofIPv6Mreq))
+ b := (*[sizeofIPv6Mreq]byte)(unsafe.Pointer(&mreq))[:sizeofIPv6Mreq]
+ return so.Set(c, b)
}
diff --git a/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go b/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go
new file mode 100644
index 000000000..eece96187
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_asmreq_stub.go
@@ -0,0 +1,17 @@
+// 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.
+
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
+
+package ipv6
+
+import (
+ "net"
+
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setIPMreq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
+ return errOpNoSupport
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_bpf.go b/vendor/golang.org/x/net/ipv6/sys_bpf.go
new file mode 100644
index 000000000..b2dbcb2f2
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_bpf.go
@@ -0,0 +1,23 @@
+// Copyright 2017 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 linux
+
+package ipv6
+
+import (
+ "unsafe"
+
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ prog := sockFProg{
+ Len: uint16(len(f)),
+ Filter: (*sockFilter)(unsafe.Pointer(&f[0])),
+ }
+ b := (*[sizeofSockFprog]byte)(unsafe.Pointer(&prog))[:sizeofSockFprog]
+ return so.Set(c, b)
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go b/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go
new file mode 100644
index 000000000..676bea555
--- /dev/null
+++ b/vendor/golang.org/x/net/ipv6/sys_bpf_stub.go
@@ -0,0 +1,16 @@
+// Copyright 2017 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 !linux
+
+package ipv6
+
+import (
+ "golang.org/x/net/bpf"
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setAttachFilter(c *socket.Conn, f []bpf.RawInstruction) error {
+ return errOpNoSupport
+}
diff --git a/vendor/golang.org/x/net/ipv6/sys_bsd.go b/vendor/golang.org/x/net/ipv6/sys_bsd.go
index c22f8ac63..e416eaa1f 100644
--- a/vendor/golang.org/x/net/ipv6/sys_bsd.go
+++ b/vendor/golang.org/x/net/ipv6/sys_bsd.go
@@ -11,6 +11,7 @@ import (
"syscall"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -22,21 +23,21 @@ var (
ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTrafficClass: {iana.ProtocolIPv6, sysIPV6_TCLASS, ssoTypeInt},
- ssoHopLimit: {iana.ProtocolIPv6, sysIPV6_UNICAST_HOPS, ssoTypeInt},
- ssoMulticastInterface: {iana.ProtocolIPv6, sysIPV6_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastHopLimit: {iana.ProtocolIPv6, sysIPV6_MULTICAST_HOPS, ssoTypeInt},
- ssoMulticastLoopback: {iana.ProtocolIPv6, sysIPV6_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTrafficClass: {iana.ProtocolIPv6, sysIPV6_RECVTCLASS, ssoTypeInt},
- ssoReceiveHopLimit: {iana.ProtocolIPv6, sysIPV6_RECVHOPLIMIT, ssoTypeInt},
- ssoReceivePacketInfo: {iana.ProtocolIPv6, sysIPV6_RECVPKTINFO, ssoTypeInt},
- ssoReceivePathMTU: {iana.ProtocolIPv6, sysIPV6_RECVPATHMTU, ssoTypeInt},
- ssoPathMTU: {iana.ProtocolIPv6, sysIPV6_PATHMTU, ssoTypeMTUInfo},
- ssoChecksum: {iana.ProtocolIPv6, sysIPV6_CHECKSUM, ssoTypeInt},
- ssoICMPFilter: {iana.ProtocolIPv6ICMP, sysICMP6_FILTER, ssoTypeICMPFilter},
- ssoJoinGroup: {iana.ProtocolIPv6, sysIPV6_JOIN_GROUP, ssoTypeIPMreq},
- ssoLeaveGroup: {iana.ProtocolIPv6, sysIPV6_LEAVE_GROUP, ssoTypeIPMreq},
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
}
)
diff --git a/vendor/golang.org/x/net/ipv6/sys_darwin.go b/vendor/golang.org/x/net/ipv6/sys_darwin.go
index ffcc9d4c4..e3d044392 100644
--- a/vendor/golang.org/x/net/ipv6/sys_darwin.go
+++ b/vendor/golang.org/x/net/ipv6/sys_darwin.go
@@ -12,6 +12,7 @@ import (
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -20,17 +21,17 @@ var (
ctlPacketInfo: {sysIPV6_2292PKTINFO, sizeofInet6Pktinfo, marshal2292PacketInfo, parsePacketInfo},
}
- sockOpts = [ssoMax]sockOpt{
- ssoHopLimit: {iana.ProtocolIPv6, sysIPV6_UNICAST_HOPS, ssoTypeInt},
- ssoMulticastInterface: {iana.ProtocolIPv6, sysIPV6_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastHopLimit: {iana.ProtocolIPv6, sysIPV6_MULTICAST_HOPS, ssoTypeInt},
- ssoMulticastLoopback: {iana.ProtocolIPv6, sysIPV6_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveHopLimit: {iana.ProtocolIPv6, sysIPV6_2292HOPLIMIT, ssoTypeInt},
- ssoReceivePacketInfo: {iana.ProtocolIPv6, sysIPV6_2292PKTINFO, ssoTypeInt},
- ssoChecksum: {iana.ProtocolIPv6, sysIPV6_CHECKSUM, ssoTypeInt},
- ssoICMPFilter: {iana.ProtocolIPv6ICMP, sysICMP6_FILTER, ssoTypeICMPFilter},
- ssoJoinGroup: {iana.ProtocolIPv6, sysIPV6_JOIN_GROUP, ssoTypeIPMreq},
- ssoLeaveGroup: {iana.ProtocolIPv6, sysIPV6_LEAVE_GROUP, ssoTypeIPMreq},
+ sockOpts = map[int]*sockOpt{
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292HOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_2292PKTINFO, Len: 4}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
}
)
@@ -57,18 +58,18 @@ func init() {
ctlOpts[ctlPacketInfo] = ctlOpt{sysIPV6_PKTINFO, sizeofInet6Pktinfo, marshalPacketInfo, parsePacketInfo}
ctlOpts[ctlNextHop] = ctlOpt{sysIPV6_NEXTHOP, sizeofSockaddrInet6, marshalNextHop, parseNextHop}
ctlOpts[ctlPathMTU] = ctlOpt{sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU}
- sockOpts[ssoTrafficClass] = sockOpt{iana.ProtocolIPv6, sysIPV6_TCLASS, ssoTypeInt}
- sockOpts[ssoReceiveTrafficClass] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVTCLASS, ssoTypeInt}
- sockOpts[ssoReceiveHopLimit] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVHOPLIMIT, ssoTypeInt}
- sockOpts[ssoReceivePacketInfo] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVPKTINFO, ssoTypeInt}
- sockOpts[ssoReceivePathMTU] = sockOpt{iana.ProtocolIPv6, sysIPV6_RECVPATHMTU, ssoTypeInt}
- sockOpts[ssoPathMTU] = sockOpt{iana.ProtocolIPv6, sysIPV6_PATHMTU, ssoTypeMTUInfo}
- sockOpts[ssoJoinGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_JOIN_GROUP, ssoTypeGroupReq}
- sockOpts[ssoLeaveGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_LEAVE_GROUP, ssoTypeGroupReq}
- sockOpts[ssoJoinSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq}
- sockOpts[ssoLeaveSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq}
- sockOpts[ssoBlockSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq}
- sockOpts[ssoUnblockSourceGroup] = sockOpt{iana.ProtocolIPv6, sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq}
+ sockOpts[ssoTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}}
+ sockOpts[ssoReceiveTrafficClass] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}}
+ sockOpts[ssoReceiveHopLimit] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}}
+ sockOpts[ssoReceivePacketInfo] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}}
+ sockOpts[ssoReceivePathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}}
+ sockOpts[ssoPathMTU] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}}
+ sockOpts[ssoJoinGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
+ sockOpts[ssoLeaveGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq}
+ sockOpts[ssoJoinSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
+ sockOpts[ssoLeaveSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
+ sockOpts[ssoBlockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
+ sockOpts[ssoUnblockSourceGroup] = &sockOpt{Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq}
}
func (sa *sockaddrInet6) setSockaddr(ip net.IP, i int) {
diff --git a/vendor/golang.org/x/net/ipv6/sys_freebsd.go b/vendor/golang.org/x/net/ipv6/sys_freebsd.go
index fd5204beb..e9349dc2c 100644
--- a/vendor/golang.org/x/net/ipv6/sys_freebsd.go
+++ b/vendor/golang.org/x/net/ipv6/sys_freebsd.go
@@ -12,6 +12,7 @@ import (
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -23,25 +24,25 @@ var (
ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTrafficClass: {iana.ProtocolIPv6, sysIPV6_TCLASS, ssoTypeInt},
- ssoHopLimit: {iana.ProtocolIPv6, sysIPV6_UNICAST_HOPS, ssoTypeInt},
- ssoMulticastInterface: {iana.ProtocolIPv6, sysIPV6_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastHopLimit: {iana.ProtocolIPv6, sysIPV6_MULTICAST_HOPS, ssoTypeInt},
- ssoMulticastLoopback: {iana.ProtocolIPv6, sysIPV6_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTrafficClass: {iana.ProtocolIPv6, sysIPV6_RECVTCLASS, ssoTypeInt},
- ssoReceiveHopLimit: {iana.ProtocolIPv6, sysIPV6_RECVHOPLIMIT, ssoTypeInt},
- ssoReceivePacketInfo: {iana.ProtocolIPv6, sysIPV6_RECVPKTINFO, ssoTypeInt},
- ssoReceivePathMTU: {iana.ProtocolIPv6, sysIPV6_RECVPATHMTU, ssoTypeInt},
- ssoPathMTU: {iana.ProtocolIPv6, sysIPV6_PATHMTU, ssoTypeMTUInfo},
- ssoChecksum: {iana.ProtocolIPv6, sysIPV6_CHECKSUM, ssoTypeInt},
- ssoICMPFilter: {iana.ProtocolIPv6ICMP, sysICMP6_FILTER, ssoTypeICMPFilter},
- ssoJoinGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_GROUP, ssoTypeGroupReq},
- ssoLeaveGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_GROUP, ssoTypeGroupReq},
- ssoJoinSourceGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {iana.ProtocolIPv6, sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {iana.ProtocolIPv6, sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq},
+ sockOpts = map[int]sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
}
)
diff --git a/vendor/golang.org/x/net/ipv6/sys_linux.go b/vendor/golang.org/x/net/ipv6/sys_linux.go
index 42f5f7853..bc218103c 100644
--- a/vendor/golang.org/x/net/ipv6/sys_linux.go
+++ b/vendor/golang.org/x/net/ipv6/sys_linux.go
@@ -10,6 +10,7 @@ import (
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -20,25 +21,26 @@ var (
ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTrafficClass: {iana.ProtocolIPv6, sysIPV6_TCLASS, ssoTypeInt},
- ssoHopLimit: {iana.ProtocolIPv6, sysIPV6_UNICAST_HOPS, ssoTypeInt},
- ssoMulticastInterface: {iana.ProtocolIPv6, sysIPV6_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastHopLimit: {iana.ProtocolIPv6, sysIPV6_MULTICAST_HOPS, ssoTypeInt},
- ssoMulticastLoopback: {iana.ProtocolIPv6, sysIPV6_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTrafficClass: {iana.ProtocolIPv6, sysIPV6_RECVTCLASS, ssoTypeInt},
- ssoReceiveHopLimit: {iana.ProtocolIPv6, sysIPV6_RECVHOPLIMIT, ssoTypeInt},
- ssoReceivePacketInfo: {iana.ProtocolIPv6, sysIPV6_RECVPKTINFO, ssoTypeInt},
- ssoReceivePathMTU: {iana.ProtocolIPv6, sysIPV6_RECVPATHMTU, ssoTypeInt},
- ssoPathMTU: {iana.ProtocolIPv6, sysIPV6_PATHMTU, ssoTypeMTUInfo},
- ssoChecksum: {iana.ProtocolReserved, sysIPV6_CHECKSUM, ssoTypeInt},
- ssoICMPFilter: {iana.ProtocolIPv6ICMP, sysICMPV6_FILTER, ssoTypeICMPFilter},
- ssoJoinGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_GROUP, ssoTypeGroupReq},
- ssoLeaveGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_GROUP, ssoTypeGroupReq},
- ssoJoinSourceGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {iana.ProtocolIPv6, sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {iana.ProtocolIPv6, sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq},
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolReserved, Name: sysIPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMPV6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoAttachFilter: {Option: socket.Option{Level: sysSOL_SOCKET, Name: sysSO_ATTACH_FILTER, Len: sizeofSockFprog}},
}
)
diff --git a/vendor/golang.org/x/net/ipv6/sys_linux_386.s b/vendor/golang.org/x/net/ipv6/sys_linux_386.s
deleted file mode 100644
index b85551a5c..000000000
--- a/vendor/golang.org/x/net/ipv6/sys_linux_386.s
+++ /dev/null
@@ -1,8 +0,0 @@
-// 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.
-
-#include "textflag.h"
-
-TEXT ·socketcall(SB),NOSPLIT,$0-36
- JMP syscall·socketcall(SB)
diff --git a/vendor/golang.org/x/net/ipv6/sys_solaris.go b/vendor/golang.org/x/net/ipv6/sys_solaris.go
index 9bd2d66fd..d348b5f6e 100644
--- a/vendor/golang.org/x/net/ipv6/sys_solaris.go
+++ b/vendor/golang.org/x/net/ipv6/sys_solaris.go
@@ -10,6 +10,7 @@ import (
"unsafe"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
var (
@@ -21,25 +22,25 @@ var (
ctlPathMTU: {sysIPV6_PATHMTU, sizeofIPv6Mtuinfo, marshalPathMTU, parsePathMTU},
}
- sockOpts = [ssoMax]sockOpt{
- ssoTrafficClass: {iana.ProtocolIPv6, sysIPV6_TCLASS, ssoTypeInt},
- ssoHopLimit: {iana.ProtocolIPv6, sysIPV6_UNICAST_HOPS, ssoTypeInt},
- ssoMulticastInterface: {iana.ProtocolIPv6, sysIPV6_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastHopLimit: {iana.ProtocolIPv6, sysIPV6_MULTICAST_HOPS, ssoTypeInt},
- ssoMulticastLoopback: {iana.ProtocolIPv6, sysIPV6_MULTICAST_LOOP, ssoTypeInt},
- ssoReceiveTrafficClass: {iana.ProtocolIPv6, sysIPV6_RECVTCLASS, ssoTypeInt},
- ssoReceiveHopLimit: {iana.ProtocolIPv6, sysIPV6_RECVHOPLIMIT, ssoTypeInt},
- ssoReceivePacketInfo: {iana.ProtocolIPv6, sysIPV6_RECVPKTINFO, ssoTypeInt},
- ssoReceivePathMTU: {iana.ProtocolIPv6, sysIPV6_RECVPATHMTU, ssoTypeInt},
- ssoPathMTU: {iana.ProtocolIPv6, sysIPV6_PATHMTU, ssoTypeMTUInfo},
- ssoChecksum: {iana.ProtocolIPv6, sysIPV6_CHECKSUM, ssoTypeInt},
- ssoICMPFilter: {iana.ProtocolIPv6ICMP, sysICMP6_FILTER, ssoTypeICMPFilter},
- ssoJoinGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_GROUP, ssoTypeGroupReq},
- ssoLeaveGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_GROUP, ssoTypeGroupReq},
- ssoJoinSourceGroup: {iana.ProtocolIPv6, sysMCAST_JOIN_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoLeaveSourceGroup: {iana.ProtocolIPv6, sysMCAST_LEAVE_SOURCE_GROUP, ssoTypeGroupSourceReq},
- ssoBlockSourceGroup: {iana.ProtocolIPv6, sysMCAST_BLOCK_SOURCE, ssoTypeGroupSourceReq},
- ssoUnblockSourceGroup: {iana.ProtocolIPv6, sysMCAST_UNBLOCK_SOURCE, ssoTypeGroupSourceReq},
+ sockOpts = map[int]*sockOpt{
+ ssoTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_TCLASS, Len: 4}},
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
+ ssoReceiveTrafficClass: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVTCLASS, Len: 4}},
+ ssoReceiveHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVHOPLIMIT, Len: 4}},
+ ssoReceivePacketInfo: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPKTINFO, Len: 4}},
+ ssoReceivePathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_RECVPATHMTU, Len: 4}},
+ ssoPathMTU: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_PATHMTU, Len: sizeofIPv6Mtuinfo}},
+ ssoChecksum: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_CHECKSUM, Len: 4}},
+ ssoICMPFilter: {Option: socket.Option{Level: iana.ProtocolIPv6ICMP, Name: sysICMP6_FILTER, Len: sizeofICMPv6Filter}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_GROUP, Len: sizeofGroupReq}, typ: ssoTypeGroupReq},
+ ssoJoinSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_JOIN_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoLeaveSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_LEAVE_SOURCE_GROUP, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoBlockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_BLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
+ ssoUnblockSourceGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysMCAST_UNBLOCK_SOURCE, Len: sizeofGroupSourceReq}, typ: ssoTypeGroupSourceReq},
}
)
diff --git a/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go b/vendor/golang.org/x/net/ipv6/sys_ssmreq.go
similarity index 55%
rename from vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go
rename to vendor/golang.org/x/net/ipv6/sys_ssmreq.go
index f3668aefc..add8ccc0b 100644
--- a/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_unix.go
+++ b/vendor/golang.org/x/net/ipv6/sys_ssmreq.go
@@ -8,52 +8,47 @@ package ipv6
import (
"net"
- "os"
"unsafe"
+
+ "golang.org/x/net/internal/socket"
)
var freebsd32o64 bool
-func setsockoptGroupReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
var gr groupReq
if ifi != nil {
gr.Interface = uint32(ifi.Index)
}
gr.setGroup(grp)
- var p unsafe.Pointer
- var l uint32
+ var b []byte
if freebsd32o64 {
var d [sizeofGroupReq + 4]byte
s := (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))
copy(d[:4], s[:4])
copy(d[8:], s[4:])
- p = unsafe.Pointer(&d[0])
- l = sizeofGroupReq + 4
+ b = d[:]
} else {
- p = unsafe.Pointer(&gr)
- l = sizeofGroupReq
+ b = (*[sizeofGroupReq]byte)(unsafe.Pointer(&gr))[:sizeofGroupReq]
}
- return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, p, l))
+ return so.Set(c, b)
}
-func setsockoptGroupSourceReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp, src net.IP) error {
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
var gsr groupSourceReq
if ifi != nil {
gsr.Interface = uint32(ifi.Index)
}
gsr.setSourceGroup(grp, src)
- var p unsafe.Pointer
- var l uint32
+ var b []byte
if freebsd32o64 {
var d [sizeofGroupSourceReq + 4]byte
s := (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))
copy(d[:4], s[:4])
copy(d[8:], s[4:])
- p = unsafe.Pointer(&d[0])
- l = sizeofGroupSourceReq + 4
+ b = d[:]
} else {
- p = unsafe.Pointer(&gsr)
- l = sizeofGroupSourceReq
+ b = (*[sizeofGroupSourceReq]byte)(unsafe.Pointer(&gsr))[:sizeofGroupSourceReq]
}
- return os.NewSyscallError("setsockopt", setsockopt(s, opt.level, opt.name, p, l))
+ return so.Set(c, b)
}
diff --git a/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go b/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go
similarity index 52%
rename from vendor/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go
rename to vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go
index 1a8829092..581ee490f 100644
--- a/vendor/golang.org/x/net/ipv6/sockopt_ssmreq_stub.go
+++ b/vendor/golang.org/x/net/ipv6/sys_ssmreq_stub.go
@@ -6,12 +6,16 @@
package ipv6
-import "net"
+import (
+ "net"
-func setsockoptGroupReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp net.IP) error {
+ "golang.org/x/net/internal/socket"
+)
+
+func (so *sockOpt) setGroupReq(c *socket.Conn, ifi *net.Interface, grp net.IP) error {
return errOpNoSupport
}
-func setsockoptGroupSourceReq(s uintptr, opt *sockOpt, ifi *net.Interface, grp, src net.IP) error {
+func (so *sockOpt) setGroupSourceReq(c *socket.Conn, ifi *net.Interface, grp, src net.IP) error {
return errOpNoSupport
}
diff --git a/vendor/golang.org/x/net/ipv6/sys_stub.go b/vendor/golang.org/x/net/ipv6/sys_stub.go
index 7663bfc09..b845388ea 100644
--- a/vendor/golang.org/x/net/ipv6/sys_stub.go
+++ b/vendor/golang.org/x/net/ipv6/sys_stub.go
@@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// +build nacl plan9
+// +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris,!windows
package ipv6
var (
ctlOpts = [ctlMax]ctlOpt{}
- sockOpts = [ssoMax]sockOpt{}
+ sockOpts = map[int]*sockOpt{}
)
diff --git a/vendor/golang.org/x/net/ipv6/sys_windows.go b/vendor/golang.org/x/net/ipv6/sys_windows.go
index 003c507d5..fc36b018b 100644
--- a/vendor/golang.org/x/net/ipv6/sys_windows.go
+++ b/vendor/golang.org/x/net/ipv6/sys_windows.go
@@ -9,6 +9,7 @@ import (
"syscall"
"golang.org/x/net/internal/iana"
+ "golang.org/x/net/internal/socket"
)
const (
@@ -53,13 +54,13 @@ type icmpv6Filter struct {
var (
ctlOpts = [ctlMax]ctlOpt{}
- sockOpts = [ssoMax]sockOpt{
- ssoHopLimit: {iana.ProtocolIPv6, sysIPV6_UNICAST_HOPS, ssoTypeInt},
- ssoMulticastInterface: {iana.ProtocolIPv6, sysIPV6_MULTICAST_IF, ssoTypeInterface},
- ssoMulticastHopLimit: {iana.ProtocolIPv6, sysIPV6_MULTICAST_HOPS, ssoTypeInt},
- ssoMulticastLoopback: {iana.ProtocolIPv6, sysIPV6_MULTICAST_LOOP, ssoTypeInt},
- ssoJoinGroup: {iana.ProtocolIPv6, sysIPV6_JOIN_GROUP, ssoTypeIPMreq},
- ssoLeaveGroup: {iana.ProtocolIPv6, sysIPV6_LEAVE_GROUP, ssoTypeIPMreq},
+ sockOpts = map[int]*sockOpt{
+ ssoHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_UNICAST_HOPS, Len: 4}},
+ ssoMulticastInterface: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_IF, Len: 4}},
+ ssoMulticastHopLimit: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_HOPS, Len: 4}},
+ ssoMulticastLoopback: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_MULTICAST_LOOP, Len: 4}},
+ ssoJoinGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_JOIN_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
+ ssoLeaveGroup: {Option: socket.Option{Level: iana.ProtocolIPv6, Name: sysIPV6_LEAVE_GROUP, Len: sizeofIPv6Mreq}, typ: ssoTypeIPMreq},
}
)
diff --git a/vendor/golang.org/x/net/ipv6/syscall_linux_386.go b/vendor/golang.org/x/net/ipv6/syscall_linux_386.go
deleted file mode 100644
index 5184dbe88..000000000
--- a/vendor/golang.org/x/net/ipv6/syscall_linux_386.go
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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 ipv6
-
-import (
- "syscall"
- "unsafe"
-)
-
-const (
- sysGETSOCKOPT = 0xf
- sysSETSOCKOPT = 0xe
-)
-
-func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (int, syscall.Errno)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- if _, errno := socketcall(sysGETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- if _, errno := socketcall(sysSETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv6/syscall_solaris.go b/vendor/golang.org/x/net/ipv6/syscall_solaris.go
deleted file mode 100644
index 2a5c8ee47..000000000
--- a/vendor/golang.org/x/net/ipv6/syscall_solaris.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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 ipv6
-
-import (
- "syscall"
- "unsafe"
-)
-
-//go:cgo_import_dynamic libc___xnet_getsockopt __xnet_getsockopt "libsocket.so"
-//go:cgo_import_dynamic libc_setsockopt setsockopt "libsocket.so"
-
-//go:linkname procGetsockopt libc___xnet_getsockopt
-//go:linkname procSetsockopt libc_setsockopt
-
-var (
- procGetsockopt uintptr
- procSetsockopt uintptr
-)
-
-func sysvicall6(trap, nargs, a1, a2, a3, a4, a5, a6 uintptr) (uintptr, uintptr, syscall.Errno)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procGetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0)
- if errno != 0 {
- return error(errno)
- }
- return nil
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- if _, _, errno := sysvicall6(uintptr(unsafe.Pointer(&procSetsockopt)), 5, s, uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv6/syscall_unix.go b/vendor/golang.org/x/net/ipv6/syscall_unix.go
deleted file mode 100644
index 58a75b528..000000000
--- a/vendor/golang.org/x/net/ipv6/syscall_unix.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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.
-
-// +build darwin dragonfly freebsd linux,!386 netbsd openbsd
-
-package ipv6
-
-import (
- "syscall"
- "unsafe"
-)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- if _, _, errno := syscall.Syscall6(syscall.SYS_GETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(unsafe.Pointer(l)), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- if _, _, errno := syscall.Syscall6(syscall.SYS_SETSOCKOPT, s, uintptr(level), uintptr(name), uintptr(v), uintptr(l), 0); errno != 0 {
- return error(errno)
- }
- return nil
-}
diff --git a/vendor/golang.org/x/net/ipv6/syscall_windows.go b/vendor/golang.org/x/net/ipv6/syscall_windows.go
deleted file mode 100644
index c1f649d38..000000000
--- a/vendor/golang.org/x/net/ipv6/syscall_windows.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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 ipv6
-
-import (
- "syscall"
- "unsafe"
-)
-
-func getsockopt(s uintptr, level, name int, v unsafe.Pointer, l *uint32) error {
- return syscall.Getsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(v), (*int32)(unsafe.Pointer(l)))
-}
-
-func setsockopt(s uintptr, level, name int, v unsafe.Pointer, l uint32) error {
- return syscall.Setsockopt(syscall.Handle(s), int32(level), int32(name), (*byte)(v), int32(l))
-}
diff --git a/vendor/golang.org/x/net/ipv6/unicast_test.go b/vendor/golang.org/x/net/ipv6/unicast_test.go
index 406d07128..a0b7d9550 100644
--- a/vendor/golang.org/x/net/ipv6/unicast_test.go
+++ b/vendor/golang.org/x/net/ipv6/unicast_test.go
@@ -27,7 +27,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
t.Skip("ipv6 is not supported")
}
- c, err := net.ListenPacket("udp6", "[::1]:0")
+ c, err := nettest.NewLocalPacketListener("udp6")
if err != nil {
t.Fatal(err)
}
@@ -35,11 +35,7 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
p := ipv6.NewPacketConn(c)
defer p.Close()
- dst, err := net.ResolveUDPAddr("udp6", c.LocalAddr().String())
- if err != nil {
- t.Fatal(err)
- }
-
+ dst := c.LocalAddr()
cm := ipv6.ControlMessage{
TrafficClass: iana.DiffServAF11 | iana.CongestionExperienced,
Src: net.IPv6loopback,
@@ -54,7 +50,8 @@ func TestPacketConnReadWriteUnicastUDP(t *testing.T) {
for i, toggle := range []bool{true, false, true} {
if err := p.SetControlMessage(cf, toggle); err != nil {
if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
+ t.Logf("not supported on %s", runtime.GOOS)
+ continue
}
t.Fatal(err)
}
@@ -151,7 +148,8 @@ func TestPacketConnReadWriteUnicastICMP(t *testing.T) {
}
if err := p.SetControlMessage(cf, toggle); err != nil {
if nettest.ProtocolNotSupported(err) {
- t.Skipf("not supported on %s", runtime.GOOS)
+ t.Logf("not supported on %s", runtime.GOOS)
+ continue
}
t.Fatal(err)
}
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_386.go b/vendor/golang.org/x/net/ipv6/zsys_linux_386.go
index f5a410945..73aa8c6df 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_386.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_386.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go
index f9376b65c..b64f0157d 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_amd64.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go b/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go
index f5a410945..73aa8c6df 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_arm.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go
index f9376b65c..b64f0157d 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_arm64.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go
index f5a410945..73aa8c6df 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mips.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go
index f9376b65c..b64f0157d 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go
index f9376b65c..b64f0157d 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mips64le.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go b/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go
index f5a410945..73aa8c6df 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_mipsle.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go
index be2dbd666..c9bf6a87e 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x104
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x8
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go
index f9376b65c..b64f0157d 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go
index f9376b65c..b64f0157d 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_ppc64le.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go b/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go
index f9376b65c..b64f0157d 100644
--- a/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go
+++ b/vendor/golang.org/x/net/ipv6/zsys_linux_s390x.go
@@ -98,6 +98,8 @@ const (
sizeofGroupSourceReq = 0x108
sizeofICMPv6Filter = 0x20
+
+ sizeofSockFprog = 0x10
)
type kernelSockaddrStorage struct {
diff --git a/vendor/golang.org/x/net/lif/address_test.go b/vendor/golang.org/x/net/lif/address_test.go
index f62ed9347..a25f10b67 100644
--- a/vendor/golang.org/x/net/lif/address_test.go
+++ b/vendor/golang.org/x/net/lif/address_test.go
@@ -78,15 +78,17 @@ type addrPack struct {
}
func addrPacks() ([]addrPack, error) {
+ var lastErr error
var aps []addrPack
for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
as, err := Addrs(af, "")
if err != nil {
- return nil, err
+ lastErr = err
+ continue
}
aps = append(aps, addrPack{af: af, as: as})
}
- return aps, nil
+ return aps, lastErr
}
func TestAddrs(t *testing.T) {
diff --git a/vendor/golang.org/x/net/lif/defs_solaris.go b/vendor/golang.org/x/net/lif/defs_solaris.go
index 8b84ba5e3..02c19981d 100644
--- a/vendor/golang.org/x/net/lif/defs_solaris.go
+++ b/vendor/golang.org/x/net/lif/defs_solaris.go
@@ -75,7 +75,7 @@ const (
sizeofLifIfinfoReq = C.sizeof_struct_lif_ifinfo_req
)
-type sysLifnum C.struct_lifnum
+type lifnum C.struct_lifnum
type lifreq C.struct_lifreq
diff --git a/vendor/golang.org/x/net/lif/link.go b/vendor/golang.org/x/net/lif/link.go
index fce6b2147..913a53e11 100644
--- a/vendor/golang.org/x/net/lif/link.go
+++ b/vendor/golang.org/x/net/lif/link.go
@@ -70,7 +70,7 @@ func Links(af int, name string) ([]Link, error) {
func links(eps []endpoint, name string) ([]Link, error) {
var lls []Link
- lifn := sysLifnum{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP}
+ lifn := lifnum{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP}
lifc := lifconf{Flags: sysLIFC_NOXMIT | sysLIFC_TEMPORARY | sysLIFC_ALLZONES | sysLIFC_UNDER_IPMP}
for _, ep := range eps {
lifn.Family = uint16(ep.af)
diff --git a/vendor/golang.org/x/net/lif/link_test.go b/vendor/golang.org/x/net/lif/link_test.go
index 8fb2bf6f3..0cb9b95c6 100644
--- a/vendor/golang.org/x/net/lif/link_test.go
+++ b/vendor/golang.org/x/net/lif/link_test.go
@@ -21,15 +21,17 @@ type linkPack struct {
}
func linkPacks() ([]linkPack, error) {
+ var lastErr error
var lps []linkPack
for _, af := range [...]int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
lls, err := Links(af, "")
if err != nil {
- return nil, err
+ lastErr = err
+ continue
}
lps = append(lps, linkPack{af: af, lls: lls})
}
- return lps, nil
+ return lps, lastErr
}
func TestLinks(t *testing.T) {
diff --git a/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go b/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go
index 94231c49c..b5e999bec 100644
--- a/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go
+++ b/vendor/golang.org/x/net/lif/zsys_solaris_amd64.go
@@ -65,7 +65,7 @@ const (
sizeofLifIfinfoReq = 0x10
)
-type sysLifnum struct {
+type lifnum struct {
Family uint16
Pad_cgo_0 [2]byte
Flags int32
diff --git a/vendor/golang.org/x/net/nettest/conntest.go b/vendor/golang.org/x/net/nettest/conntest.go
index c246bbe39..5bd3a8c68 100644
--- a/vendor/golang.org/x/net/nettest/conntest.go
+++ b/vendor/golang.org/x/net/nettest/conntest.go
@@ -12,6 +12,7 @@ import (
"io/ioutil"
"math/rand"
"net"
+ "runtime"
"sync"
"testing"
"time"
@@ -341,6 +342,9 @@ func testCloseTimeout(t *testing.T, c1, c2 net.Conn) {
// testConcurrentMethods tests that the methods of net.Conn can safely
// be called concurrently.
func testConcurrentMethods(t *testing.T, c1, c2 net.Conn) {
+ if runtime.GOOS == "plan9" {
+ t.Skip("skipping on plan9; see https://golang.org/issue/20489")
+ }
go chunkedCopy(c2, c2)
// The results of the calls may be nonsensical, but this should
@@ -433,6 +437,7 @@ func resyncConn(t *testing.T, c net.Conn) {
}
if err != nil {
t.Errorf("unexpected Read error: %v", err)
+ break
}
}
if err := <-errCh; err != nil {
diff --git a/vendor/golang.org/x/net/proxy/per_host.go b/vendor/golang.org/x/net/proxy/per_host.go
index f540b196f..242d5623f 100644
--- a/vendor/golang.org/x/net/proxy/per_host.go
+++ b/vendor/golang.org/x/net/proxy/per_host.go
@@ -9,7 +9,7 @@ import (
"strings"
)
-// A PerHost directs connections to a default Dialer unless the hostname
+// A PerHost directs connections to a default Dialer unless the host name
// requested matches one of a number of exceptions.
type PerHost struct {
def, bypass Dialer
@@ -76,7 +76,7 @@ func (p *PerHost) dialerForRequest(host string) Dialer {
// AddFromString parses a string that contains comma-separated values
// specifying hosts that should use the bypass proxy. Each value is either an
-// IP address, a CIDR range, a zone (*.example.com) or a hostname
+// IP address, a CIDR range, a zone (*.example.com) or a host name
// (localhost). A best effort is made to parse the string and errors are
// ignored.
func (p *PerHost) AddFromString(s string) {
@@ -131,7 +131,7 @@ func (p *PerHost) AddZone(zone string) {
p.bypassZones = append(p.bypassZones, zone)
}
-// AddHost specifies a hostname that will use the bypass proxy.
+// AddHost specifies a host name that will use the bypass proxy.
func (p *PerHost) AddHost(host string) {
if strings.HasSuffix(host, ".") {
host = host[:len(host)-1]
diff --git a/vendor/golang.org/x/net/proxy/proxy.go b/vendor/golang.org/x/net/proxy/proxy.go
index 78a8b7bee..553ead7cf 100644
--- a/vendor/golang.org/x/net/proxy/proxy.go
+++ b/vendor/golang.org/x/net/proxy/proxy.go
@@ -11,6 +11,7 @@ import (
"net"
"net/url"
"os"
+ "sync"
)
// A Dialer is a means to establish a connection.
@@ -27,7 +28,7 @@ type Auth struct {
// FromEnvironment returns the dialer specified by the proxy related variables in
// the environment.
func FromEnvironment() Dialer {
- allProxy := os.Getenv("all_proxy")
+ allProxy := allProxyEnv.Get()
if len(allProxy) == 0 {
return Direct
}
@@ -41,7 +42,7 @@ func FromEnvironment() Dialer {
return Direct
}
- noProxy := os.Getenv("no_proxy")
+ noProxy := noProxyEnv.Get()
if len(noProxy) == 0 {
return proxy
}
@@ -92,3 +93,42 @@ func FromURL(u *url.URL, forward Dialer) (Dialer, error) {
return nil, errors.New("proxy: unknown scheme: " + u.Scheme)
}
+
+var (
+ allProxyEnv = &envOnce{
+ names: []string{"ALL_PROXY", "all_proxy"},
+ }
+ noProxyEnv = &envOnce{
+ names: []string{"NO_PROXY", "no_proxy"},
+ }
+)
+
+// envOnce looks up an environment variable (optionally by multiple
+// names) once. It mitigates expensive lookups on some platforms
+// (e.g. Windows).
+// (Borrowed from net/http/transport.go)
+type envOnce struct {
+ names []string
+ once sync.Once
+ val string
+}
+
+func (e *envOnce) Get() string {
+ e.once.Do(e.init)
+ return e.val
+}
+
+func (e *envOnce) init() {
+ for _, n := range e.names {
+ e.val = os.Getenv(n)
+ if e.val != "" {
+ return
+ }
+ }
+}
+
+// reset is used by tests
+func (e *envOnce) reset() {
+ e.once = sync.Once{}
+ e.val = ""
+}
diff --git a/vendor/golang.org/x/net/proxy/proxy_test.go b/vendor/golang.org/x/net/proxy/proxy_test.go
index c19a5c063..0f31e211c 100644
--- a/vendor/golang.org/x/net/proxy/proxy_test.go
+++ b/vendor/golang.org/x/net/proxy/proxy_test.go
@@ -5,14 +5,73 @@
package proxy
import (
+ "bytes"
+ "fmt"
"io"
"net"
"net/url"
+ "os"
"strconv"
+ "strings"
"sync"
"testing"
)
+type proxyFromEnvTest struct {
+ allProxyEnv string
+ noProxyEnv string
+ wantTypeOf Dialer
+}
+
+func (t proxyFromEnvTest) String() string {
+ var buf bytes.Buffer
+ space := func() {
+ if buf.Len() > 0 {
+ buf.WriteByte(' ')
+ }
+ }
+ if t.allProxyEnv != "" {
+ fmt.Fprintf(&buf, "all_proxy=%q", t.allProxyEnv)
+ }
+ if t.noProxyEnv != "" {
+ space()
+ fmt.Fprintf(&buf, "no_proxy=%q", t.noProxyEnv)
+ }
+ return strings.TrimSpace(buf.String())
+}
+
+func TestFromEnvironment(t *testing.T) {
+ ResetProxyEnv()
+
+ type dummyDialer struct {
+ direct
+ }
+
+ RegisterDialerType("irc", func(_ *url.URL, _ Dialer) (Dialer, error) {
+ return dummyDialer{}, nil
+ })
+
+ proxyFromEnvTests := []proxyFromEnvTest{
+ {allProxyEnv: "127.0.0.1:8080", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}},
+ {allProxyEnv: "ftp://example.com:8000", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}},
+ {allProxyEnv: "socks5://example.com:8080", noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: &PerHost{}},
+ {allProxyEnv: "irc://example.com:8000", wantTypeOf: dummyDialer{}},
+ {noProxyEnv: "localhost, 127.0.0.1", wantTypeOf: direct{}},
+ {wantTypeOf: direct{}},
+ }
+
+ for _, tt := range proxyFromEnvTests {
+ os.Setenv("ALL_PROXY", tt.allProxyEnv)
+ os.Setenv("NO_PROXY", tt.noProxyEnv)
+ ResetCachedEnvironment()
+
+ d := FromEnvironment()
+ if got, want := fmt.Sprintf("%T", d), fmt.Sprintf("%T", tt.wantTypeOf); got != want {
+ t.Errorf("%v: got type = %T, want %T", tt, d, tt.wantTypeOf)
+ }
+ }
+}
+
func TestFromURL(t *testing.T) {
endSystem, err := net.Listen("tcp", "127.0.0.1:0")
if err != nil {
@@ -140,3 +199,17 @@ func socks5Gateway(t *testing.T, gateway, endSystem net.Listener, typ byte, wg *
return
}
}
+
+func ResetProxyEnv() {
+ for _, env := range []*envOnce{allProxyEnv, noProxyEnv} {
+ for _, v := range env.names {
+ os.Setenv(v, "")
+ }
+ }
+ ResetCachedEnvironment()
+}
+
+func ResetCachedEnvironment() {
+ allProxyEnv.reset()
+ noProxyEnv.reset()
+}
diff --git a/vendor/golang.org/x/net/proxy/socks5.go b/vendor/golang.org/x/net/proxy/socks5.go
index 973f57f19..2efec6e8d 100644
--- a/vendor/golang.org/x/net/proxy/socks5.go
+++ b/vendor/golang.org/x/net/proxy/socks5.go
@@ -154,7 +154,7 @@ func (s *socks5) connect(conn net.Conn, target string) error {
buf = append(buf, ip...)
} else {
if len(host) > 255 {
- return errors.New("proxy: destination hostname too long: " + host)
+ return errors.New("proxy: destination host name too long: " + host)
}
buf = append(buf, socks5Domain)
buf = append(buf, byte(len(host)))
diff --git a/vendor/golang.org/x/net/publicsuffix/list_test.go b/vendor/golang.org/x/net/publicsuffix/list_test.go
index a08e64eaf..42d79cc43 100644
--- a/vendor/golang.org/x/net/publicsuffix/list_test.go
+++ b/vendor/golang.org/x/net/publicsuffix/list_test.go
@@ -216,13 +216,13 @@ var publicSuffixTestCases = []struct {
{"aaa.xn--p1ai", "xn--p1ai"},
{"www.xxx.yyy.xn--p1ai", "xn--p1ai"},
- // The .zw rules are:
- // *.zw
- {"zw", "zw"},
- {"www.zw", "www.zw"},
- {"zzz.zw", "zzz.zw"},
- {"www.zzz.zw", "zzz.zw"},
- {"www.xxx.yyy.zzz.zw", "zzz.zw"},
+ // The .bd rules are:
+ // *.bd
+ {"bd", "bd"},
+ {"www.bd", "www.bd"},
+ {"zzz.bd", "zzz.bd"},
+ {"www.zzz.bd", "zzz.bd"},
+ {"www.xxx.yyy.zzz.bd", "zzz.bd"},
// There are no .nosuchtld rules.
{"nosuchtld", "nosuchtld"},
diff --git a/vendor/golang.org/x/net/publicsuffix/table.go b/vendor/golang.org/x/net/publicsuffix/table.go
index 5db1e6986..50f070a92 100644
--- a/vendor/golang.org/x/net/publicsuffix/table.go
+++ b/vendor/golang.org/x/net/publicsuffix/table.go
@@ -2,7 +2,7 @@
package publicsuffix
-const version = "publicsuffix.org's public_suffix_list.dat, git revision 45a2bf8ef3e22000fbe4bfa5f9252db41d777001 (2017-01-18T01:04:06Z)"
+const version = "publicsuffix.org's public_suffix_list.dat, git revision f47d806df99585862c8426c3e064a50eb5a278f5 (2017-06-14T11:49:01Z)"
const (
nodesBitsChildren = 9
@@ -23,447 +23,453 @@ const (
)
// numTLD is the number of top level domains.
-const numTLD = 1554
+const numTLD = 1549
// Text is the combined text of all labels.
-const text = "bikedagestangeorgeorgiaxagrocerybnikahokutobishimaizuruhreportar" +
- "nobrzegyptianaturalhistorymuseumcentereviewskrakoweddinggfarmers" +
- "einexus-2bilbaogakievenesalangenikiiyamanouchikuhokuryugasakitau" +
- "rayasudabillustrationikkoebenhavnikolaevennodessagamiharabiomuta" +
- "shinainfinitintuitattoolsztynsettlersalondonetskarpaczeladzjcbre" +
- "mangerbirdartcenterprisesakikuchikuseikarugapartmentsaltdalimoli" +
- "serniabirkenesoddtangenovaravennagasukeverbankaruizawabirthplace" +
- "vje-og-hornnesalvadordalibabajddarchaeologyusuisserveexchangebja" +
- "rkoyuufcfanikonantanangerbjerkreimbalsanagochihayaakasakawaharau" +
- "malopolskanlandds3-us-west-1bjugninohekinannestadrangedalindasda" +
- "burblockbusternidray-dnsupdaterbloombergbauerninomiyakonojosoyro" +
- "rosalzburgjovikarumaifarmsteadraydnsamegawabloxcmsamnangerblueda" +
- "ncebmoattachmentsamsclubindalindesnesamsungladell-ogliastraderbm" +
- "sandvikcoromantovalle-d-aostatic-accessanfranciscofreakunemurora" +
- "ngeiseiyoichiropracticasinordre-landrivelandrobaknoluoktabuseekl" +
- "ogesurancertmgretachikawakkanaibetsubamericanfamilydscloudcontro" +
- "lledekafjordrudunsangoppdalivornobmweirbnpparibaselburglassassin" +
- "ationalheritagematsubarakawagoebnrwfarsundupontariobonnirasakinu" +
- "yamashinashikitchenishiazainvestmentsanjournalismailillesandefjo" +
- "rdurbanamexhibitionishigobookingliwicebootsannanishiharaboschaef" +
- "flerdalomzaporizhzhegurinzais-a-bulls-fanishiizunazukis-a-candid" +
- "atebostikasaokamiminersannohelplfinancialorenskoglobalashovhachi" +
- "nohedmarkashibatakasakiyokawarabostonakijinsekikogentinglobodoes" +
- "-itvedestrandurhamburglogowhalingloppenzaogashimadachicagoboatsa" +
- "nokashiharabotanicalgardenishikatakayamatta-varjjataxihuanishika" +
- "tsuragithubusercontentgoryuzawabotanicgardenishikawazukamitondab" +
- "ayashiogamagoriziabotanybouncemerckmsdnipropetrovskjakdnepropetr" +
- "ovskiervaapsteiermarkashiwarabounty-fullensakerrypropertiesantab" +
- "arbaraboutiquebecngmbhartiffanybozentsujiiebradescorporationishi" +
- "merabrandywinevalleybrasiliabresciabrindisibenikebristoloslocalh" +
- "istoryggeelvinckashiwazakiyosatokashikiyosemitebritishcolumbialo" +
- "wiezachpomorskienishinomiyashironobroadcastlefrakkestadvrcambrid" +
- "gestonextdirectjeldsundvrdnsantacruzsantafedextraspacekitagataji" +
- "rittogoldpoint2thisamitsukebroadwaybroke-itjmaxxxboxenapponazure" +
- "-mobilebrokerbronnoysundwgminakamichiharabrothermesaverdeatnurem" +
- "bergmodellingmxfinitybrowsersafetymarketsanukis-a-catererbrumund" +
- "dalotenkawabrunelasticbeanstalkasukabedzin-the-bandaikawachinaga" +
- "noharamcoalaskanittedallasalleasinglest-mon-blogueurovisionthewi" +
- "fiat-band-campaniabrusselsaotomemergencyberlevagangaviikanonjis-" +
- "a-celticsfanishinoomotegobruxellesapodlasiellakasamatsudovre-eik" +
- "erbryanskjervoyagebrynewhampshirebungoonordlandyndns-at-workingg" +
- "roupalacebuskerudinewjerseybuzenishinoshimattelefonicarbonia-igl" +
- "esias-carboniaiglesiascarboniabuzzlgrimstadyndns-blogdnsapporobw" +
- "hoswhokksundyndns-freebox-ostrowiecateringebuilderschmidtre-gaul" +
- "dalottebzhitomirumalselvendrellottokonamegatakasugais-a-chefashi" +
- "onishiokoppegardyndns-homednsardegnamsskoganeis-a-conservativefs" +
- "nillfjordyndns-ipaleocondoshichinohealth-carereformitakeharaconf" +
- "erenceconstructionconsuladoesntexistanbullensvanguardyndns-wikin" +
- "dlegokasells-for-lessaudaconsultanthropologyconsultingvolluxuryc" +
- "ontactoyookanmakiwakunigamifunecontemporaryarteducationalchikugo" +
- "doharuovatoyosatoyakokonoecontractorskenconventureshinodesashibe" +
- "tsuikinderoycookingchannelblagdenesnaaseralingenkainanaejrietisa" +
- "latinabenonichernihivanovodkagoshimalvikasumigaurawa-mazowszexjc" +
- "palermomahachijorpelandyndns-mailouvreisenishitosashimizunaminam" +
- "iashigaracoolkuszkoladbrokesauheradyndns-workisboringrpamperedch" +
- "efastlylbaltimore-og-romsdalwaysdatabaseballangenoamishirasatoch" +
- "igiessenebakkeshibechambagriculturennebudejjudygarlandigitalavan" +
- "genavigationavuotnaklodzkodairamusementarumizusawabruzzoologyeon" +
- "gbuk12cooperaunitemasekatsushikabeeldengeluidyndns1copenhagencyc" +
- "lopedichernivtsiciliacorsicagliarightathomeftpanamacorvettenriku" +
- "zentakataitogliattiresavannahgacosenzaganquannakadomaritimekeepi" +
- "ngatlantaijis-a-financialadvisor-aurdaluzerncosidnsfor-better-th" +
- "anawawildlifedjeffersoncostumedio-campidano-mediocampidanomedioc" +
- "ouchpotatofriesaves-the-whalessandria-trani-barletta-andriatrani" +
- "barlettaandriacouncilvivano-frankivskatsuyamasfjordencouponsavon" +
- "aplesaxocoursesbschokoladencq-acranbrookuwanalyticscholarshipsch" +
- "oolcreditcardynnschulezajskydivingruecreditunioncremonashorokana" +
- "iecrewilliamhillcricketrzyncrimeastcoastaldefencecrotonewyorkshi" +
- "recipesaro-urbino-pesarourbinopesaromasvuotnaharimamurogawacrown" +
- "providercrsvpanasonichernovtsykkylvenetogakushimotoganewportllig" +
- "atjxn--0trq7p7nnishiwakis-a-cpadoval-daostavalleycruiseschwarzgw" +
- "angjuegoshikiminokamoenairtraffichiryukyuragifuchungbukasuyaltak" +
- "ashimaseratis-a-cubicle-slavellinowtvalleaostatoilowiczest-le-pa" +
- "trondheimmobilienissandnessjoenissayokoshibahikariwanumatakazaki" +
- "s-a-democratkmaxxn--11b4c3dyndns-office-on-the-webcampobassociat" +
- "esardiniacryptonomichigangwoncuisinellahppiacenzakopanerairguard" +
- "ynv6culturalcentertainmentoyotaris-a-geekgalaxycuneocupcakecxn--" +
- "1ctwolominamatakkokaminokawanishiaizubangecymrussiacyonabarulsan" +
- "doycyouthdfcbankaufenfiguerestaurantoyotomiyazakis-a-greenfilate" +
- "liafilminamiawajikis-a-guruslivinghistoryfinalfinancefineartscie" +
- "ntistoragefinlandfinnoyfirebaseapparliamentoyotsukaidownloadfire" +
- "nzefirestonefirmdaleirfjordfishingolffanscjohnsonfitjarqhachioji" +
- "yahikobeatscotlandfitnessettlementoyourafjalerflesbergushikamifu" +
- "ranoshiroomuraflickragerotikakamigaharaflightscrapper-siteflirfl" +
- "ogintogurafloraflorencefloridavvesiidazaifudaigojomedizinhistori" +
- "schescrappingxn--1lqs71dfloristanohatakahamaniwakuratexascolipic" +
- "enord-aurdalipayflorogerserveftparmaflowerservegame-serversaille" +
- "servehalflifestyleflynnhubambleclercartoonartdecoldwarmiamibugat" +
- "tipschlesisches3-us-west-2fndfoodnetworkshoppingfor-ourfor-somee" +
- "thnologyfor-theaterforexrothruherecreationforgotdnservehttparoch" +
- "erkasyno-dservehumourforli-cesena-forlicesenaforlikescandynamic-" +
- "dnserveirchitachinakagawatchandclockaszubyforsaleirvikazoforsand" +
- "asuoloftoystre-slidrettozawafortmissoulair-traffic-controlleyfor" +
- "tworthachirogatakahatakaishimogosenforuminamibosogndalfosneserve" +
- "minecraftozsdev-myqnapcloudcontrolappspotagerfotaruis-a-hard-wor" +
- "kerfoxfordedyn-ip24freeboxoservemp3utilitiesquarezzoologicalvink" +
- "lein-addrammenuernbergdyniabogadocscbnl-o-g-i-nativeamericananti" +
- "ques3-ap-northeast-1kappchizippodhaleangaviikadenadexeterepbodyn" +
- "athomebuilt3l3p0rtargets-itargiving12000emmafanconagawakayamadri" +
- "dvagsoyericssonyoursidealerimo-i-ranaamesjevuemielno-ip6freemaso" +
- "nryfreiburgfreightcminamidaitomangotsukisosakitagawafreseniuscou" +
- "ntryestateofdelawaredstonefribourgfriuli-v-giuliafriuli-ve-giuli" +
- "afriuli-vegiuliafriuli-venezia-giuliafriuli-veneziagiuliafriuli-" +
- "vgiuliafriuliv-giuliafriulive-giuliafriulivegiuliafriulivenezia-" +
- "giuliafriuliveneziagiuliafriulivgiuliafrlfroganservep2parservepi" +
- "cservequakefrognfrolandfrom-akrehamnfrom-alfrom-arfrom-azwinbana" +
- "narepublicasadelamonedatsunanjoburgjerstadotsuruokakegawasnesodd" +
- "enmarkhangelskiptveterinairealtychyattorneyagawalmartatamotors3-" +
- "ap-south-1from-capebretonamiastapleservesarcasmatartanddesignfro" +
- "m-collectionfrom-ctrani-andria-barletta-trani-andriafrom-dchitos" +
- "etogitsuldalucaniafrom-defenseljordfrom-flanderservicesettsurgeo" +
- "nshalloffamemorialfrom-gausdalfrom-higashiagatsumagoizumizakiraf" +
- "rom-iafrom-idfrom-ilfrom-incheonfrom-ksevastopolefrom-kyowariasa" +
- "hikawafrom-lajollamericanexpressexyfrom-mannortonsbergfrom-mdfro" +
- "m-megurokunohealthcareersevenassisicilyfrom-midoris-a-hunterfrom" +
- "-mnfrom-mochizukirkenesewindmillfrom-msfranziskanerdpolicefrom-m" +
- "tnfrom-nchloefrom-ndfrom-nefrom-nhktraniandriabarlettatraniandri" +
- "afrom-njelenia-gorafrom-nminamiechizenfrom-nvalled-aostavangerfr" +
- "om-nyfrom-ohkurafrom-oketohmansionshangrilanciafrom-orfrom-pader" +
- "bornfrom-pratohnoshoooshikamaishimodatextileitungsenfrom-ris-a-k" +
- "nightpointtokaizukameokameyamatotakadafrom-schoenbrunnfrom-sdfro" +
- "m-tnfrom-txn--1qqw23afrom-utazuerichardlillehammerfeste-ipartis-" +
- "a-landscaperfrom-vaksdalfrom-vtranoyfrom-wafrom-wielunnerfrom-wv" +
- "alledaostavernfrom-wyfrosinonefrostalowa-wolawafroyahababyglandf" +
- "stcgroupartnersharis-a-lawyerfujiiderafujikawaguchikonefujiminoh" +
- "tawaramotoineppubolognakanotoddenfujinomiyadafujiokayamanxn--2m4" +
- "a15efujisatoshonairportland-4-salernoboribetsucksharpartshawaiij" +
- "imarugame-hostrodawarafujisawafujishiroishidakabiratoridegreefuj" +
- "itsurugashimamateramodalenfujixeroxn--30rr7yfujiyoshidafukayabea" +
- "rdubaiduckdnshellaspeziafukuchiyamadafukudominichocolatelevision" +
- "issedaluccapitalonewmexicoffeedbackplaneapplinzis-a-designerimar" +
- "umorimachidafukuis-a-liberalfukumitsubishigakirovogradoyfukuokaz" +
- "akiryuohadanotaireshimojis-a-libertarianfukuroishikarikaturindal" +
- "fukusakisarazurewebsiteshikagamiishibukawafukuyamagatakaharustka" +
- "noyakagefunabashiriuchinadafunagatakahashimamakishiwadafunahashi" +
- "kamiamakusatsumasendaisennangonohejis-a-linux-useranishiaritabas" +
- "hijonawatefundaciofuoiskujukuriyamaoris-a-llamarylandfuosskoczow" +
- "indowshimokawafurnituredumbrellanbibaidarfurubiraquarelleborkang" +
- "erfurudonostiaarpartyfurukawairtelecityeatshimokitayamafusodegau" +
- "rafussaikisofukushimapasadenamsosnowiechofunatorientexpressarluc" +
- "ernefutabayamaguchinomigawafutboldlygoingnowhere-for-moregontrai" +
- "lroadfuttsurugimperiafuturehostingfuturemailingfvgfyis-a-musicia" +
- "nfylkesbiblackfridayfyresdalhangglidinghangoutsystemscloudfrontd" +
- "oorhannanmokuizumodenakasatsunais-a-painteractivegarsheis-a-pats" +
- "fanhannotteroyhanyuzenhapmirhareidsbergenharstadharvestcelebrati" +
- "onhasamarnardalhasaminami-alpssells-itransportransurlhashbanghas" +
- "udahasura-appassenger-associationhasvikazunohatogayahoohatoyamaz" +
- "akitahiroshimarriottrapaniimimatakatoris-a-personaltrainerhatsuk" +
- "aichikaiseis-a-photographerokuappaviancargodaddynaliascoli-picen" +
- "oipirangamvikddielddanuorrissagaeroclubmedecincinnationwidealsta" +
- "haugesunderseaportsinfolldalabamagasakishimabarackmazehattfjelld" +
- "alhayashimamotobungotakadapliernewhollandhazuminobusellsyourhome" +
- "goodshimotsumahboehringerikehelsinkitakamiizumisanofidelitysvard" +
- "ollshinichinanhembygdsforbundhemneshinjournalistjohnhemsedalhepf" +
- "orgeherokussldheroyhgtvallee-aosteroyhigashichichibunkyonanaoshi" +
- "mageandsoundandvisionhigashihiroshimanehigashiizumozakitakatakam" +
- "oriokalmykiahigashikagawahigashikagurasoedahigashikawakitaaikita" +
- "kyushuaiahigashikurumeiwamarshallstatebankfhappouhigashimatsushi" +
- "maritimodernhigashimatsuyamakitaakitadaitoigawahigashimurayamamo" +
- "torcycleshinjukumanohigashinarusembokukitamidsundhigashinehigash" +
- "iomihachimanchesterhigashiosakasayamanakakogawahigashishirakawam" +
- "atakanabeautydalhigashisumiyoshikawaminamiaikitamotosumitakagild" +
- "eskaliszhigashitsunowruzhgorodeohigashiurausukitanakagusukumodum" +
- "inamiiselectravelchannelhigashiyamatokoriyamanashifteditchyourip" +
- "fizerhigashiyodogawahigashiyoshinogaris-a-playerhiraizumisatohob" +
- "by-sitehirakatashinagawahiranais-a-republicancerresearchaeologic" +
- "aliforniahirarahiratsukagawahirayaitakanezawahistorichouseshinka" +
- "migotoyohashimotoshimahitachiomiyaginankokubunjis-a-rockstaracho" +
- "wicehitachiotagooglecodespotravelersinsurancehitraeumtgeradeloit" +
- "tevadsoccertificationhjartdalhjelmelandholeckobierzyceholidayhom" +
- "eipgfoggiahomelinkhakassiahomelinuxn--32vp30haebaruminamifuranoh" +
- "omeofficehomesecuritymaceratakaokaluganskodjejuifminamiizukamiok" +
- "amikitayamatsuris-a-socialistmein-vigorgehomesecuritypccwinnersh" +
- "inshinotsurgeryhomesenseminehomeunixn--3bst00minamimakis-a-soxfa" +
- "nhondahoneywellbeingzonehongopocznosegawahonjyoitakarazukamakura" +
- "zakitashiobarahornindalhorseoulminamiminowahortendofinternet-dns" +
- "hinshirohospitalhoteleshintokushimahotmailhoyangerhoylandetroits" +
- "kolelhumanitieshintomikasaharahurdalhurumajis-a-studentalhyllest" +
- "adhyogoris-a-teacherkassymantechnologyhyugawarahyundaiwafunehzch" +
- "onanbuildingripescaravantaajlchoyodobashichikashukujitawarajlljm" +
- "pharmacienshirakofuefukihaboromskoguchikuzenjnjeonnamerikawauejo" +
- "yokaichibahcavuotnagaranzannefrankfurtrentino-alto-adigejpmorgan" +
- "jpnjprshiranukamogawajuniperjurkoshunantokigawakosugekotohiradom" +
- "ainsureggiocalabriakotourakouhokutamakis-an-artisteinkjerusalemb" +
- "roiderykounosupplieshiraokanagawakouyamashikokuchuokouzushimasoy" +
- "kozagawakozakis-an-engineeringkpnkppspdnshiratakahagivestbytomar" +
- "idagawassamukawataricohdatingkrasnodarkredirectmeldalkristiansan" +
- "dcatshishikuis-an-entertainerkristiansundkrodsheradkrokstadelval" +
- "daostarostwodzislawioshisognekryminamisanrikubetsupportrentino-a" +
- "ltoadigekumatorinokumejimasudakumenanyokkaichirurgiens-dentistes" +
- "-en-francekunisakis-bykunitachiarailwaykunitomigusukumamotoyamas" +
- "sa-carrara-massacarraramassabusinessebyklegallocus-1kunneppulawy" +
- "kunstsammlungkunstunddesignkuokgrouphdkureggioemiliaromagnakayam" +
- "atsumaebashikshacknetrentino-s-tirollagrigentomologyeonggiehtavu" +
- "oatnagaivuotnagaokakyotambabia-goracleaningkurgankurobelaudibleb" +
- "timnetzkurogimilanokuroisoftwarendalenugkuromatsunais-certifiedo" +
- "gawarabikomaezakirunorthwesternmutualkurotakikawasakis-foundatio" +
- "nkushirogawakusupplykutchanelkutnokuzumakis-gonekvafjordkvalsund" +
- "kvamfamberkeleykvanangenkvinesdalkvinnheradkviteseidskogkvitsoyk" +
- "wpspiegelkzmissilevangermisugitokorozawamitourismolancastermitoy" +
- "oakemiuramiyazumiyotamanomjondalenmlbfanmonmouthagebostadmonster" +
- "monticellombardiamondshisuifuelveruminamitanemontrealestatefarme" +
- "quipmentrentino-stirolmonza-brianzaporizhzhiamonza-e-della-brian" +
- "zapposhitaramamonzabrianzaptokuyamatsusakahoginowaniihamatamakaw" +
- "ajimarburgmonzaebrianzaramonzaedellabrianzamoparachutingmordovia" +
- "jessheiminamiuonumatsumotofukemoriyamatsushigemoriyoshimilitarym" +
- "ormoneymoroyamatsuuramortgagemoscowitdkmpspbarcelonagasakijobser" +
- "verisignieznord-odalaziobihirosakikamijimassnasaarlandd-dnshome-" +
- "webservercellikes-piedmontblancomeeres3-ap-southeast-1moseushist" +
- "orymosjoenmoskeneshizukuishimofusaitamatsukuris-into-gamessinats" +
- "ukigatakasagotembaixadamosshizuokananporovigotpantheonsitemosvik" +
- "nx-serveronakatsugawamoteginozawaonsenmoviemovistargardmtpchrist" +
- "masakikugawatchesarufutsunomiyawakasaikaitakoelniyodogawamtranby" +
- "muenstermugithubcloudusercontentrentino-sud-tirolmuikamisatokama" +
- "chippubetsubetsugarumukochikushinonsenergymulhouservebeermunakat" +
- "anemuncieszynmuosattemuphiladelphiaareadmyblogsitemurmanskolobrz" +
- "egersundmurotorcraftrentino-sudtirolmusashimurayamatsuzakis-leet" +
- "rdmusashinoharamuseetrentino-sued-tirolmuseumverenigingmutsuzawa" +
- "mutuellewismillermy-vigorlicemy-wanggouvicenzamyactivedirectorym" +
- "yasustor-elvdalmycdn77-securechtrainingmydissentrentino-suedtiro" +
- "lmydrobofagemydshoujis-lostre-toteneis-a-techietis-a-therapistoi" +
- "amyeffectrentinoa-adigemyfirewallonieruchomoscienceandindustrynm" +
- "yfritzmyftpaccesshowamyfusionmyhome-serverrankoshigayamelhusgard" +
- "enmykolaivaolbia-tempio-olbiatempioolbialystokkepnogiftshowtimet" +
- "eorapphilatelymymediapchromedicaltanissettairamyokohamamatsudamy" +
- "pepsongdalenviknakanojohanamakinoharamypetshriramlidlugolekagami" +
- "nogatagajobojis-not-certifieducatorahimeshimakanegasakinkobayash" +
- "ikaoirminamiogunicomcastresistancemyphotoshibahccavuotnagareyama" +
- "lborkdalvdalcesienarashinomypsxn--3e0b707emysecuritycamerakermys" +
- "hopblocksigdalmyvnchryslerpictetrentinoaadigepicturesimple-urlpi" +
- "emontepilotsirdalpimientaketomisatolgapinkomakiyosunndalpioneerp" +
- "ippuphoenixn--3oq18vl8pn36apiszpittsburghofauskedsmokorsetagayas" +
- "ells-for-ulvikautokeinopiwatepizzapkomatsushimashikizunokunimiho" +
- "boleslawiechristiansburgriwataraidyndns-picsarpsborgroks-thisaya" +
- "manobeokakudamatsueplanetariuminamiyamashirokawanabellevuelosang" +
- "elesjaguarchitecturealtorlandplantationplantslingplatforminanopl" +
- "aystationplazaplchungnamdalseidfjordyndns-remotewdyndns-serverda" +
- "luroyplombardynamisches-dnslupskomforbarclaycards3-website-ap-no" +
- "rtheast-1plumbingopmnpodzonepohlpoivronpokerpokrovskommunalforbu" +
- "ndpolitiendapolkowicepoltavalle-aostathellexusdecorativeartsnoas" +
- "aitomobellunorddalpomorzeszowithgoogleapisa-hockeynutsiracusakat" +
- "akinouepordenonepornporsangerporsanguidelmenhorstalbansokanazawa" +
- "porsgrunnanpoznanpraxis-a-bookkeeperugiaprdpreservationpresidiop" +
- "rgmrprimeloyalistockholmestrandprincipeprivatizehealthinsurancep" +
- "rochowiceproductionsokndalprofbsbxn--1lqs03nprogressivegasiaproj" +
- "ectrentinoalto-adigepromombetsurfbx-ostrowwlkpmgulenpropertyprot" +
- "ectionprotonetrentinoaltoadigeprudentialpruszkowithyoutubentleyp" +
- "rzeworskogptplusterpvtrentinos-tirolpwchurchaseljeepostfoldnavyp" +
- "zqldqponqslgbtrentinostirolquicksytesolarssonqvcirclegnicafedera" +
- "tionstufftoread-booksnesolundbeckommunestuttgartrentoyokawasusak" +
- "is-slickharkovalleeaosteigensusonosuzakaneyamazoesuzukaniepcesuz" +
- "ukis-uberleetrentino-a-adigesvalbardunloppacificircustomersveios" +
- "velvikomvuxn--3ds443gsvizzeraswedenswidnicarrierswiebodzindianap" +
- "olis-a-bloggerswiftcoversicherungswinoujscienceandhistoryswisshi" +
- "kis-very-badaddjamisonsynology-dsolutionsolognetuscanytushuissie" +
- "r-justicetuvalle-daostaticsootuxfamilyvenneslaskerrylogisticsopo" +
- "trentinosud-tirolvestfoldvestnesor-odalvestre-slidreamhostersor-" +
- "varangervestre-totennishiawakuravestvagoyvevelstadvibo-valentiav" +
- "ibovalentiavideovillaskoyabearalvahkihokumakogengerdalpha-myqnap" +
- "cloudapplebesbydgoszczecinemakeupowiathletajimabariakembuchikuma" +
- "gayagawakuyabukicks-assedicitadeliveryvinnicartiervinnytsiavipsi" +
- "naapphonefossilkomaganevirginiavirtualvirtueeldomeindianmarketin" +
- "gvirtuelvisakegawavistaprinternationalfirearmsorfoldviterboltroa" +
- "ndinosaurepaircraftrevisohughesomavivoldavlaanderenvladikavkazim" +
- "ierz-dolnyvladimirvlogoiphotographysiovolkswagentsorreisahayakaw" +
- "akamiichikawamisatotalvologdanskongsvingervolvolkenkundenvolyngd" +
- "alvossevangenvotevotingvotoyonakagyokutoursortlandworldworse-tha" +
- "ndawowiwatsukiyonowritesthisblogsytewroclawloclawekoninjavald-ao" +
- "starnbergwtciticatholicheltenham-radio-opencraftranagatorodoywtf" +
- "bxosciencecentersciencehistorywuozuwwwmflabsorumincommbanklabudh" +
- "abikinokawabarthagakhanamigawawzmiuwajimaxn--4gq48lf9jetztrentin" +
- "o-aadigexn--4it168dxn--4it797konsulatrobeepilepsydneyxn--4pvxsou" +
- "thcarolinazawaxn--54b7fta0ccivilizationxn--55qw42gxn--55qx5dxn--" +
- "5js045dxn--5rtp49civilwarmanagementmpalmspringsakerxn--5rtq34kon" +
- "yvelolxn--5su34j936bgsgxn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2r" +
- "xn--6qq986b3xlxn--7t0a264claimsasayamaxn--80adxhksouthwestfalenx" +
- "n--80ao21axn--80aqecdr1axn--80asehdbarefootballooningjesdalillyo" +
- "mbondiscountysnes3-website-ap-southeast-2xn--80aswgxn--80audneda" +
- "lnxn--8ltr62kooris-an-actorxn--8pvr4uxn--8y0a063axn--90a3academy" +
- "-firewall-gatewayxn--90aishobaraomoriguchiharahkkeravjuedischesa" +
- "peakebayernrtrogstadxn--90azhytomyrxn--9dbhblg6dietcimdbargainst" +
- "itutelemarkaratsuginamikatagamiharuconnectatarantottoribestadisc" +
- "overyomitanobirastronomy-gatewayokosukanzakiwienaturalsciencesna" +
- "turelles3-ap-southeast-2xn--9dbq2axn--9et52uxn--9krt00axn--andy-" +
- "iraxn--aroport-byanaizuxn--asky-iraxn--aurskog-hland-jnbarreauct" +
- "ionayorovnobninskarelianceu-1xn--avery-yuasakuhokkaidontexistein" +
- "geekopervikhmelnitskiyamashikexn--b-5gaxn--b4w605ferdxn--bck1b9a" +
- "5dre4clickatowicexn--bdddj-mrabdxn--bearalvhki-y4axn--berlevg-jx" +
- "axn--bhcavuotna-s4axn--bhccavuotna-k7axn--bidr-5nachikatsuuraxn-" +
- "-bievt-0qa2xn--bjarky-fyandexn--3pxu8konskowolayangroupharmacysh" +
- "iraois-an-accountantshinyoshitomiokamitsuexn--bjddar-ptamayufuet" +
- "tertdasnetzxn--blt-elabourxn--bmlo-graingerxn--bod-2naroyxn--brn" +
- "ny-wuaccident-investigation-aptibleaseating-organicbcn-north-1xn" +
- "--brnnysund-m8accident-prevention-webhopenairbusantiquest-a-la-m" +
- "aisondre-landebudapest-a-la-masionionjukudoyamagazineat-urlxn--b" +
- "rum-voagatromsakakinokiaxn--btsfjord-9zaxn--c1avgxn--c2br7gxn--c" +
- "3s14mintelligencexn--cck2b3barrel-of-knowledgemologicallyngenvir" +
- "onmentalconservationflfanfshostrolekamisunagawaugustowadaegubs3-" +
- "ca-central-1xn--cg4bkis-very-evillagexn--ciqpnxn--clchc0ea0b2g2a" +
- "9gcdn77-sslattumisakis-into-carshioyanagawaxn--comunicaes-v6a2ox" +
- "n--correios-e-telecomunicaes-ghc29axn--czr694barrell-of-knowledg" +
- "eologyonagoyaukraanghkeymachineustarhubalestrandabergamoareke164" +
- "xn--czrs0tromsojaworznoxn--czru2dxn--czrw28bashkiriaurskog-holan" +
- "droverhalla-speziaeroportalaheadjudaicaaarborteaches-yogasawarac" +
- "ingroks-theatree12xn--d1acj3basilicataniaustevollarvikarasjokara" +
- "suyamarylhurstjordalshalsenaturbruksgymnaturhistorisches3-eu-cen" +
- "tral-1xn--d1alfaromeoxn--d1atrusteexn--d5qv7z876clinichernigover" +
- "nmentjometlifeinsurancexn--davvenjrga-y4axn--djrs72d6uyxn--djty4" +
- "koryokamikawanehonbetsurutaharaxn--dnna-grajewolterskluwerxn--dr" +
- "bak-wuaxn--dyry-iraxn--e1a4cliniquenoharaxn--eckvdtc9dxn--efvn9s" +
- "owaxn--efvy88haibarakitahatakamatsukawaxn--ehqz56nxn--elqq16hair" +
- "-surveillancexn--estv75gxn--eveni-0qa01gaxn--f6qx53axn--fct429ko" +
- "saigawaxn--fhbeiarnxn--finny-yuaxn--fiq228c5hspjelkavikomonoxn--" +
- "fiq64basketballfinanzgoraustinnatuurwetenschappenaumburgjemnes3-" +
- "eu-west-1xn--fiqs8spreadbettingxn--fiqz9spydebergxn--fjord-lraxn" +
- "--fjq720axn--fl-ziaxn--flor-jraxn--flw351exn--fpcrj9c3dxn--frde-" +
- "grandrapidsrlxn--frna-woaraisaijotrvarggatritonxn--frya-hraxn--f" +
- "zc2c9e2clintonoshoesaseboknowsitallutskypexn--fzys8d69uvgmailxn-" +
- "-g2xx48clothingrondarxn--gckr3f0fermobilyxn--gecrj9cloudnsdojoet" +
- "suwanouchikujogaszczytnore-og-uvdaluxembourgrongaxn--ggaviika-8y" +
- "a47hakatanotogawaxn--gildeskl-g0axn--givuotna-8yaotsurreyxn--gjv" +
- "ik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050is-very-goodhandsonxn" +
- "--gmqw5axn--h-2failxn--h1aeghakodatexn--h2brj9cnsaskatchewanxn--" +
- "hbmer-xqaxn--hcesuolo-7ya35batodayonaguniversityoriikariyakumold" +
- "eltaiwanairlinedre-eikerxn--hery-iraxn--hgebostad-g3axn--hmmrfea" +
- "sta-s4acctrysiljan-mayenxn--hnefoss-q1axn--hobl-iraxn--holtlen-h" +
- "xaxn--hpmir-xqaxn--hxt814exn--hyanger-q1axn--hylandet-54axn--i1b" +
- "6b1a6a2exn--imr513nxn--indery-fyasakaiminatoyonezawaxn--io0a7is-" +
- "very-nicexn--j1aeferraraxn--j1amhakonexn--j6w193gxn--jlq61u9w7ba" +
- "tsfjordishakotankarlsoyoshiokarasjohkamikoaniikappugliaustraliai" +
- "sondriodejaneirochesterhcloudfunctions3-external-1xn--jlster-bya" +
- "sugis-very-sweetpepperxn--jrpeland-54axn--jvr189misasaguris-into" +
- "-cartoonshirahamatonbetsurnadalxn--k7yn95exn--karmy-yuaxn--kbrq7" +
- "oxn--kcrx77d1x4axn--kfjord-iuaxn--klbu-woaxn--klt787dxn--kltp7dx" +
- "n--kltx9axn--klty5xn--42c2d9axn--koluokta-7ya57hakubadajozorahol" +
- "taleniwaizumiotsukumiyamazonawsabaerobaticketshimonosekikawaxn--" +
- "kprw13dxn--kpry57dxn--kpu716ferrarivnexn--kput3is-with-thebandoo" +
- "mdnsiskinkyotobetsumidatlantichoseiroumuenchenisshingugexn--krag" +
- "er-gyasuokanraxn--kranghke-b0axn--krdsherad-m8axn--krehamn-dxaxn" +
- "--krjohka-hwab49jevnakershuscultureggio-emilia-romagnakatombetsu" +
- "my-routerxn--ksnes-uuaxn--kvfjord-nxaxn--kvitsy-fyatomitamamurax" +
- "n--kvnangen-k0axn--l-1fairwindsrtrentinosudtirolxn--l1accenturek" +
- "lamborghiniizaxn--laheadju-7yatsukanumazuryxn--langevg-jxaxn--lc" +
- "vr32dxn--ldingen-q1axn--leagaviika-52bauhausposts-and-telecommun" +
- "icationsncfdivtasvuodnakaiwamizawaustrheimatunduhrennesoyokotebi" +
- "nagisochildrensgardenaustdalavagiskebinorfolkebibleikangerxn--le" +
- "sund-huaxn--lgbbat1ad8jewelryxn--lgrd-poacoachampionshiphoptobam" +
- "agentositelekommunikationlinebraskaunjargallupinbbcaseihichisobe" +
- "tsuitainairforceoceanographics3-website-eu-west-1xn--lhppi-xqaxn" +
- "--linds-pramericanartulangevagrarboretumbriamallamaintenancechir" +
- "ealminnesotaketakatsukis-into-animelbournexn--lns-qlansrvareserv" +
- "eblogspotrentinosued-tirolxn--loabt-0qaxn--lrdal-sraxn--lrenskog" +
- "-54axn--lt-liacntoyonoxn--lten-granexn--lury-iraxn--mely-iraxn--" +
- "merker-kuaxn--mgb2ddestordalxn--mgb9awbferreroticanonoichinomiya" +
- "kexn--mgba3a3ejtunesomnaritakurashikis-savedunetbankharkivguccip" +
- "rianiigataishinomakimobetsuliguriaxn--mgba3a4f16axn--mgba3a4fran" +
- "amizuholdingsmileksvikosakaerodromegalsacebetsukubankhmelnytskyi" +
- "vanylvenicexn--mgba7c0bbn0axn--mgbaakc7dvfetsundynvpnxn--mgbaam7" +
- "a8hakuis-a-nascarfanxn--mgbab2bdxn--mgbai9a5eva00bbtateshinanoma" +
- "chintaifun-dnsaliaskimitsubatamicable-modembetsukuibigawauthorda" +
- "landroiddnskingjerdrumckinseyokozebizenakaniikawatanaguraetnagah" +
- "amaroygardendoftheinternetflixilovecollegefantasyleaguernseyboml" +
- "oans3-ap-northeast-2xn--mgbai9azgqp6jewishartgalleryxn--mgbayh7g" +
- "padualstackspace-to-rentalstomakomaibaraxn--mgbb9fbpobanazawaxn-" +
- "-mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzdoxn--mgberp4a5d4a87gxn--m" +
- "gberp4a5d4arxn--mgbi4ecexposedxn--mgbpl2fhskleppiagetmyiphilipsy" +
- "nology-diskstationxn--mgbqly7c0a67fbcolonialwilliamsburgrossetou" +
- "chijiwadellogliastradingroundhandlingroznyxn--mgbqly7cvafredriks" +
- "tadtvstoreitrentinosuedtirolxn--mgbt3dhdxn--mgbtf8flatangerxn--m" +
- "gbtx2bbvacationswatch-and-clockerxn--mgbx4cd0abbottunkongsbergxn" +
- "--mix082fgunmarcheaparisor-fronxn--mix891fhvalerxn--mjndalen-64a" +
- "xn--mk0axindustriesteambulancexn--mk1bu44coloradoplateaudioxn--m" +
- "kru45isleofmandalxn--mlatvuopmi-s4axn--mli-tlanxesstorfjordxn--m" +
- "lselv-iuaxn--moreke-juaxn--mori-qsakuragawaxn--mosjen-eyatsushir" +
- "oxn--mot-tlapyxn--mre-og-romsdal-qqbeppublishproxyzgorzeleccolog" +
- "newspaperxn--msy-ula0hakusandiegoodyearthadselfipassagenshimonit" +
- "ayanagitlaborxn--mtta-vrjjat-k7afamilycompanycolumbusheyxn--muos" +
- "t-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--45brj9ci" +
- "vilaviationxn--nit225koseis-an-actresshiojirishirifujiedaxn--nme" +
- "sjevuemie-tcbalatinord-frontierxn--nnx388axn--nodexn--nqv7fs00em" +
- "axn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nttery-byaeservecount" +
- "erstrikexn--nvuotna-hwaxn--nyqy26axn--o1achattanooganordreisa-ge" +
- "ekosherbrookegawaxn--o3cw4haldenxn--od0algxn--od0aq3bernuorockar" +
- "tuzyukibmdivttasvuotnakamagayachts3-website-sa-east-1xn--ogbpf8f" +
- "lekkefjordxn--oppegrd-ixaxn--ostery-fyawaraxn--osyro-wuaxn--p1ac" +
- "fidonnakamuratajimicrolightinguovdageaidnunzenxn--p1aissmarterth" +
- "anyouxn--pbt977communitysfjordyndns-weberlincolnxn--pgbs0dhlxn--" +
- "porsgu-sta26fieldyroyrvikinguitarschweizparaglidingujolsterxn--p" +
- "ssu33lxn--pssy2uxn--q9jyb4comobaraxn--qcka1pmcdonaldstpetersburg" +
- "xn--qqqt11misconfusedxn--qxamuneuestreamsterdamnserverbaniaxn--r" +
- "ady-iraxn--rdal-poaxn--rde-ulaquilancashirehabmerxn--rdy-0nabari" +
- "wchoshibuyachiyodavvenjargaulardalukowiiheyaizuwakamatsubushikus" +
- "akadogawaxn--rennesy-v1axn--rhkkervju-01aflakstadaokagakibichuox" +
- "n--rholt-mragowoodsidexn--rhqv96gxn--rht27zxn--rht3dxn--rht61exn" +
- "--risa-5narusawaxn--risr-iraxn--rland-uuaxn--rlingen-mxaxn--rmsk" +
- "og-byawatahamaxn--rny31halsaintlouis-a-anarchistoireggio-calabri" +
- "axn--rovu88beskidyn-vpncasertaipeiheijiinetnedalimanowarudautomo" +
- "tivecodyn-o-saurlandes3-fips-us-gov-west-1xn--rros-granvindafjor" +
- "dxn--rskog-uuaxn--rst-0narutokyotangovturystykannamihamadaxn--rs" +
- "ta-francaiseharaxn--ryken-vuaxn--ryrvik-byaxn--s-1faitheguardian" +
- "xn--s9brj9comparemarkerryhotelsassaris-a-doctorayxn--sandnessjen" +
- "-ogbizxn--sandy-yuaxn--seral-lraxn--ses554gxn--sgne-gratangenxn-" +
- "-skierv-utazaskvolloabathsbcompute-1xn--skjervy-v1axn--skjk-soax" +
- "n--sknit-yqaxn--sknland-fxaxn--slat-5narviikamishihoronobeauxart" +
- "sandcraftstudioxn--slt-elabbvieeexn--smla-hraxn--smna-gratis-a-b" +
- "ruinsfanxn--snase-nraxn--sndre-land-0cbstudyndns-at-homedepotenz" +
- "amamicrosoftbankomorotsukaminoyamaxunusualpersonxn--snes-poaxn--" +
- "snsa-roaxn--sr-aurdal-l8axn--sr-fron-q1axn--sr-odal-q1axn--sr-va" +
- "ranger-ggbestbuyshouses3-website-us-east-1xn--srfold-byaxn--srre" +
- "isa-q1axn--srum-grazxn--stfold-9xaxn--stjrdal-s1axn--stjrdalshal" +
- "sen-sqbetainaboxfusejnynysadodgeometre-experts-comptables3-websi" +
- "te-us-west-1xn--stre-toten-zcbieigersundiyukuhashimoichinosekiga" +
- "harautoscanadaejeonbukaratehimeji234xn--t60b56axn--tckweathercha" +
- "nnelxn--tiq49xqyjfkhersonxn--tjme-hraxn--tn0agrinet-freakstuff-4" +
- "-salexn--tnsberg-q1axn--tor131oxn--trany-yuaxn--trgstad-r1axn--t" +
- "rna-woaxn--troms-zuaxn--tysvr-vraxn--uc0atvaroyxn--uc0ay4axn--ui" +
- "st22hammarfeastafricapetownnews-stagingxn--uisz3gxn--unjrga-rtao" +
- "baokinawashirosatochiokinoshimalatvuopmiasakuchinotsuchiurakawal" +
- "brzycharternopilawalesundxn--unup4yxn--uuwu58axn--vads-jraxn--va" +
- "rd-jraxn--vegrshei-c0axn--vermgensberater-ctbielawalterxn--vermg" +
- "ensberatung-pwbiellaakesvuemielecceu-2xn--vestvgy-ixa6oxn--vg-yi" +
- "abcgxn--vgan-qoaxn--vgsy-qoa0jgoraxn--vgu402computerhistoryofsci" +
- "ence-fictionxn--vhquvbarclays3-website-ap-southeast-1xn--vler-qo" +
- "axn--vre-eiker-k8axn--vrggt-xqadxn--vry-yla5gxn--vuq861bieszczad" +
- "ygeyachimataikikonaioirasebastopologyeongnamegawakeisenbahnhlfan" +
- "hs3-website-us-west-2xn--w4r85el8fhu5dnraxn--w4rs40lxn--wcvs22dx" +
- "n--wgbh1comsecuritytacticsatxn--1ck2e1balsfjordgcahcesuolodingen" +
- "aval-d-aosta-valleyolasitemrxn--wgbl6axn--xhq521bievatmallorcada" +
- "quesakuraiitatebayashiibaghdadultateyamaveroykenglanddnss3-sa-ea" +
- "st-1xn--xkc2al3hye2axn--xkc2dl3a5ee0hamurakamigoriginshimosuwalk" +
- "is-a-nurservebbshimotsukexn--y9a3aquariumishimatsunoxn--yer-znar" +
- "vikoshimizumakis-an-anarchistoricalsocietyxn--yfro4i67oxn--ygard" +
- "en-p1axn--ygbi2ammxn--45q11civilisationxn--ystre-slidre-ujbifuka" +
- "gawarszawashingtondclkarmoyurihonjoyentatsunoceanographiquevents" +
- "akyotanabeneventoeidsvollimitednpagefrontappagespeedmobilizerodd" +
- "avocatanzarowegroweibolzanordkappgafanpachigasakidsmynasushiobar" +
- "agusarts3-us-east-2xn--zbx025dxn--zf0ao64axn--zf0avxn--4gbrimini" +
- "ngxn--zfr164bihorologyusuharavoues3-us-gov-west-1xperiaxz"
+const text = "bifukagawalterbihorologybikedagestangeorgeorgiaxasnesoddenmarkha" +
+ "ngelskjakdnepropetrovskiervaapsteiermarkaragandabruzzoologicalvi" +
+ "nklein-addrammenuernberggfarmerseine12bilbaogakidsmynasushiobara" +
+ "gusartsalangeninohekinannestadray-dnsiskinkyotobetsumidatlantica" +
+ "tholicheltenham-radio-opencraftranagatorodoybillustrationinomiya" +
+ "konojosoyrorosalondonetskarpaczeladzjavald-aostarnbergladegreevj" +
+ "e-og-hornnesaltdalimitedraydnsupdaternopilawabioceanographiquebi" +
+ "rdartcenterprisesakikuchikuseikarugamvikaruizawabirkenesoddtange" +
+ "novaraumalopolskanlandrivelandrobaknoluoktachikawakembuchikumaga" +
+ "yagawakkanaibetsubamericanfamilydscloudcontrolledekafjordrudunsa" +
+ "lvadordalibabalatinord-aurdalvdalaskanittedallasalleasinglesuran" +
+ "certmgretagajobojinzais-a-candidatebirthplacebjarkoybjerkreimbal" +
+ "sfjordgcahcesuolocus-1bjugnirasakis-a-catererblockbustermezlglas" +
+ "sassinationalheritagematsubarakawagoebloombergbauernishiazais-a-" +
+ "celticsfanishigoddabloxcmsalzburgliwicebluedancebmoattachmentsam" +
+ "egawabmsamnangerbmwegroweibolzanordkappgafanquannefrankfurtjmaxx" +
+ "xboxenapponazure-mobilebnpparibaselburglobalashovhachinohedmarka" +
+ "rumaifarmsteadupontariomutashinais-a-chefarsundurbanamexnethnolo" +
+ "gybnrweirbonnishiharabookinglobodoes-itvedestrandurhamburglogowf" +
+ "ashionishiizunazukis-a-conservativefsnillfjordvrcambridgestonexu" +
+ "s-2bootsamsclubindalimoliserniaboschaefflerdalindashorokanaiebos" +
+ "tikasaokaminokawanishiaizubangebostonakijinsekikogentingloppenza" +
+ "ogashimadachicagoboatsamsungmbhartiffanybotanicalgardenishikatak" +
+ "ayamatta-varjjatjometlifeinsurancebotanicgardenishikatsuragithub" +
+ "usercontentjxfinitybotanybouncemerckmsdnipropetrovskjervoyagebou" +
+ "nty-fullensakerrypropertiesandvikcoromantovalle-d-aostatic-acces" +
+ "sanfranciscofreakunemurorangeiseiyoichippubetsubetsugaruhrboutiq" +
+ "uebecngminakamichiharabozentsujiiebplacedogawarabikomaezakirunor" +
+ "dlandvrdnsangoppdalindesnesanjournalismailillesandefjordyndns-at" +
+ "-workinggroupaleobrandywinevalleybrasiliabresciabrindisibenikebr" +
+ "istoloslocalhistorybritishcolumbialowiezachpomorskienishikawazuk" +
+ "amitondabayashiogamagoriziabroadcastlegallocalhostrodawaravennag" +
+ "asukebroadwaybroke-itkmaxxjaworznowtvalled-aostavangerbrokerbron" +
+ "noysundyndns-blogdnsannanishimerabrothermesaverdeatnurembergmode" +
+ "nakasatsunais-a-cpadualstackspace-to-rentalstomakomaibarabrowser" +
+ "safetymarketsannohelplfinancialivornobrumunddalombardiamondsanok" +
+ "ashibatakashimaseratis-a-cubicle-slavellinotteroybrunelasticbean" +
+ "stalkashiharabrusselsantabarbarabruxellesantacruzsantafedjeffers" +
+ "onishinomiyashironobryanskleppalermomahachijorpelandyndns-freebo" +
+ "x-ostrowwlkpmgmxn--0trq7p7nnishinoomotegobrynewhollandyndns-home" +
+ "dnsanukis-a-democratmpalmspringsakerbuskerudinewmexicodyn-vpnplu" +
+ "sterbuzenishinoshimattelefonicarbonia-iglesias-carboniaiglesiasc" +
+ "arboniabuzzpamperedchefastlylbaltimore-og-romsdalwaysdatabasebal" +
+ "langenoamishirasatochigiessensiositelemarkarateu-1bwhalingrimsta" +
+ "dyndns-ipirangaulardalombardynamisches-dnsaotomemergencyachtsapo" +
+ "dlasiellaktyubinskiptveterinairealtorlandyndns-mailomzaporizhzhe" +
+ "guris-a-designerimarumorimachidabzhitomirumalselvendrellorenskog" +
+ "ripescaravantaacondoshichinohealth-carereformitakeharaconference" +
+ "constructionconsuladoesntexistanbullensvanguardyndns1consultanth" +
+ "ropologyconsultingvolluroycontactoyotsukaidownloadynnsaskatchewa" +
+ "ncontemporaryarteducationalchikugodoharuovatoyouracontractorsken" +
+ "conventureshinodesashibetsuikinderoycookingchannelblagdenesnaase" +
+ "ralingenkainanaejrietisalatinabenonichernivtsiciliacoolkuszczytn" +
+ "ore-og-uvdalutskasuyameldaluxembourgrpanamacooperaunitenrightath" +
+ "omeftpanasonichernovtsykkylvenetogakushimotoganewspapercopenhage" +
+ "ncyclopedichirurgiens-dentistes-en-francecorsicagliaridagawarsza" +
+ "washingtondclkaszubycorvettevadsoccertificationcosenzagancosidns" +
+ "dojoetsuwanouchikujogaszkoladbrokesassaris-a-huntercostumedio-ca" +
+ "mpidano-mediocampidanomediocouchpotatofriesatxn--11b4c3dynv6coun" +
+ "ciluxurycouponsaudacoursesauheradynvpnchiryukyuragifuchungbukhar" +
+ "acq-acranbrookuwanalyticsavannahgacreditcardyroyrvikingruecredit" +
+ "unioncremonashgabadaddjambyluzerncrewiiheyakagecricketrzyncrimea" +
+ "st-kazakhstanangercrotonextdirectoystre-slidrettozawacrownprovid" +
+ "ercrsvparaglidinguitarsaves-the-whalessandria-trani-barletta-and" +
+ "riatranibarlettaandriacruisesavonaplesaxocryptonomichigangwoncui" +
+ "sinellahppiacenzakopanerairguardiannakadomarinebraskaunjargalsac" +
+ "eoculturalcentertainmentozsdeltaitogliattiresbschokoladencuneocu" +
+ "pcakecxn--12c1fe0bradescorporationcyberlevagangaviikanonjis-a-kn" +
+ "ightpointtokaizukamikitayamatsuris-a-landscapercymrussiacyonabar" +
+ "ulvikatowicecyouthdfcbankatsushikabeeldengeluidfidonnakamurataji" +
+ "mibuildingulenfieldfiguerestaurantraniandriabarlettatraniandriaf" +
+ "ilateliafilegearthachiojiyahoofilminamidaitomangotsukisosakitaga" +
+ "wafinalfinancefineartschwarzgwangjuifminamiechizenfinlandfinnoyf" +
+ "irebaseapparisor-fronfirenzefirestonefirmdaleirvikaufenfishingol" +
+ "ffanschweizwildlifedorainfracloudfrontdoorfitjarmeniafitnessettl" +
+ "ementranoyfjalerflesbergunmarburguovdageaidnuslivinghistoryflick" +
+ "ragerotikakamigaharaflightsciencecentersciencehistoryflirflogint" +
+ "ogurafloraflorencefloridavvesiidazaifudaigojomedizinhistorisches" +
+ "cientistoragefloripaderbornfloristanohatakahamangyshlakasamatsud" +
+ "ontexisteingeekautokeinoflorogerscjohnsonflowerscotlandflynnhuba" +
+ "mblefrakkestadiscountysnes3-sa-east-1fndfoodnetworkshoppingushik" +
+ "amifuranortonsbergxn--12co0c3b4evalleaostatoilfor-ourfor-someetn" +
+ "edalfor-theaterforexrothachirogatakahatakaishimogosenforgotdnscr" +
+ "apper-siteforli-cesena-forlicesenaforlikescandynamic-dnscrapping" +
+ "forsaleitungsenforsandasuolodingenfortmissoulair-traffic-control" +
+ "leyfortworthadanosegawaforuminamifuranofosneserveftparliamentran" +
+ "sportransurlfotaruis-a-lawyerfoxfordedyn-ip24freeboxoservegame-s" +
+ "erversailleservehalflifestylefreemasonryfreetlservehttparmafreib" +
+ "urgfreightcminamiiselectrapaniimimatakatoris-a-liberalfresenius-" +
+ "3fribourgfriuli-v-giuliafriuli-ve-giuliafriuli-vegiuliafriuli-ve" +
+ "nezia-giuliafriuli-veneziagiuliafriuli-vgiuliafriuliv-giuliafriu" +
+ "live-giuliafriulivegiuliafriulivenezia-giuliafriuliveneziagiulia" +
+ "friulivgiuliafrlfroganservehumourfrognfrolandfrom-akrehamnfrom-a" +
+ "lfrom-arqhadselfiparocherkasyno-dserveirchitachinakagawassamukaw" +
+ "ataricohdatsunanjoburgriwataraidyndns-office-on-the-webcampobass" +
+ "ociatesapporofrom-azfrom-capebretonamiastapleserveminecraftravel" +
+ "channelfrom-collectionfrom-ctravelersinsurancefrom-dchitosetogit" +
+ "suldalotenkawafrom-defenseljordfrom-flanderservemp3from-gausdalf" +
+ "rom-higashiagatsumagoizumizakirkeneservep2parservepicservequakef" +
+ "rom-iafrom-idfrom-ilfrom-incheonfrom-kservesarcasmatartanddesign" +
+ "from-kyowariasahikawafrom-lajollamericanexpressexyfrom-maniwakur" +
+ "atextileksvikazofrom-mdfrom-megurokunohealthcareerservicesettsur" +
+ "geonshalloffamemorialfrom-microsoftbankazunofrom-mnfrom-modellin" +
+ "gfrom-msevastopolefrom-mtnfrom-nchloefrom-ndfrom-nefrom-nhktrdfr" +
+ "om-njcbnlfrom-nminamiizukamisatokamachintaifun-dnsaliasdaburfrom" +
+ "-nvalledaostavernfrom-nyfrom-ohkurafrom-oketohmannorth-kazakhsta" +
+ "nfrom-orfrom-padovaksdalfrom-pratohnoshoooshikamaishimodatefrom-" +
+ "rivnefrom-schoenbrunnfrom-sdfrom-tnfrom-txn--1ck2e1bananarepubli" +
+ "caseihichisobetsuitainairforcechirealminamiawajikibmdiscoveryomb" +
+ "ondishakotanavigationavoiitatebayashiibahcavuotnagaraholtaleniwa" +
+ "izumiotsukumiyamazonawsadodgemologicallyngenvironmentalconservat" +
+ "ionavuotnaklodzkodairassnasabaerobaticketselinogradultashkentata" +
+ "motors3-ap-northeast-2from-utazuerichardlillehammerfeste-ipartis" +
+ "-a-libertarianfrom-val-daostavalleyfrom-vtrentino-a-adigefrom-wa" +
+ "from-wielunnerfrom-wvallee-aosteroyfrom-wyfrosinonefrostalowa-wo" +
+ "lawafroyahikobeardubaiduckdnsevenassisicilyfstcgroupartnersewill" +
+ "iamhillfujiiderafujikawaguchikonefujiminohtawaramotoineppubologn" +
+ "akanotoddenfujinomiyadafujiokayamansionsfranziskanerdpolicefujis" +
+ "atoshonairtelecityeatsharis-a-linux-useranishiaritabashijonawate" +
+ "fujisawafujishiroishidakabiratoridefinimakanegasakindlegokasells" +
+ "-for-lessharpartshawaiijimarugame-hostrolekameokameyamatotakadaf" +
+ "ujitsurugashimaritimekeepingfujixeroxn--1ctwolominamatakkokamino" +
+ "yamaxunusualpersonfujiyoshidafukayabeatshellaspeziafukuchiyamada" +
+ "fukudominichocolatemasekashiwazakiyosatokashikiyosemitefukuis-a-" +
+ "llamarylandfukumitsubishigakirovogradoyfukuokazakiryuohaebarumin" +
+ "amimakis-a-musicianfukuroishikarikaturindalfukusakisarazurewebsi" +
+ "teshikagamiishibukawafukuyamagatakaharustkanoyakumoldeloittexasc" +
+ "olipicenoipifonynysaarlandfunabashiriuchinadafunagatakahashimama" +
+ "kishiwadafunahashikamiamakusatsumasendaisennangonohejis-a-nascar" +
+ "fanfundaciofuoiskujukuriyamanxn--1lqs03nfuosskoczowinbarcelonaga" +
+ "sakijobserverisignieznord-frontiereviewskrakowedeployomitanobihi" +
+ "rosakikamijimastronomy-gatewaybomloans3-ap-south-1furnituredston" +
+ "efurubiraquarelleborkangerfurudonostiaarpartyfurukawairtrafficho" +
+ "funatoriginsurecifedexhibitionishiokoppegardyndns-picsardegnamss" +
+ "koganeis-a-doctorayfusodegaurafussaikisofukushimaoris-a-nurserve" +
+ "bbshimojis-a-painteractivegarsheis-a-patsfanfutabayamaguchinomig" +
+ "awafutboldlygoingnowhere-for-moregontrailroadfuttsurugimperiafut" +
+ "urehostingfuturemailingfvgfyis-a-personaltrainerfylkesbiblackfri" +
+ "dayfyresdalhangoutsystemscloudfunctionshimokawahannanmokuizumode" +
+ "rnhannotaireshimokitayamahanyuzenhapmirhareidsbergenharstadharve" +
+ "stcelebrationhasamarcheapassagenshimonitayanagitlaborhasaminami-" +
+ "alpssells-itrentino-aadigehashbanghasudahasura-appassenger-assoc" +
+ "iationhasvikddielddanuorrikuzentakataiwanairlinedre-eikerhatogay" +
+ "aitakamoriokalmykiahatoyamazakitahiroshimarnardalhatsukaichikais" +
+ "eis-a-republicancerresearchaeologicaliforniahattfjelldalhayashim" +
+ "amotobungotakadapliernewjerseyhazuminobusellsyourhomegoodshimono" +
+ "sekikawahboehringerikehelsinkitakamiizumisanofidelitysvardollshi" +
+ "mosuwalkis-a-rockstarachowicehembygdsforbundhemneshimotsukehemse" +
+ "dalhepforgeherokussldheroyhgtvalleeaosteigenhigashichichibunkyon" +
+ "anaoshimageandsoundandvisionhigashihiroshimanehigashiizumozakita" +
+ "katakanabeautydalhigashikagawahigashikagurasoedahigashikawakitaa" +
+ "ikitakyushuaiahigashikurumeiwamarriottrentino-alto-adigehigashim" +
+ "atsushimarshallstatebankfhappouhigashimatsuyamakitaakitadaitoiga" +
+ "wahigashimurayamamotorcycleshimotsumahigashinarusembokukitamidor" +
+ "is-a-socialistmein-vigorgehigashinehigashiomihachimanchesterhiga" +
+ "shiosakasayamanakakogawahigashishirakawamatakanezawahigashisumiy" +
+ "oshikawaminamiaikitamotosumitakagildeskaliszhigashitsunotogawahi" +
+ "gashiurausukitanakagusukumoduminamiminowahigashiyamatokoriyamana" +
+ "shifteditchyouripaviancarrierhigashiyodogawahigashiyoshinogaris-" +
+ "a-soxfanhiraizumisatohobby-sitehirakatashinagawahiranais-a-stude" +
+ "ntalhirarahiratsukagawahirayaizuwakamatsubushikusakadogawahistor" +
+ "ichouseshinichinanhitachiomiyaginankokubunjis-a-teacherkassymant" +
+ "echnologyhitachiotagooglecodespotrentino-altoadigehitraeumtgerad" +
+ "elmenhorstalbanshinjournalistjohnhjartdalhjelmelandholeckobierzy" +
+ "ceholidayhomeipfizerhomelinkhakassiahomelinuxn--1lqs71dhomeoffic" +
+ "ehomesecuritymaceratakaokaluganskolevangerhomesecuritypccwindmil" +
+ "lhomesenseminehomeunixn--1qqw23ahondahoneywellbeingzonehongopocz" +
+ "northwesternmutualhonjyoitakarazukamakurazakitashiobarahornindal" +
+ "horseoulminamiogunicomcastresistancehortendofinternet-dnshinjuku" +
+ "manohospitalhoteleshinkamigotoyohashimotoshimahotmailhoyangerhoy" +
+ "landetroitskydivinghumanitieshinshinotsurgeryhurdalhurumajis-a-t" +
+ "echietis-a-therapistoiahyllestadhyogoris-an-accountantshinshiroh" +
+ "yugawarahyundaiwafunehzchoseiroumuenchenishitosashimizunaminamia" +
+ "shigarajfkhmelnitskiyamashikejgorajlchoyodobashichikashukujitawa" +
+ "rajlljmpharmacienshiojirishirifujiedajnjcpgfoggiajoyokaichibahcc" +
+ "avuotnagareyamalborkdalpha-myqnapcloudapplebesbyglandjpmorganjpn" +
+ "jprshioyanaizujuniperjurkoshimizumakis-an-engineeringkoshunantok" +
+ "igawakosugekotohiradomainshirakofuefukihaboromskoguchikuzenkotou" +
+ "rakouhokutamakis-an-entertainerkounosupplieshiranukamogawakouyam" +
+ "ashikokuchuokouzushimasoykozagawakozakis-bykpnkppspdnshiraois-ce" +
+ "rtifieducatorahimeshimamateramochizukirakrasnodarkredirectmelhus" +
+ "cultureggio-calabriakristiansandcatshiraokanagawakristiansundkro" +
+ "dsheradkrokstadelvaldaostarostwodzislawindowshiratakahagivestbyk" +
+ "ryminamisanrikubetsupportrentino-sued-tirolkumatorinokumejimasud" +
+ "akumenanyokkaichiropractichristmasakikugawatchandclockasukabedzi" +
+ "n-the-bandaikawachinaganoharamcoachampionshiphoptobishimaizurugb" +
+ "ydgoszczecinemakeupowiathletajimabariakeisenbahnishiwakis-a-fina" +
+ "ncialadvisor-aurdalottokonamegatakasugais-a-geekgalaxykunisakis-" +
+ "foundationkunitachiarailwaykunitomigusukumamotoyamassa-carrara-m" +
+ "assacarraramassabusinessebytomaritimobarakunneppulawykunstsammlu" +
+ "ngkunstunddesignkuokgrouphdkureggio-emilia-romagnakatsugawakurga" +
+ "nkurobelaudiblebtimnetzkurogimilanokuroisoftwarendalenugkuromats" +
+ "unais-gonekurotakikawasakis-into-animelbournekushirogawakustanai" +
+ "s-into-carshintomikasaharakusupplykutchanelkutnokuzumakis-into-c" +
+ "artoonshinyoshitomiokamitsuekvafjordkvalsundkvamfamberkeleykvana" +
+ "ngenkvinesdalkvinnheradkviteseidskogkvitsoykwpspiegelkzmissilewi" +
+ "smillermisugitokorozawamitourismolancastermitoyoakemiuramiyazumi" +
+ "yotamanomjondalenmlbfanmonmouthagebostadmonstermonticellolmontre" +
+ "alestatefarmequipmentrentino-suedtirolmonza-brianzaporizhzhiamon" +
+ "za-e-della-brianzapposhishikuis-not-certifiedunetbankharkovanylv" +
+ "enicemonzabrianzaptokuyamatsusakahoginowaniihamatamakawajimaphil" +
+ "adelphiaareadmyblogsitemonzaebrianzaramonzaedellabrianzamoonscal" +
+ "exusdecorativeartshisognemoparachutingmordoviajessheiminamitanem" +
+ "oriyamatsushigemoriyoshimilitarymormoneymoroyamatsuuramortgagemo" +
+ "scowinnershisuifuelveruminamiuonumatsumotofukemoseushistorymosjo" +
+ "enmoskeneshitaramamosshizukuishimofusaitamatsukuris-savedmosvikn" +
+ "x-serveronakatombetsunndalmoteginozawaonsenmoviemovistargardmtpc" +
+ "hromedicaltanissettairamtranbymuenstermugithubcloudusercontentre" +
+ "ntinoa-adigemuikamishihoronobeauxartsandcraftshizuokananporovigo" +
+ "tpantheonsitemukochikushinonsenergymulhouservebeermunakatanemunc" +
+ "ieszynmuosattemuphilatelymurmanskolobrzegersundmurotorcraftrenti" +
+ "noaadigemusashimurayamatsuzakis-slickhersonmusashinoharamuseetre" +
+ "ntinoalto-adigemuseumverenigingmusicargodaddynaliascoli-picenogi" +
+ "ftshoujis-uberleetrentino-stirolmutsuzawamy-vigorlicemy-wanggouv" +
+ "icenzamyactivedirectorymyasustor-elvdalmycdn77-securechtrainingm" +
+ "ydissentrentinoaltoadigemydrobofagemydshowamyeffectrentinos-tiro" +
+ "lmyfirewallonieruchomoscienceandindustrynmyfritzmyftpaccesshowti" +
+ "meteorapphilipsynology-diskstationmyfusionmyhome-serverrankoshig" +
+ "ayanagawamykolaivaporcloudmymailermymediapchryslermyokohamamatsu" +
+ "damypepsongdalenviknakanojohanamakinoharamypetshriramlidlugoleka" +
+ "gaminoduminamiyamashirokawanabelembroideryggeelvincklabudhabikin" +
+ "okawabarthagakhanamigawamyphotoshibajddarchaeologyeongnamegawalb" +
+ "rzycharternidmypsxn--30rr7ymysecuritycamerakermyshopblocksienara" +
+ "shinomytis-a-bookkeeperugiamyvnchungnamdalseidfjordyndns-remotew" +
+ "dyndns-serverdalouvreggioemiliaromagnakayamatsumaebashikshacknet" +
+ "oyookanmakiwakunigamidsundyndns-weberlincolnissandnessjoenissayo" +
+ "koshibahikariwanumatakazakis-a-greenissedalowiczest-le-patrondhe" +
+ "immobilienisshingugepicturesilkomaganepiemontepilotsimple-urlpim" +
+ "ientaketomisatolgapinkomakiyosumy-routerpioneerpippuphonefossigd" +
+ "alpiszpittsburghofauskedsmokorsetagayasells-for-unzenpiwatepizza" +
+ "pkomatsushimashikizunokunimihoboleslawiechristiansburgroks-thisa" +
+ "yamanobeokakudamatsueplanetariuminanoplantationplantsirdalplatfo" +
+ "rmshangrilanciaplaystationplazaplchurchaseljeepostfoldnavyplumbi" +
+ "ngopmnpodzonepohlpoivronpokerpokrovskomforbarclays3-us-gov-west-" +
+ "1politiendapolkowicepoltavalle-aostathellezajskommunalforbundpom" +
+ "orzeszowioslingpordenonepornporsangerporsanguidellogliastradingp" +
+ "orsgrunnanpoznanpraxis-a-bruinsfanprdpreservationpresidioprgmrpr" +
+ "imeloyalistockholmestrandprincipeprivatizehealthinsuranceprochow" +
+ "iceproductionslupskommuneprofbsbxn--12cfi8ixb8lvivano-frankivska" +
+ "tsuyamasfjordenprogressivegasiapromombetsurfbx-oscholarshipschoo" +
+ "lpropertyprotectionprotonetrentinosud-tirolprudentialpruszkowitd" +
+ "komonoprzeworskogptplusgardenpvtrentinosudtirolpwcirclegnicafede" +
+ "rationiyodogawapzqldqponqslgbtrentinosued-tirolquicksytesnoasait" +
+ "omobellevuelosangelesjaguarchitecturealtychyattorneyagawalesundq" +
+ "uipelementsokanazawaqvcircustomerstuff-4-salestufftoread-booksne" +
+ "solognestuttgartritonsusakis-very-evillagesusonosuzakaneyamazoes" +
+ "uzukaniepcesuzukis-very-goodhandsonsvalbardunloppacificitadelive" +
+ "rysveiosvelvikongsbergsvizzeraswedenswidnicartierswiebodzindiana" +
+ "polis-a-bloggerswiftcoversicherungswinoujscienceandhistoryswissh" +
+ "ikis-very-nicesynology-dsolundbeckomorotsukamiokamikoaniikappugl" +
+ "iatushuissier-justicetuvalle-daostaticsomatuxfamilytwmailvennesl" +
+ "askerrylogisticsomnaritakurashikis-very-badajozoravestfoldvestne" +
+ "soovestre-slidreamhostersopotrentinosuedtirolvestre-totennishiaw" +
+ "akuravestvagoyvevelstadvibo-valentiavibovalentiavideovillaskimit" +
+ "subatamicable-modembetsukuis-very-sweetpeppervinnicartoonartdeco" +
+ "ffeedbackplaneappspotagervinnytsiavipsinaappiagetmyiphoenixn--32" +
+ "vp30haibarakitahatakamatsukawavirginiavirtualvirtueeldomeindianm" +
+ "arketingvirtuelvisakegawavistaprinternationalfirearmsor-odalvite" +
+ "rboltrogstadvivoldavixn--3bst00minnesotaketakatsukis-into-gamess" +
+ "inatsukigatakasagotembaixadavlaanderenvladikavkazimierz-dolnyvla" +
+ "dimirvlogoipictetrentinostirolvolkswagentsor-varangervologdansko" +
+ "ninjamisonvolvolkenkundenvolyngdalvossevangenvotevotingvotoyonak" +
+ "agyokutoursorfoldwloclawekonskowolayangroupharmacyshirahamatonbe" +
+ "tsurnadalwmflabsorreisahayakawakamiichikawamisatotalworldworse-t" +
+ "handawowithgoogleapisa-hockeynutsiracusakatakinouewritesthisblog" +
+ "sytewroclawithyoutubeneventoeidsvollwtcitichernigovernmentoyonow" +
+ "tfbxoschulewuozuwwwiwatsukiyonowruzhgorodeowzmiuwajimaxn--45brj9" +
+ "civilaviationxn--45q11civilisationxn--4gbriminingxn--4it168dxn--" +
+ "4it797konyveloftrentino-sudtirolxn--4pvxs4allxn--54b7fta0ccivili" +
+ "zationxn--55qw42gxn--55qx5dxn--5js045dxn--5rtp49civilwarmanageme" +
+ "ntoyosatoyakokonoexn--5rtq34kooris-an-anarchistoricalsocietyxn--" +
+ "5su34j936bgsgxn--5tzm5gxn--6btw5axn--6frz82gxn--6orx2rxn--6qq986" +
+ "b3xlxn--7t0a264claimsarlucaniaxn--80adxhksortlandxn--80ao21axn--" +
+ "80aqecdr1axn--80asehdbarreauctionflfanfshostrowiecasertaipeiheij" +
+ "iiyamanouchikuhokuryugasakitaurayasudaukraanghkeymachineustarhub" +
+ "alsanagochihayaakasakawaharanzanpachigasakicks-assedicasadelamon" +
+ "edatingjemnes3-ap-southeast-2xn--80aswgxn--80audnedalnxn--8ltr62" +
+ "kopervikhmelnytskyivaolbia-tempio-olbiatempioolbialystokkepnogat" +
+ "aijis-an-actresshintokushimaxn--8pvr4uxn--8y0a063axn--90a3academ" +
+ "y-firewall-gatewayxn--90aishobaraomoriguchiharahkkeravjuedisches" +
+ "apeakebayernrtromsakakinokiaxn--90azhytomyrxn--9dbhblg6dietcimdb" +
+ "arrel-of-knowledgeologyonagoyaurskog-holandroverhalla-speziaerop" +
+ "ortalaheadjudaicaaarborteaches-yogasawaracingroks-theatree164xn-" +
+ "-9dbq2axn--9et52uxn--9krt00axn--andy-iraxn--aroport-byandexn--3d" +
+ "s443gxn--asky-iraxn--aurskog-hland-jnbarrell-of-knowledgeometre-" +
+ "experts-comptables3-us-west-1xn--avery-yuasakuhokkaidoomdnshome-" +
+ "webservercellikes-piedmontblancomeeresorumincommbankmpspbarclayc" +
+ "ards3-us-east-2xn--b-5gaxn--b4w605ferdxn--bck1b9a5dre4cldmailucc" +
+ "apitalonewportlligatoyotaris-a-gurulsandoyxn--bdddj-mrabdxn--bea" +
+ "ralvhki-y4axn--berlevg-jxaxn--bhcavuotna-s4axn--bhccavuotna-k7ax" +
+ "n--bidr-5nachikatsuuraxn--bievt-0qa2xn--bjarky-fyaotsurreyxn--bj" +
+ "ddar-ptamayufuettertdasnetzxn--blt-elabourxn--bmlo-graingerxn--b" +
+ "od-2naroyxn--brnny-wuaccident-investigation-aptibleaseating-orga" +
+ "nicbcn-north-1xn--brnnysund-m8accident-prevention-webhopenairbus" +
+ "antiquest-a-la-maisondre-landebudapest-a-la-masionionjukudoyamag" +
+ "entositelekommunikationthewifiat-band-campaniaxn--brum-voagatrom" +
+ "sojampagefrontapphotographysioxn--btsfjord-9zaxn--c1avgxn--c2br7" +
+ "gxn--c3s14mintelligencexn--cck2b3barsyonlinewhampshirebungoonord" +
+ "-odalazioceanographics3-us-west-2xn--cg4bkis-with-thebandovre-ei" +
+ "kerxn--ciqpnxn--clchc0ea0b2g2a9gcdn77-sslattumisakis-leetrentino" +
+ "-s-tirollagrigentomologyeongbukharkivgucciprianiigataishinomakim" +
+ "obetsuliguriaxn--comunicaes-v6a2oxn--correios-e-telecomunicaes-g" +
+ "hc29axn--czr694bashkiriaustevollarvikarasjohkamiminers3-ca-centr" +
+ "al-1xn--czrs0trusteexn--czru2dxn--czrw28basilicataniaustinnatura" +
+ "lsciencesnaturelles3-eu-central-1xn--d1acj3basketballfinanzgorau" +
+ "straliaisondriodejaneirochesterepbodynathomebuiltatarantottoribe" +
+ "staddnskingjerdrumckinseyokosukanzakiwienaturbruksgymnaturhistor" +
+ "isches3-eu-west-1xn--d1alfaromeoxn--d1atrvarggatroandinosaureise" +
+ "nxn--d5qv7z876clickasumigaurawa-mazowszextraspacekitagatajirissa" +
+ "gamiharaxn--davvenjrga-y4axn--djrs72d6uyxn--djty4koryokamikawane" +
+ "honbetsurutaharaxn--dnna-grajewolterskluwerxn--drbak-wuaxn--dyry" +
+ "-iraxn--e1a4clinichernihivanovodkagoshimalvikashiwaraxn--eckvdtc" +
+ "9dxn--efvn9southcarolinazawaxn--efvy88hair-surveillancexn--ehqz5" +
+ "6nxn--elqq16hakatanoshiroomuraxn--estv75gxn--eveni-0qa01gaxn--f6" +
+ "qx53axn--fct429kosaigawaxn--fhbeiarnxn--finny-yuaxn--fiq228c5hso" +
+ "uthwestfalenxn--fiq64batodayonaguniversityoriikariyaltakasakiyok" +
+ "awaraustrheimatunduhrennesoyokoteastcoastaldefencebinagisochildr" +
+ "ensgardenatuurwetenschappenaumburgjerstadotsuruokakegawaetnagaha" +
+ "maroygardenebakkeshibechambagriculturennebudejjudygarlandd-dnsfo" +
+ "r-better-thanawawdev-myqnapcloudcontrolapplinzi234xn--fiqs8sowax" +
+ "n--fiqz9spjelkavikomvuxn--2m4a15exn--fjord-lraxn--fjq720axn--fl-" +
+ "ziaxn--flor-jraxn--flw351exn--fpcrj9c3dxn--frde-grandrapidspread" +
+ "bettingxn--frna-woaraisaijotrysiljanxn--frya-hraxn--fzc2c9e2clin" +
+ "iquenoharaxn--fzys8d69uvgmailxn--g2xx48clintonoshoesarpsborgrond" +
+ "arxn--gckr3f0fedorapeopleirfjordxn--gecrj9clothingrongaxn--ggavi" +
+ "ika-8ya47hakodatexn--gildeskl-g0axn--givuotna-8yasakaiminatoyone" +
+ "zawaxn--gjvik-wuaxn--gk3at1exn--gls-elacaixaxn--gmq050isleofmand" +
+ "alxn--gmqw5axn--h-2failxn--h1aeghakonexn--h2brj9cnsarufutsunomiy" +
+ "awakasaikaitakoelnxn--h3cuzk1digitalxn--hbmer-xqaxn--hcesuolo-7y" +
+ "a35batsfjordivtasvuodnakaiwamizawauthordalandroiddnss3-eu-west-2" +
+ "xn--hery-iraxn--hgebostad-g3axn--hmmrfeasta-s4acctulangevagrarbo" +
+ "retumbriaxn--hnefoss-q1axn--hobl-iraxn--holtlen-hxaxn--hpmir-xqa" +
+ "xn--hxt814exn--hyanger-q1axn--hylandet-54axn--i1b6b1a6a2exn--imr" +
+ "513nxn--indery-fyasugissmarterthanyouxn--io0a7iwchoshibuyachiyod" +
+ "avvenjargapartmentsardiniaxn--j1aefedoraprojectrani-andria-barle" +
+ "tta-trani-andriaxn--j1amhakubaghdadxn--j6w193gxn--jlq61u9w7bauha" +
+ "usposts-and-telecommunicationsncfdivttasvuotnakamagayahababyklec" +
+ "lercasinordre-landiyoshiokaracoldwarmiamihamadautomotivecoalipay" +
+ "okozebinorfolkebibleikangereportateshinanomachimkentateyamagroce" +
+ "rybnikahokutobamaintenancebetsukubank12xn--jlster-byasuokanraxn-" +
+ "-jrpeland-54axn--jvr189misasaguris-lostre-toteneis-an-actorxn--k" +
+ "7yn95exn--karmy-yuaxn--kbrq7oxn--kcrx77d1x4axn--kfjord-iuaxn--kl" +
+ "bu-woaxn--klt787dxn--kltp7dxn--kltx9axn--klty5xn--3e0b707exn--ko" +
+ "luokta-7ya57hakuis-a-photographerokuappasadenamsosnowiechonanbui" +
+ "lderschmidtre-gauldalottexn--kprw13dxn--kpry57dxn--kpu716fermoda" +
+ "lenxn--kput3ixn--krager-gyatomitamamuraxn--kranghke-b0axn--krdsh" +
+ "erad-m8axn--krehamn-dxaxn--krjohka-hwab49jeonnamerikawauexn--ksn" +
+ "es-uuaxn--kvfjord-nxaxn--kvitsy-fyatsukanumazuryxn--kvnangen-k0a" +
+ "xn--l-1fairwindspydebergxn--l1accentureklamborghiniizaxn--lahead" +
+ "ju-7yatsushiroxn--langevg-jxaxn--lcvr32dxn--ldingen-q1axn--leaga" +
+ "viika-52bbcateringebugattipschlesisches3-website-ap-northeast-1x" +
+ "n--lesund-huaxn--lgbbat1ad8jetztrentino-sud-tirolxn--lgrd-poacnt" +
+ "oyotomiyazakis-a-hard-workerxn--lhppi-xqaxn--linds-pramericanart" +
+ "unesolutionsokndalxn--lns-qlansrlxn--loabt-0qaxn--lrdal-sraxn--l" +
+ "renskog-54axn--lt-liacolonialwilliamsburgrossetouchijiwadell-ogl" +
+ "iastraderxn--lten-granexn--lury-iraxn--m3ch0j3axn--mely-iraxn--m" +
+ "erker-kuaxn--mgb2ddesrtrentoyokawaxn--mgb9awbferraraxn--mgba3a3e" +
+ "jtunkongsvingerxn--mgba3a4f16axn--mgba3a4franamizuholdingsmilelx" +
+ "n--mgba7c0bbn0axn--mgbaakc7dvferrarittogoldpoint2thisamitsukexn-" +
+ "-mgbaam7a8hakusandiegoodyearxn--mgbab2bdxn--mgbai9a5eva00bbtatto" +
+ "olsztynsettlers3-website-ap-southeast-1xn--mgbai9azgqp6jevnakers" +
+ "huscountryestateofdelawarezzoologyxn--mgbayh7gpagespeedmobilizer" +
+ "oxn--mgbb9fbpobanazawaxn--mgbbh1a71exn--mgbc0a9azcgxn--mgbca7dzd" +
+ "oxn--mgberp4a5d4a87gxn--mgberp4a5d4arxn--mgbi4ecexposedxn--mgbpl" +
+ "2fhskodjejuegoshikiminokamoenairportland-4-salernoboribetsucksrv" +
+ "areserveblogspotrevisohughesolarssonxn--mgbqly7c0a67fbcoloradopl" +
+ "ateaudioxn--mgbqly7cvafredrikstadtvstordalxn--mgbt3dhdxn--mgbtf8" +
+ "flatangerxn--mgbtx2bbvacationswatch-and-clockerhcloudns3-website" +
+ "-ap-southeast-2xn--mgbx4cd0abbotturystykannamifunexn--mix082ferr" +
+ "eroticanonoichinomiyakexn--mix891fetsundxn--mjndalen-64axn--mk0a" +
+ "xindustriesteambulancexn--mk1bu44columbusheyxn--mkru45ixn--mlatv" +
+ "uopmi-s4axn--mli-tlanxesstorehabmerxn--mlselv-iuaxn--moreke-juax" +
+ "n--mori-qsakuragawaxn--mosjen-eyawaraxn--mot-tlapyatigorskypexn-" +
+ "-mre-og-romsdal-qqbentleyukinfinitintuitaxihuanhlfanhs3-website-" +
+ "eu-west-1xn--msy-ula0haldenxn--mtta-vrjjat-k7afamilycompanycommu" +
+ "nitysfjordyndns-wikinkobayashikaoirminamibosogndalucernexn--muos" +
+ "t-0qaxn--mxtq1misawaxn--ngbc5azdxn--ngbe9e0axn--ngbrxn--3oq18vl8" +
+ "pn36axn--nit225kosakaerodromegallupinbarefootballooningjovikarat" +
+ "suginamikatagamiharuconnectatsunobiraugustowadaegubs3-ap-southea" +
+ "st-1xn--nmesjevuemie-tcbalestrandabergamoarekexn--nnx388axn--nod" +
+ "exn--nqv7fs00emaxn--nry-yla5gxn--ntso0iqx3axn--ntsq17gxn--nttery" +
+ "-byaeservecounterstrikexn--nvuotna-hwaxn--nyqy26axn--o1achattano" +
+ "oganordreisa-geekoseis-an-artisteinkjerusalemrxn--o3cw4halsaintl" +
+ "ouis-a-anarchistoiredumbrellanbibaidarxn--o3cyx2axn--od0algxn--o" +
+ "d0aq3beppublishproxyzgorzeleccolognewyorkshirecipesaro-urbino-pe" +
+ "sarourbinopesaromasvuotnaharimamurogawatches3-website-sa-east-1x" +
+ "n--ogbpf8flekkefjordxn--oppegrd-ixaxn--ostery-fyawatahamaxn--osy" +
+ "ro-wuaxn--p1acfgujolsterxn--p1aixn--pbt977comobilyxn--pgbs0dhlxn" +
+ "--porsgu-sta26fhvalerxn--pssu33lxn--pssy2uxn--q9jyb4comparemarke" +
+ "rryhotelsasayamaxn--qcka1pmcdonaldstorfjordxn--qqqt11misconfused" +
+ "xn--qxamuneuestorjelenia-goraxn--rady-iraxn--rdal-poaxn--rde-ula" +
+ "quilancashireggiocalabriaxn--rdy-0nabarixn--rennesy-v1axn--rhkke" +
+ "rvju-01aflakstadaokagakibichuoxn--rholt-mragowoodsidexn--rhqv96g" +
+ "xn--rht27zxn--rht3dxn--rht61exn--risa-5narusawaxn--risr-iraxn--r" +
+ "land-uuaxn--rlingen-mxaxn--rmskog-byaxn--rny31hammarfeastafricap" +
+ "etownnews-stagingxn--rovu88bernuorockartuzyukuhashimoichinosekig" +
+ "aharautoscanadaejeonbukarasjokarasuyamarylhurstjordalshalsenaust" +
+ "dalavagiskebizenakaniikawatanaguramusementarnobrzegyptianaturalh" +
+ "istorymuseumcenterepaircraftarumizusawabogadocscbgdyniabkhaziama" +
+ "llamagazineat-url-o-g-i-nativeamericanantiques3-ap-northeast-1ka" +
+ "ppchizippodhaleangaviikadenadexetereit3l3p0rtargets-itargiving12" +
+ "000emmafanconagawakayamadridvagsoyericssonyoursidealerimo-i-rana" +
+ "amesjevuemielno-ip6xn--rros-granvindafjordxn--rskog-uuaxn--rst-0" +
+ "narutokyotangovtuscanyxn--rsta-francaiseharaxn--ryken-vuaxn--ryr" +
+ "vik-byaxn--s-1faithruherecreationxn--s9brj9compute-1xn--sandness" +
+ "jen-ogbizxn--sandy-yuaxn--seral-lraxn--ses554gxn--sgne-gratangen" +
+ "xn--skierv-utazaskoyabearalvahkihokumakogengerdalcestpetersburgx" +
+ "n--skjervy-v1axn--skjk-soaxn--sknit-yqaxn--sknland-fxaxn--slat-5" +
+ "narviikamisunagawaxn--slt-elabbvieeexn--smla-hraxn--smna-gratis-" +
+ "a-bulls-fanxn--snase-nraxn--sndre-land-0cbremangerxn--snes-poaxn" +
+ "--snsa-roaxn--sr-aurdal-l8axn--sr-fron-q1axn--sr-odal-q1axn--sr-" +
+ "varanger-ggbeskidyn-o-saurlandes3-website-us-east-1xn--srfold-by" +
+ "axn--srreisa-q1axn--srum-grazxn--stfold-9xaxn--stjrdal-s1axn--st" +
+ "jrdalshalsen-sqbestbuyshouses3-website-us-west-1xn--stre-toten-z" +
+ "cbstreamsterdamnserverbaniaxn--t60b56axn--tckweatherchannelxn--t" +
+ "iq49xqyjewelryxn--tjme-hraxn--tn0agrinet-freakstudioxn--tnsberg-" +
+ "q1axn--tor131oxn--trany-yuaxn--trgstad-r1axn--trna-woaxn--troms-" +
+ "zuaxn--tysvr-vraxn--uc0atvaroyxn--uc0ay4axn--uist22hamurakamigor" +
+ "is-a-playerxn--uisz3gxn--unjrga-rtaobaokinawashirosatochiokinosh" +
+ "imalatvuopmiasakuchinotsuchiurakawakuyabukievenestudyndns-at-hom" +
+ "edepotenzamamicrolightingxn--unup4yxn--uuwu58axn--vads-jraxn--va" +
+ "rd-jraxn--vegrshei-c0axn--vermgensberater-ctbetainaboxfusejnyuri" +
+ "honjoyentgoryusuharaveroykenglandds3-external-1xn--vermgensberat" +
+ "ung-pwbieigersundnpalaceu-3utilitiesquare7xn--vestvgy-ixa6oxn--v" +
+ "g-yiabcgxn--vgan-qoaxn--vgsy-qoa0jewishartgalleryxn--vgu402compu" +
+ "terhistoryofscience-fictionxn--vhquvbargainstitutelevisionayorov" +
+ "nobninskarelianceu-2xn--vler-qoaxn--vre-eiker-k8axn--vrggt-xqadx" +
+ "n--vry-yla5gxn--vuq861bielawalmartjeldsundrangedalillyusuisserve" +
+ "exchangevents3-website-us-west-2xn--w4r85el8fhu5dnraxn--w4rs40lx" +
+ "n--wcvs22dxn--wgbh1comsecuritytacticsaseboknowsitallukowhoswhokk" +
+ "sundyndns-workisboringroundhandlingroznyxn--wgbl6axn--xhq521biel" +
+ "laakesvuemielecceverbankarlsoyuufcfanikinuyamashinashikitchenikk" +
+ "oebenhavnikolaevennodessagaeroclubmedecincinnationwidealstahauge" +
+ "sunderseaportsinfolldalabamagasakishimabarackmazerbaijan-mayendo" +
+ "ftheinternetflixilovecollegefantasyleaguernseyuzawavocatanzarowe" +
+ "ddingjesdalavangenaval-d-aosta-valleyolasitehimejibigawaskvolloa" +
+ "bathsbc66xn--xkc2al3hye2axn--xkc2dl3a5ee0hangglidingxn--y9a3aqua" +
+ "riumishimatsunoxn--yer-znarvikosherbrookegawaxn--yfro4i67oxn--yg" +
+ "arden-p1axn--ygbi2ammxn--3pxu8konsulatrobeepilepsydneyxn--ystre-" +
+ "slidre-ujbieszczadygeyachimataikikonaioirasebastopologyeonggieht" +
+ "avuoatnagaivuotnagaokakyotambabia-goracleaningatlantabuseekloges" +
+ "t-mon-blogueurovisionikonantankarmoyxn--zbx025dxn--zf0ao64axn--z" +
+ "f0avxn--42c2d9axn--zfr164bievatmallorcadaquesakurainvestmentsaky" +
+ "otanabellunorddalimanowarudavoues3-fips-us-gov-west-1xperiaxz"
// nodes is the list of nodes. Each node is represented as a uint32, which
// encodes the node's children, wildcard bit and node type (as an index into
@@ -483,8127 +489,8268 @@ const text = "bikedagestangeorgeorgiaxagrocerybnikahokutobishimaizuruhreportar"
// [15 bits] text index
// [ 6 bits] text length
var nodes = [...]uint32{
- 0x32f983,
- 0x28a344,
- 0x30e286,
- 0x371b43,
- 0x371b46,
- 0x394646,
- 0x3a5003,
- 0x367844,
- 0x260687,
- 0x30dec8,
- 0x1a04cc2,
- 0x316e47,
- 0x355d89,
- 0x32228a,
- 0x32228b,
- 0x22eec3,
- 0x28fac6,
- 0x2327c5,
- 0x1e04e02,
- 0x217c04,
- 0x2a90c3,
- 0x3ac705,
- 0x2203942,
- 0x329e03,
- 0x26957c4,
- 0x368e05,
- 0x2a10182,
- 0x3787ce,
- 0x253343,
- 0x3a03c6,
+ 0x31a403,
+ 0x284944,
+ 0x2dd106,
+ 0x3706c3,
+ 0x3706c6,
+ 0x398706,
+ 0x3a8103,
+ 0x2fe244,
+ 0x38e987,
+ 0x2dcd48,
+ 0x1a05702,
+ 0x316e87,
+ 0x35c789,
+ 0x2abb0a,
+ 0x2abb0b,
+ 0x22f383,
+ 0x287506,
+ 0x232dc5,
+ 0x1e021c2,
+ 0x2161c4,
+ 0x238743,
+ 0x26fc45,
+ 0x2214902,
+ 0x347743,
+ 0x266f744,
+ 0x33ddc5,
+ 0x2a04702,
+ 0x376b4e,
+ 0x24c4c3,
+ 0x38ae46,
0x2e00142,
- 0x30e407,
- 0x23ae46,
- 0x3200c42,
- 0x22a343,
- 0x254b04,
- 0x325a86,
- 0x35c208,
- 0x28a706,
- 0x21ad04,
- 0x3601442,
- 0x332309,
- 0x207587,
- 0x256286,
- 0x339309,
- 0x29d788,
- 0x328d44,
- 0x364906,
- 0x36b606,
- 0x3a02942,
- 0x27144f,
- 0x20f94e,
- 0x2131c4,
- 0x2c6085,
- 0x367745,
- 0x385989,
- 0x241a89,
- 0x368047,
- 0x23c9c6,
- 0x273a43,
- 0x3e02342,
- 0x2df283,
- 0x205aca,
- 0x221d83,
- 0x303145,
- 0x289c02,
- 0x289c09,
- 0x4200f82,
- 0x203d84,
- 0x2250c6,
- 0x2eb205,
- 0x34cbc4,
- 0x4a04c04,
- 0x205283,
- 0x231ac4,
- 0x4e02e02,
- 0x209f04,
- 0x52f4e04,
- 0x24ae0a,
- 0x5601342,
- 0x303907,
- 0x26b8c8,
- 0x6202f82,
- 0x31cf07,
- 0x2c2e04,
- 0x2c2e07,
- 0x373d85,
- 0x357a47,
- 0x367e06,
- 0x2e8384,
- 0x39c0c5,
- 0x294847,
- 0x7206cc2,
- 0x34f703,
- 0x200582,
- 0x200583,
- 0x76125c2,
- 0x221ec5,
- 0x7a02302,
- 0x27bd84,
- 0x2810c5,
- 0x213107,
- 0x269f0e,
- 0x224bc4,
- 0x206a84,
- 0x211503,
- 0x2ceac9,
- 0x2ed94b,
- 0x3a6548,
- 0x3148c8,
- 0x318dc8,
- 0x237908,
- 0x33914a,
- 0x357947,
- 0x318146,
- 0x7ea4fc2,
- 0x35bc03,
- 0x366c43,
- 0x371144,
- 0x3a5043,
- 0x324cc3,
- 0x171f542,
- 0x8203682,
- 0x252185,
- 0x2a11c6,
- 0x2d6d44,
- 0x2f6e07,
- 0x382986,
- 0x319dc4,
- 0x398247,
- 0x20f7c3,
- 0x86c8902,
- 0x8b124c2,
- 0x8e1c502,
- 0x21c506,
+ 0x2dd287,
+ 0x236f46,
+ 0x3209282,
+ 0x229d83,
+ 0x24d9c4,
+ 0x325e86,
+ 0x26c588,
+ 0x2761c6,
+ 0x2011c4,
+ 0x3600242,
+ 0x3335c9,
+ 0x20a1c7,
+ 0x351e86,
+ 0x330c89,
+ 0x298308,
+ 0x26e904,
+ 0x241ec6,
+ 0x222a46,
+ 0x3a022c2,
+ 0x26480f,
+ 0x20948e,
+ 0x211d04,
+ 0x2c2b85,
+ 0x2fe145,
+ 0x39e189,
+ 0x23c409,
+ 0x349a87,
+ 0x20fa86,
+ 0x275a83,
+ 0x3e02a82,
+ 0x315503,
+ 0x34e24a,
+ 0x20f903,
+ 0x2af985,
+ 0x284202,
+ 0x284209,
+ 0x4200ec2,
+ 0x212484,
+ 0x2b9686,
+ 0x2f3645,
+ 0x3552c4,
+ 0x4a05644,
+ 0x2030c3,
+ 0x232344,
+ 0x4e00c02,
+ 0x268d44,
+ 0x52ef6c4,
+ 0x25ef4a,
+ 0x5603dc2,
+ 0x2ba587,
+ 0x2f3b08,
+ 0x6208142,
+ 0x311687,
+ 0x2bf204,
+ 0x2bf207,
+ 0x36e0c5,
+ 0x34ffc7,
+ 0x349846,
+ 0x24f3c4,
+ 0x38c105,
+ 0x29e447,
+ 0x72001c2,
+ 0x26e503,
+ 0x200b82,
+ 0x200b83,
+ 0x760de02,
+ 0x2102c5,
+ 0x7a02a42,
+ 0x350e04,
+ 0x2734c5,
+ 0x211c47,
+ 0x26bcce,
+ 0x2b9184,
+ 0x245544,
+ 0x202f03,
+ 0x281d49,
+ 0x31ee0b,
+ 0x2e9a88,
+ 0x379948,
+ 0x3a9908,
+ 0x22ae48,
+ 0x330aca,
+ 0x34fec7,
+ 0x318186,
+ 0x7e87002,
+ 0x35e203,
+ 0x367e43,
+ 0x36f4c4,
+ 0x3a8143,
+ 0x3250c3,
+ 0x1720b82,
+ 0x8202502,
+ 0x27a8c5,
+ 0x296206,
+ 0x2d1b84,
+ 0x375487,
+ 0x2e1886,
+ 0x331f84,
+ 0x39d3c7,
+ 0x203bc3,
+ 0x86c54c2,
+ 0x8b0f242,
+ 0x8e16742,
+ 0x216746,
0x9200002,
- 0x359b85,
- 0x320a83,
- 0x200004,
- 0x2ee344,
- 0x2ee345,
- 0x203e43,
- 0x9768883,
- 0x9a07f42,
- 0x28e245,
- 0x28e24b,
- 0x2d0686,
- 0x20a0cb,
- 0x225b04,
- 0x20a7c9,
- 0x20be84,
- 0x9e0c0c2,
- 0x20cf83,
- 0x210843,
- 0x1600802,
- 0x260903,
- 0x2109ca,
- 0xa211cc2,
- 0x217e85,
- 0x2983ca,
- 0x2dc184,
- 0x369f03,
- 0x315044,
- 0x213643,
- 0x213644,
- 0x213647,
- 0x213985,
- 0x213e05,
- 0x2150c6,
- 0x2167c6,
- 0x2182c3,
- 0x21c188,
- 0x221c43,
- 0xa601082,
- 0x21cac8,
- 0x21ff0b,
- 0x2216c8,
- 0x2221c6,
- 0x222a47,
- 0x226488,
- 0xb2413c2,
- 0xb6c2fc2,
- 0x326388,
- 0x257ec7,
- 0x22bac5,
- 0x22bac8,
- 0x2bf708,
- 0x3871c3,
- 0x22a784,
- 0x371182,
- 0xba2af82,
- 0xbe5ba02,
- 0xc62c1c2,
- 0x22c1c3,
- 0xca0e542,
- 0x367803,
- 0x2f8e04,
- 0x218443,
- 0x328d04,
- 0x25fe4b,
- 0x21fe43,
- 0x2e4d06,
- 0x226284,
- 0x2a5a8e,
- 0x361c05,
- 0x3a04c8,
- 0x282247,
- 0x28224a,
- 0x229d03,
- 0x2b3447,
- 0x2edb05,
- 0x22ea44,
- 0x272486,
- 0x272487,
- 0x32b704,
- 0x304ac7,
- 0x26a244,
- 0x35bc84,
- 0x35bc86,
- 0x386904,
- 0x20e546,
- 0x223c83,
- 0x22b888,
- 0x30c3c8,
- 0x24e2c3,
- 0x2608c3,
- 0x204f04,
- 0x395943,
- 0xce0d882,
- 0xd2db442,
- 0x20c043,
- 0x201806,
- 0x35c383,
- 0x28bfc4,
- 0xd6081c2,
- 0x2081c3,
- 0x358243,
- 0x219942,
- 0xda02ac2,
- 0x2c55c6,
- 0x2334c7,
- 0x2f7a85,
- 0x37da44,
- 0x3723c5,
- 0x367007,
- 0x274205,
- 0x2d3e89,
- 0x2e0586,
- 0x2e5488,
- 0x2f7986,
- 0xde0db42,
- 0x362f48,
- 0x2f8bc6,
- 0x20db45,
- 0x304687,
- 0x30c2c4,
- 0x30c2c5,
- 0x28a8c4,
- 0x28a8c8,
- 0xe20a182,
- 0xe60c502,
- 0x313646,
- 0x2c28c8,
- 0x31f145,
- 0x332c06,
- 0x3356c8,
- 0x33e1c8,
- 0xea0fd45,
- 0xee0c504,
- 0x2958c7,
- 0xf20bbc2,
- 0xf61c402,
- 0x1060d1c2,
- 0x35aa45,
- 0x2a8505,
- 0x282606,
- 0x3698c7,
- 0x376ec7,
- 0x10ed0783,
- 0x2e3447,
- 0x30dc88,
- 0x3823c9,
- 0x378987,
- 0x390287,
- 0x3a5b08,
- 0x3aa206,
- 0x22e546,
- 0x22f18c,
- 0x230b0a,
- 0x230fc7,
- 0x23268b,
- 0x233307,
- 0x23330e,
- 0x236244,
- 0x23a184,
- 0x23b547,
- 0x264f47,
- 0x240d46,
- 0x240d47,
- 0x241207,
- 0x18a20802,
- 0x2420c6,
- 0x2420ca,
- 0x24294b,
- 0x243407,
- 0x244ec5,
- 0x245203,
- 0x246c46,
- 0x246c47,
- 0x241c43,
- 0x18e38702,
- 0x24b74a,
- 0x19356fc2,
- 0x196acdc2,
- 0x19a4cec2,
- 0x19e26982,
- 0x24da85,
- 0x24e0c4,
- 0x1a604d02,
- 0x209f85,
- 0x294ac3,
- 0x20bf85,
- 0x237804,
- 0x20a684,
- 0x2ba5c6,
- 0x26a546,
- 0x28e443,
- 0x3b1484,
- 0x209383,
- 0x1aa03b02,
- 0x263544,
- 0x263546,
- 0x295e45,
- 0x27fdc6,
- 0x304788,
- 0x20cb44,
- 0x2a8e88,
- 0x343fc5,
- 0x24a108,
- 0x2b1cc6,
- 0x2bddc7,
- 0x26cdc4,
- 0x26cdc6,
- 0x25e303,
- 0x382e43,
- 0x2c9388,
- 0x318bc4,
- 0x238d47,
- 0x220246,
- 0x2dad89,
- 0x315108,
- 0x319f08,
- 0x349184,
- 0x39b9c3,
- 0x23e342,
- 0x1ba34682,
- 0x1be16102,
- 0x3b2783,
- 0x1c204a42,
- 0x2607c4,
- 0x390a46,
- 0x39a6c5,
- 0x2a4383,
- 0x232004,
- 0x2b6f47,
- 0x26aa43,
- 0x250d08,
- 0x20e8c5,
- 0x370083,
- 0x281045,
- 0x281184,
- 0x2fb8c6,
- 0x210384,
- 0x211a46,
- 0x213046,
- 0x263004,
- 0x21fd83,
- 0x2225c3,
- 0x1c604e42,
- 0x377905,
- 0x222e03,
- 0x1ca1c3c2,
- 0x22f143,
- 0x210085,
- 0x231b83,
- 0x231b89,
- 0x1ce07d02,
- 0x1d601142,
- 0x28d9c5,
- 0x21a746,
- 0x2d6906,
- 0x2b94c8,
- 0x2b94cb,
- 0x20538b,
- 0x2f7c85,
- 0x2e1045,
- 0x2c9fc9,
- 0x1600742,
- 0x2631c8,
- 0x206044,
- 0x1de001c2,
- 0x25fa83,
- 0x1e665106,
- 0x20f088,
- 0x1ea04782,
- 0x233ec8,
- 0x1ee01742,
- 0x225c4a,
- 0x1f2d0e43,
- 0x3b1e86,
- 0x206988,
- 0x207d48,
- 0x39a9c6,
- 0x36d5c7,
- 0x271647,
- 0x220b0a,
- 0x2dc204,
- 0x3423c4,
- 0x355589,
- 0x1fb8fc85,
- 0x20fb46,
- 0x208203,
- 0x251944,
- 0x201e44,
- 0x201e47,
- 0x22cec7,
- 0x237044,
- 0x220a45,
- 0x2826c8,
- 0x350707,
- 0x3619c7,
- 0x1fe041c2,
- 0x226004,
- 0x298cc8,
- 0x381004,
- 0x24f0c4,
- 0x24fa45,
- 0x24fb87,
- 0x215809,
- 0x2505c4,
- 0x2510c9,
- 0x251308,
- 0x2516c4,
- 0x2516c7,
- 0x20251c43,
- 0x252487,
- 0x16101c2,
- 0x179d442,
- 0x253386,
- 0x2539c7,
- 0x253e84,
- 0x255607,
- 0x256907,
- 0x257483,
- 0x2abc02,
- 0x229c02,
- 0x258743,
- 0x258744,
- 0x25874b,
- 0x3149c8,
- 0x25f184,
- 0x2594c5,
- 0x25ba87,
- 0x25d8c5,
- 0x2c4dca,
- 0x25f0c3,
- 0x2060da42,
- 0x22b484,
- 0x264d09,
- 0x268983,
- 0x268a47,
- 0x28ee89,
- 0x37b5c8,
- 0x2d8483,
- 0x27ff47,
- 0x280689,
- 0x2316c3,
- 0x288284,
- 0x289389,
- 0x28c6c6,
- 0x28dc83,
- 0x2023c2,
- 0x24ca43,
- 0x36ab47,
- 0x2bfa85,
- 0x35ba06,
- 0x256bc4,
- 0x2d1d45,
- 0x205a83,
- 0x218506,
- 0x20a9c2,
- 0x391084,
- 0x22ad02,
- 0x22ad03,
- 0x20a00182,
- 0x29b083,
- 0x216c44,
- 0x216c47,
- 0x200306,
- 0x201e02,
- 0x20e01dc2,
- 0x21e184,
- 0x2123b882,
- 0x21600502,
- 0x2dfcc4,
- 0x2dfcc5,
- 0x2b9cc5,
- 0x262746,
- 0x21a0ca82,
- 0x20ca85,
- 0x210d85,
- 0x225883,
- 0x215c06,
- 0x216dc5,
- 0x21c482,
- 0x33de05,
- 0x21c484,
- 0x2230c3,
- 0x223303,
- 0x21e097c2,
- 0x294a47,
- 0x221144,
- 0x221149,
- 0x251844,
- 0x228903,
- 0x341cc9,
- 0x3777c8,
- 0x2a8384,
- 0x2a8386,
- 0x210503,
- 0x259b43,
- 0x332ec3,
- 0x222ebc02,
- 0x30eb82,
- 0x22600642,
- 0x3238c8,
- 0x35c588,
- 0x394d86,
- 0x24ed45,
- 0x2b32c5,
- 0x200647,
- 0x228fc5,
- 0x2630c2,
- 0x22a9a502,
- 0x1614502,
- 0x38fe08,
- 0x362e85,
- 0x351d04,
- 0x2f18c5,
- 0x3836c7,
- 0x24f5c4,
- 0x246f82,
- 0x22e01182,
- 0x336f04,
- 0x2173c7,
- 0x28e9c7,
- 0x357a04,
- 0x298383,
- 0x24e204,
- 0x24e208,
- 0x22e886,
- 0x27230a,
- 0x2156c4,
- 0x298708,
- 0x259784,
- 0x222b46,
- 0x29a4c4,
- 0x35ad46,
- 0x221409,
- 0x25b287,
- 0x234483,
- 0x23274842,
- 0x274843,
- 0x20c2c2,
- 0x23651b02,
- 0x2f0b06,
- 0x364148,
- 0x2a9d87,
- 0x395d09,
- 0x297f09,
- 0x2ab245,
- 0x2ad3c9,
- 0x2ae045,
- 0x2ae189,
- 0x2af5c5,
- 0x2b0208,
- 0x27f284,
- 0x23a8d6c7,
- 0x294403,
- 0x2b0407,
- 0x390646,
- 0x2b08c7,
- 0x2a6d45,
- 0x2a7f83,
- 0x23e00dc2,
- 0x392604,
- 0x2423b8c2,
- 0x264403,
- 0x24618d82,
- 0x307646,
- 0x26b845,
- 0x2b2bc7,
- 0x37f183,
- 0x324c44,
- 0x2138c3,
- 0x2386c3,
- 0x24a0a3c2,
- 0x25201a02,
- 0x394744,
- 0x2abbc3,
- 0x38c985,
- 0x226d85,
- 0x25602282,
- 0x25e00bc2,
- 0x280286,
- 0x318d04,
- 0x2491c4,
- 0x2491ca,
- 0x26601d42,
- 0x37324a,
- 0x204148,
- 0x26a964c4,
- 0x201d43,
- 0x25ff43,
- 0x318f09,
- 0x2a8909,
- 0x2b7046,
- 0x26e04303,
- 0x328145,
- 0x30664d,
- 0x204306,
- 0x21268b,
- 0x27203482,
- 0x295048,
- 0x27e1c282,
- 0x282051c2,
- 0x37aa85,
- 0x28600b02,
- 0x2a3147,
- 0x212b87,
- 0x201503,
- 0x22f848,
- 0x28a02f02,
- 0x202f04,
- 0x217043,
- 0x38d045,
- 0x386fc3,
- 0x2eb106,
- 0x30bdc4,
- 0x204ec3,
- 0x234f83,
- 0x28e07042,
- 0x2f7c04,
- 0x30ed45,
- 0x35a587,
- 0x27dbc3,
- 0x2b36c3,
- 0x2b3ec3,
- 0x1621ac2,
- 0x2b3f83,
- 0x2b4b03,
- 0x2920ae42,
- 0x2cee84,
- 0x26a746,
- 0x33c7c3,
- 0x2b4f83,
- 0x296b5e02,
- 0x2b5e08,
- 0x2b60c4,
- 0x2470c6,
- 0x2b6547,
- 0x24e3c6,
- 0x295304,
- 0x37200082,
- 0x39050b,
- 0x2ffbce,
- 0x21bb0f,
- 0x29da43,
- 0x37a4ca02,
- 0x166b142,
- 0x37e02442,
- 0x29c243,
- 0x2472c3,
- 0x233106,
- 0x22ff46,
- 0x212307,
- 0x31aa84,
- 0x3821a882,
- 0x3860ec02,
- 0x2d4ac5,
- 0x2e88c7,
- 0x37e046,
- 0x38a82882,
- 0x2f5b04,
- 0x2b9783,
- 0x38e01b02,
- 0x39352883,
- 0x2ba984,
- 0x2c06c9,
- 0x16c6fc2,
- 0x39642682,
- 0x351245,
- 0x39ac7242,
- 0x39e02682,
- 0x341687,
- 0x2364c9,
- 0x35600b,
- 0x271405,
- 0x2c7c89,
- 0x276a46,
- 0x2d06c7,
- 0x3a2092c4,
- 0x32ef49,
- 0x374b07,
- 0x2255c7,
- 0x234003,
- 0x37b386,
- 0x30f887,
- 0x265383,
- 0x27c5c6,
- 0x3aa022c2,
- 0x3ae31e02,
- 0x220443,
- 0x324845,
- 0x257747,
- 0x21fac6,
- 0x2bfa05,
- 0x230044,
- 0x2efa45,
- 0x2f8284,
- 0x3b205e82,
- 0x349f07,
- 0x2e1c44,
- 0x23e244,
- 0x33328d,
- 0x257249,
- 0x381588,
- 0x25ac04,
- 0x314e85,
- 0x3b2607,
- 0x205e84,
- 0x382a47,
- 0x20c705,
- 0x3b6aa384,
- 0x36dec5,
- 0x267644,
- 0x24f706,
- 0x3696c5,
- 0x3ba24742,
- 0x369fc4,
- 0x369fc5,
- 0x3716c6,
- 0x2bfb45,
- 0x25c104,
- 0x3120c3,
- 0x204986,
- 0x22c085,
- 0x22c785,
- 0x3697c4,
- 0x215743,
- 0x21574c,
- 0x3be8d002,
- 0x3c2045c2,
- 0x3c605d82,
- 0x205d83,
- 0x205d84,
- 0x3ca032c2,
- 0x2f9648,
- 0x35bac5,
- 0x33f884,
- 0x230e46,
- 0x3ce073c2,
- 0x3d20fc42,
- 0x3d600c02,
- 0x321e85,
- 0x262ec6,
- 0x20b484,
- 0x325fc6,
- 0x3036c6,
- 0x202983,
- 0x3db1164a,
- 0x264785,
- 0x28b4c3,
- 0x223886,
- 0x305e09,
- 0x223887,
- 0x293308,
- 0x29d649,
- 0x248108,
- 0x229a46,
- 0x208843,
- 0x3de017c2,
- 0x384b03,
- 0x384b09,
- 0x368548,
- 0x3e2513c2,
- 0x3e601f02,
- 0x22d603,
- 0x2e0405,
- 0x258f44,
- 0x35e849,
- 0x226784,
- 0x26f288,
- 0x205c03,
- 0x2602c4,
- 0x2784c3,
- 0x21a788,
- 0x3331c7,
- 0x3ea0f302,
- 0x2432c2,
- 0x257d85,
- 0x3960c9,
- 0x20fbc3,
- 0x281ac4,
- 0x328104,
- 0x219e03,
- 0x28380a,
- 0x3ef73102,
- 0x3f2c0202,
- 0x2c8883,
- 0x374fc3,
- 0x1649202,
- 0x262a43,
- 0x3f60bcc2,
- 0x3fa05f02,
- 0x3fe22044,
- 0x222046,
- 0x33e8c6,
- 0x277844,
- 0x2474c3,
- 0x39bc83,
- 0x235143,
- 0x242cc6,
- 0x2ce085,
- 0x2c8e47,
- 0x2d0589,
- 0x2ccac5,
- 0x2cdfc6,
- 0x2ce548,
- 0x2ce746,
+ 0x3523c5,
+ 0x3220c3,
+ 0x200604,
+ 0x2e8f84,
+ 0x2e8f85,
+ 0x206b43,
+ 0x978d2c3,
+ 0x9a0bb42,
+ 0x289e05,
+ 0x289e0b,
+ 0x31e686,
+ 0x20cb4b,
+ 0x221344,
+ 0x20d949,
+ 0x20e9c4,
+ 0x9e0ec02,
+ 0x20f143,
+ 0x20f403,
+ 0x16105c2,
+ 0x268183,
+ 0x2105ca,
+ 0xa20b382,
+ 0x216445,
+ 0x29224a,
+ 0x2d7744,
+ 0x283783,
+ 0x26cfc4,
+ 0x212543,
+ 0x212544,
+ 0x212547,
+ 0x2140c5,
+ 0x2147c5,
+ 0x214f46,
+ 0x2157c6,
+ 0x216a03,
+ 0x21ae88,
+ 0x210043,
+ 0xa601c02,
+ 0x243448,
+ 0x213ccb,
+ 0x220148,
+ 0x220d86,
+ 0x221847,
+ 0x225348,
+ 0xb642b42,
+ 0xbabf3c2,
+ 0x326788,
+ 0x35e4c7,
+ 0x246085,
+ 0x357f48,
+ 0x2bd408,
+ 0x34dd83,
+ 0x22a1c4,
+ 0x36f502,
+ 0xbe2bc82,
+ 0xc238482,
+ 0xca2e802,
+ 0x22e803,
+ 0xce01ec2,
+ 0x2fe203,
+ 0x2f1e84,
+ 0x201ec3,
+ 0x26e8c4,
+ 0x201ecb,
+ 0x213c03,
+ 0x2de946,
+ 0x239f84,
+ 0x29034e,
+ 0x371145,
+ 0x38af48,
+ 0x31ffc7,
+ 0x31ffca,
+ 0x229743,
+ 0x22f147,
+ 0x31efc5,
+ 0x22f8c4,
+ 0x265b06,
+ 0x265b07,
+ 0x2c11c4,
+ 0x2f7a87,
+ 0x313d44,
+ 0x26c004,
+ 0x26c006,
+ 0x387184,
+ 0x3510c6,
+ 0x203f83,
+ 0x35e288,
+ 0x203f88,
+ 0x245503,
+ 0x268143,
+ 0x399a04,
+ 0x39e003,
+ 0xd219f02,
+ 0xd6d6a42,
+ 0x20bac3,
+ 0x207146,
+ 0x241fc3,
+ 0x377cc4,
+ 0xdaee982,
+ 0x3af843,
+ 0x3507c3,
+ 0x217a02,
+ 0xde04142,
+ 0x2c1946,
+ 0x233ac7,
+ 0x2e8945,
+ 0x37de04,
+ 0x28c505,
+ 0x268907,
+ 0x267805,
+ 0x2b8649,
+ 0x2cefc6,
+ 0x2daa88,
+ 0x2e8846,
+ 0xe21a1c2,
+ 0x32ca08,
+ 0x2f1c46,
+ 0x21a1c5,
+ 0x2f6d87,
+ 0x309984,
+ 0x309985,
+ 0x276384,
+ 0x276388,
+ 0xe60cc02,
+ 0xea09882,
+ 0x3103c6,
+ 0x3b8988,
+ 0x334385,
+ 0x337306,
+ 0x342f08,
+ 0x344a88,
+ 0xee09885,
+ 0xf2142c4,
+ 0x3b0787,
+ 0xf60e5c2,
+ 0xfa1b102,
+ 0x10a099c2,
+ 0x2b9785,
+ 0x2a2645,
+ 0x2fef86,
+ 0x3b2547,
+ 0x380747,
+ 0x112a84c3,
+ 0x2a84c7,
+ 0x31eb08,
+ 0x376ec9,
+ 0x376d07,
+ 0x384d07,
+ 0x3a8ec8,
+ 0x3ad4c6,
+ 0x22f3c6,
+ 0x23000c,
+ 0x23120a,
+ 0x231687,
+ 0x232c8b,
+ 0x233907,
+ 0x23390e,
+ 0x234cc4,
+ 0x235ac4,
+ 0x237a47,
+ 0x3690c7,
+ 0x23b206,
+ 0x23b207,
+ 0x23b4c7,
+ 0x19604682,
+ 0x23c886,
+ 0x23c88a,
+ 0x23ce8b,
+ 0x23dbc7,
+ 0x23ed45,
+ 0x23f083,
+ 0x240586,
+ 0x240587,
+ 0x38eb43,
+ 0x19a0c442,
+ 0x240f4a,
+ 0x19f5d882,
+ 0x1a2a5e02,
+ 0x1a643142,
+ 0x1aa2cd82,
+ 0x244bc5,
+ 0x245304,
+ 0x1b205742,
+ 0x268dc5,
+ 0x23d483,
+ 0x20eac5,
+ 0x22ad44,
+ 0x206804,
+ 0x314046,
+ 0x25e206,
+ 0x28a003,
+ 0x238284,
+ 0x3a6803,
+ 0x1b600dc2,
+ 0x391c04,
+ 0x391c06,
+ 0x3b0d05,
+ 0x205e06,
+ 0x2f6e88,
+ 0x266e84,
+ 0x27ed08,
+ 0x2426c5,
+ 0x228308,
+ 0x29ff86,
+ 0x237587,
+ 0x22e204,
+ 0x22e206,
+ 0x33f443,
+ 0x383ec3,
+ 0x223d08,
+ 0x318dc4,
+ 0x348747,
+ 0x23e6c6,
+ 0x2d6389,
+ 0x250348,
+ 0x26cd08,
+ 0x26d084,
+ 0x351443,
+ 0x225e02,
+ 0x1c60f882,
+ 0x1ca10e82,
+ 0x3a7403,
+ 0x1ce04a42,
+ 0x38eac4,
+ 0x2862c6,
+ 0x26e605,
+ 0x21ba03,
+ 0x232884,
+ 0x2b14c7,
+ 0x33da03,
+ 0x231a88,
+ 0x208545,
+ 0x36e803,
+ 0x273445,
+ 0x273584,
+ 0x2f6a86,
+ 0x209ec4,
+ 0x211346,
+ 0x211b86,
+ 0x3916c4,
+ 0x213b43,
+ 0x1d205882,
+ 0x247345,
+ 0x221c03,
+ 0x1d61b0c2,
+ 0x22ffc3,
+ 0x209bc5,
+ 0x232403,
+ 0x232409,
+ 0x1da05f02,
+ 0x1e205e42,
+ 0x2893c5,
+ 0x218786,
+ 0x2d1746,
+ 0x2b0a88,
+ 0x2b0a8b,
+ 0x20718b,
+ 0x2e8b45,
+ 0x2db145,
+ 0x2c6309,
+ 0x1600302,
+ 0x391888,
+ 0x20dc44,
+ 0x1ea007c2,
+ 0x3a7883,
+ 0x1f2c6086,
+ 0x20ae88,
+ 0x1f601402,
+ 0x2344c8,
+ 0x1fa2bb82,
+ 0x3b92ca,
+ 0x1feccc43,
+ 0x3ac1c6,
+ 0x3af408,
+ 0x3ac008,
+ 0x31d006,
+ 0x36bc07,
+ 0x264a07,
+ 0x3349ca,
+ 0x2d77c4,
+ 0x3474c4,
+ 0x35c1c9,
+ 0x20794385,
+ 0x209686,
+ 0x20e1c3,
+ 0x24a044,
+ 0x20a02644,
+ 0x202647,
+ 0x212fc7,
+ 0x22a584,
+ 0x285445,
+ 0x2ff048,
+ 0x366747,
+ 0x370f07,
+ 0x20e18342,
+ 0x327704,
+ 0x292b48,
0x245bc4,
- 0x29ef8b,
- 0x2d3983,
- 0x2d3985,
- 0x2d3ac8,
- 0x226302,
- 0x341982,
- 0x4024db02,
- 0x4060b602,
- 0x21a8c3,
- 0x40a73fc2,
- 0x273fc3,
- 0x2d3dc4,
- 0x2d4e43,
- 0x41201682,
- 0x41601686,
- 0x2c47c6,
- 0x2da008,
- 0x41a95242,
- 0x41e10882,
- 0x42223342,
- 0x4265e402,
- 0x42a14202,
- 0x42e01302,
- 0x234103,
- 0x261c05,
- 0x32d1c6,
- 0x43213184,
- 0x295c4a,
- 0x201306,
- 0x2f7ec4,
- 0x269ec3,
- 0x43e0c002,
- 0x202082,
- 0x231743,
- 0x44204ac3,
- 0x362b47,
- 0x3695c7,
- 0x45a58847,
- 0x32d747,
- 0x228543,
- 0x2977ca,
- 0x377004,
- 0x220144,
- 0x22014a,
- 0x202085,
- 0x45e04182,
- 0x3294c3,
- 0x462002c2,
- 0x2104c3,
- 0x274803,
- 0x46a00842,
- 0x2e33c4,
- 0x21db44,
- 0x208285,
- 0x30bd05,
- 0x249406,
- 0x249786,
- 0x46e09282,
- 0x47201002,
- 0x3274c5,
- 0x2c44d2,
- 0x271ac6,
- 0x248803,
- 0x2a2486,
- 0x248805,
- 0x1610a02,
- 0x4f611802,
- 0x3522c3,
- 0x211803,
- 0x278203,
- 0x4fa11f82,
- 0x378ac3,
- 0x4fe14602,
- 0x200a83,
- 0x2ceec8,
- 0x24a843,
- 0x24a846,
- 0x3a1087,
- 0x321b06,
- 0x321b0b,
- 0x2f7e07,
- 0x392404,
- 0x50603ec2,
- 0x364805,
- 0x50a04a83,
- 0x239f83,
- 0x326805,
- 0x35b5c3,
- 0x35b5c6,
- 0x26334a,
- 0x2774c3,
- 0x23ad04,
- 0x2c2806,
- 0x20df46,
- 0x50e00383,
- 0x324b07,
- 0x28bb8d,
- 0x3adbc7,
- 0x2a0685,
- 0x250b46,
- 0x22c0c3,
- 0x52a15e43,
- 0x52e04c82,
- 0x3b2804,
- 0x236d8c,
- 0x245309,
- 0x24bcc7,
- 0x3724c5,
- 0x268d84,
- 0x27c1c8,
- 0x27ed05,
- 0x5328a405,
- 0x377c09,
- 0x256343,
- 0x2acd44,
- 0x53617902,
- 0x21aac3,
- 0x53a99f82,
- 0x2a3fc6,
- 0x16aa082,
- 0x53e943c2,
- 0x321d88,
- 0x2c08c3,
- 0x36de07,
- 0x305105,
- 0x2943c5,
- 0x30860b,
- 0x2e3906,
- 0x308806,
- 0x36dbc6,
- 0x268f84,
- 0x2e5686,
- 0x2e5b48,
- 0x23e943,
- 0x23cf83,
- 0x23cf84,
- 0x2e6984,
- 0x2e6e07,
- 0x2e8745,
- 0x542e8882,
- 0x54606ec2,
- 0x206ec5,
- 0x2a4a84,
- 0x2ebf8b,
- 0x2ee248,
- 0x2f7304,
- 0x290602,
- 0x54eb6042,
- 0x38c543,
- 0x2ee704,
- 0x2ee9c5,
- 0x2ef087,
- 0x2f1404,
- 0x2f7cc4,
- 0x552054c2,
- 0x35d209,
- 0x2f2445,
- 0x2716c5,
- 0x2f3105,
- 0x5561aa03,
- 0x2f4244,
- 0x2f424b,
- 0x2f4684,
- 0x2f4b0b,
- 0x2f5505,
- 0x21bc4a,
- 0x2f5d08,
- 0x2f5f0a,
- 0x2f6783,
- 0x2f678a,
- 0x55a1b282,
- 0x55e01202,
- 0x26a103,
- 0x562f7902,
- 0x2f7903,
- 0x5673aa42,
- 0x56b21202,
- 0x2f8104,
- 0x21c2c6,
- 0x325d05,
- 0x2f8b43,
- 0x32ff46,
- 0x30c845,
- 0x2e9784,
- 0x56e00e02,
- 0x2d7904,
- 0x2c9c4a,
- 0x2eb487,
- 0x26b686,
- 0x244007,
- 0x236ec3,
- 0x265488,
- 0x28954b,
- 0x386a45,
- 0x235905,
- 0x235906,
- 0x370204,
- 0x31d488,
- 0x215a83,
- 0x2b5984,
- 0x36b507,
- 0x307206,
- 0x200e06,
- 0x2a58ca,
- 0x24e684,
- 0x24e68a,
- 0x57201946,
- 0x201947,
- 0x259547,
- 0x279804,
- 0x279809,
- 0x2ba485,
- 0x23b80b,
- 0x2769c3,
- 0x211c03,
- 0x2a3f43,
- 0x22ec44,
- 0x57600682,
- 0x259f06,
- 0x2a7d05,
- 0x2a26c5,
- 0x2564c6,
- 0x2531c4,
- 0x57a01f82,
- 0x245244,
- 0x57e00d42,
- 0x200d44,
- 0x224303,
- 0x58211842,
- 0x3398c3,
- 0x2478c6,
- 0x58602602,
- 0x2cfb88,
- 0x223704,
- 0x223706,
- 0x375846,
- 0x25bb44,
- 0x204905,
- 0x20c408,
- 0x20c907,
- 0x20d007,
- 0x20d00f,
- 0x298bc6,
- 0x227843,
- 0x227844,
- 0x28be84,
- 0x210e83,
- 0x222c84,
- 0x241104,
- 0x58a36b82,
- 0x28e183,
- 0x241383,
- 0x58e0c4c2,
- 0x22a543,
- 0x260883,
- 0x213e8a,
- 0x22bc87,
- 0x241c8c,
- 0x241f46,
- 0x242406,
- 0x246dc7,
- 0x592ddb07,
- 0x251a09,
- 0x21cc04,
- 0x252284,
- 0x59609f42,
- 0x59a01702,
- 0x2a5c86,
- 0x324904,
- 0x2db5c6,
- 0x2ab348,
- 0x20eec4,
- 0x2a3186,
- 0x2d68c5,
- 0x26ebc8,
- 0x205583,
- 0x272605,
- 0x273583,
- 0x2717c3,
- 0x2717c4,
- 0x273983,
- 0x59edeec2,
- 0x5a200b42,
- 0x276889,
- 0x27ec05,
- 0x27ee04,
- 0x281305,
- 0x212504,
- 0x2c1247,
- 0x33d3c5,
- 0x258a04,
- 0x258a08,
- 0x2dc3c6,
- 0x2de404,
- 0x2dfdc8,
- 0x2e1a87,
- 0x5a60e5c2,
- 0x305304,
- 0x210f44,
- 0x2257c7,
- 0x5aa53d84,
- 0x249682,
- 0x5ae01ac2,
- 0x21b083,
- 0x351144,
- 0x242643,
- 0x33d945,
- 0x5b21de42,
- 0x2ebb05,
- 0x212bc2,
- 0x381dc5,
- 0x364305,
- 0x5b60c842,
- 0x3581c4,
- 0x5ba06342,
- 0x2a9146,
- 0x2ac506,
- 0x396208,
- 0x2c3608,
- 0x3075c4,
- 0x2f8905,
- 0x2fe809,
- 0x2e10c4,
- 0x263304,
- 0x20aec3,
- 0x5be20c45,
- 0x2c7087,
- 0x25e944,
- 0x33a48d,
- 0x33c282,
- 0x33c283,
- 0x355783,
- 0x5c200202,
- 0x388b45,
- 0x26c747,
- 0x2a7e04,
- 0x32d807,
- 0x29d849,
- 0x2c9d89,
- 0x248ac7,
- 0x243843,
- 0x27c008,
- 0x2f33c9,
- 0x2500c7,
- 0x370145,
- 0x385886,
- 0x394246,
- 0x3959c5,
- 0x257345,
- 0x5c603102,
- 0x27eb05,
- 0x2b8308,
- 0x2c5386,
- 0x2bcc07,
- 0x2f5744,
- 0x2ad207,
- 0x2faf46,
- 0x5ca2fb02,
- 0x3713c6,
- 0x2fd38a,
- 0x2fde45,
- 0x5cee4742,
- 0x5d245702,
- 0x30fbc6,
- 0x2b25c8,
- 0x5d68eb87,
- 0x5da04602,
- 0x20edc3,
- 0x38c706,
- 0x2246c4,
- 0x3a0f46,
- 0x262446,
- 0x26bd0a,
- 0x319a45,
- 0x204446,
- 0x218c83,
- 0x218c84,
- 0x205302,
- 0x30c283,
- 0x5de05dc2,
- 0x2ce903,
- 0x3734c4,
- 0x2b2704,
- 0x2b270a,
- 0x229b03,
- 0x28a7c8,
- 0x229b0a,
- 0x23a407,
- 0x301446,
- 0x2a9004,
- 0x296e42,
- 0x219542,
- 0x5e206e42,
- 0x24e1c3,
- 0x259307,
- 0x330207,
- 0x38fd4b,
- 0x28a2c4,
- 0x34f9c7,
- 0x2ef186,
- 0x21c607,
- 0x258004,
- 0x23c445,
- 0x2c17c5,
- 0x5e620382,
- 0x221a86,
- 0x246043,
- 0x24a2c2,
- 0x24a2c6,
- 0x5ea04802,
- 0x5ee05bc2,
- 0x3abd45,
- 0x5f222e82,
- 0x5f600a42,
- 0x343745,
- 0x38e6c5,
- 0x204505,
- 0x270ac3,
- 0x390b05,
- 0x2e39c7,
- 0x309445,
- 0x30a985,
- 0x3a05c4,
- 0x24c646,
- 0x25c1c4,
- 0x5fa03382,
- 0x6060ce05,
- 0x36f447,
- 0x2db7c8,
- 0x2a32c6,
- 0x2a32cd,
- 0x2a86c9,
- 0x2a86d2,
- 0x332705,
- 0x33c843,
- 0x60a044c2,
- 0x2f6d84,
- 0x204383,
- 0x3623c5,
- 0x2fed85,
- 0x60e17082,
- 0x3700c3,
- 0x6124d082,
- 0x616c3142,
- 0x61a18dc2,
- 0x364c05,
- 0x329ec3,
- 0x319888,
- 0x61e02d82,
- 0x62206902,
- 0x2e3386,
- 0x34398a,
- 0x272243,
- 0x25c083,
- 0x2ed703,
- 0x62e016c2,
- 0x71211fc2,
- 0x71a19682,
- 0x206602,
- 0x3711c9,
- 0x2c6404,
- 0x22fb48,
- 0x71ef8b82,
- 0x72202502,
- 0x2f4d45,
- 0x232ac8,
- 0x2cf008,
- 0x2fd54c,
- 0x23bd83,
- 0x267002,
- 0x726019c2,
- 0x2ccf46,
- 0x3022c5,
- 0x239103,
- 0x383586,
- 0x302406,
- 0x21e2c3,
- 0x304ec3,
- 0x3055c6,
- 0x306204,
- 0x225d46,
- 0x2d3b45,
- 0x30648a,
- 0x240544,
- 0x307884,
- 0x307a4a,
- 0x72a037c2,
- 0x234605,
- 0x30898a,
- 0x309a85,
- 0x30a344,
- 0x30a446,
- 0x30a5c4,
- 0x228306,
- 0x72e39342,
- 0x2eadc6,
- 0x3a2445,
- 0x26bb87,
- 0x3a3c46,
- 0x246fc4,
- 0x2da807,
- 0x311586,
- 0x25b5c5,
- 0x2d4287,
- 0x39cd87,
- 0x39cd8e,
- 0x24abc6,
- 0x382905,
- 0x285407,
- 0x201c43,
- 0x201c47,
- 0x3b3445,
- 0x2108c4,
- 0x211882,
- 0x22afc7,
- 0x31ab04,
- 0x22fec4,
- 0x24314b,
- 0x21d283,
- 0x288fc7,
- 0x21d284,
- 0x2ace07,
- 0x2824c3,
- 0x334b4d,
- 0x389388,
- 0x228e04,
- 0x258905,
- 0x30ac85,
- 0x30b0c3,
- 0x73201a82,
- 0x30c243,
- 0x30cf43,
- 0x221c04,
- 0x280785,
- 0x223387,
- 0x218d06,
- 0x373203,
- 0x24a40b,
- 0x3aa70b,
- 0x27928b,
- 0x28088a,
- 0x2ad8cb,
- 0x2fc28b,
- 0x2e478c,
- 0x2e7291,
- 0x32170a,
- 0x34e48b,
- 0x379d0b,
- 0x3b048a,
- 0x3b4cca,
- 0x30ea4d,
- 0x31038e,
- 0x3109cb,
- 0x310c8a,
- 0x312191,
- 0x3125ca,
- 0x312acb,
- 0x31300e,
- 0x31398c,
- 0x313fcb,
- 0x31428e,
- 0x31460c,
- 0x315a4a,
- 0x31694c,
- 0x73716c4a,
- 0x317449,
- 0x31b60a,
- 0x31b88a,
- 0x31bb0b,
- 0x31e9ce,
- 0x31ed51,
- 0x327a09,
- 0x327c4a,
- 0x32844b,
- 0x32a30a,
- 0x32ab96,
- 0x32c8cb,
- 0x32e00a,
- 0x32e5ca,
- 0x33048b,
- 0x332189,
- 0x3354c9,
- 0x335a4d,
- 0x3360cb,
- 0x33734b,
- 0x337d0b,
- 0x3381c9,
- 0x33880e,
- 0x338f0a,
- 0x33a24a,
- 0x33a7ca,
- 0x33af8b,
- 0x33b7cb,
- 0x33ba8d,
- 0x33cecd,
- 0x33da90,
- 0x33df4b,
- 0x33e54c,
- 0x33ea4b,
- 0x34118b,
- 0x34290b,
- 0x3463cb,
- 0x346e4f,
- 0x34720b,
- 0x347d0a,
- 0x348249,
- 0x348609,
- 0x34898b,
- 0x348c4e,
- 0x34b98b,
- 0x34d04f,
- 0x34ff0b,
- 0x3501cb,
- 0x35048b,
- 0x35098a,
- 0x355c09,
- 0x35a20f,
- 0x36128c,
- 0x36170c,
- 0x36208e,
- 0x36388f,
- 0x363c4e,
- 0x3652d0,
- 0x3656cf,
- 0x365d4e,
- 0x36650c,
- 0x366812,
- 0x36a511,
- 0x36ad0e,
- 0x36ba0e,
- 0x36bf4e,
- 0x36c2cf,
- 0x36c68e,
- 0x36ca13,
- 0x36ced1,
- 0x36d30e,
- 0x36d78c,
- 0x36e493,
- 0x36fa90,
- 0x37070c,
- 0x370a0c,
- 0x370ecb,
- 0x37184e,
- 0x371f8b,
- 0x3727cb,
- 0x37378c,
- 0x37914a,
- 0x37950c,
- 0x37980c,
- 0x379b09,
- 0x37b7cb,
- 0x37ba88,
- 0x37bc89,
- 0x37bc8f,
- 0x37d5cb,
- 0x37e44a,
- 0x37fd4c,
- 0x380e09,
- 0x381b88,
- 0x38214b,
- 0x382c0b,
- 0x38418a,
- 0x38440b,
- 0x38488c,
- 0x385548,
- 0x38958b,
- 0x38c04b,
- 0x39000b,
- 0x39180b,
- 0x39c90b,
- 0x39cbc9,
- 0x39d10d,
- 0x3a264a,
- 0x3a3597,
- 0x3a3dd8,
- 0x3a6309,
- 0x3a7b4b,
- 0x3a9554,
- 0x3a9a4b,
- 0x3a9fca,
- 0x3ab70a,
- 0x3ab98b,
- 0x3ad110,
- 0x3ad511,
- 0x3ae64a,
- 0x3afa8d,
- 0x3b018d,
- 0x3b508b,
- 0x3b5c46,
- 0x221b83,
- 0x73b76c03,
- 0x37f706,
- 0x292c85,
- 0x396787,
- 0x3215c6,
- 0x1639f02,
- 0x2b3809,
- 0x32fd44,
- 0x2e0bc8,
- 0x24e103,
- 0x2f6cc7,
- 0x241b82,
- 0x2b2c03,
- 0x73e06c82,
- 0x2cb006,
- 0x2cc544,
- 0x3b2e84,
- 0x2616c3,
- 0x2616c5,
- 0x746c7282,
- 0x74aae504,
- 0x279747,
- 0x1669e02,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x20abc3,
- 0x204cc2,
- 0x15f048,
- 0x20d1c2,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x213e83,
- 0x324156,
- 0x325393,
- 0x34f849,
- 0x2957c8,
- 0x364689,
- 0x308b06,
- 0x336f50,
- 0x25c9d3,
- 0x3072c8,
- 0x344207,
- 0x27e407,
- 0x2475ca,
- 0x373549,
- 0x239789,
- 0x29258b,
- 0x367e06,
- 0x314aca,
- 0x2221c6,
- 0x32f943,
- 0x294985,
- 0x22b888,
- 0x2a920d,
- 0x35ab0c,
- 0x3a2107,
- 0x379f8d,
- 0x20c504,
- 0x22ef0a,
- 0x23064a,
- 0x230b0a,
- 0x20fe87,
- 0x240387,
- 0x243084,
- 0x26cdc6,
- 0x3aab84,
- 0x2e26c8,
- 0x2267c9,
- 0x2b94c6,
- 0x2b94c8,
- 0x24c34d,
- 0x2c9fc9,
- 0x207d48,
- 0x271647,
- 0x2f8e8a,
- 0x2539c6,
- 0x2642c7,
- 0x2c96c4,
- 0x28e807,
- 0x332eca,
- 0x36f5ce,
- 0x228fc5,
- 0x28e70b,
- 0x262089,
- 0x2a8909,
- 0x2129c7,
- 0x29998a,
- 0x225707,
- 0x2ffd09,
- 0x326b48,
- 0x35dc4b,
- 0x2e0405,
- 0x38144a,
- 0x223109,
- 0x23908a,
- 0x2ccb4b,
- 0x383a0b,
- 0x292315,
- 0x2e6185,
- 0x2716c5,
- 0x2f424a,
- 0x25980a,
- 0x261e07,
- 0x21d743,
- 0x2a5c08,
- 0x2d828a,
- 0x223706,
- 0x24ff09,
- 0x26ebc8,
- 0x2de404,
- 0x242649,
- 0x2c3608,
- 0x2b1c07,
- 0x20ce06,
- 0x36f447,
- 0x293cc7,
- 0x242ac5,
- 0x228e0c,
- 0x258905,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x20d1c2,
- 0x2d0783,
- 0x204ac3,
- 0x20abc3,
- 0x200383,
- 0x2d0783,
- 0x204ac3,
- 0x24a843,
- 0x200383,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x20d1c2,
- 0x2000c2,
- 0x230d42,
- 0x202f02,
- 0x202382,
- 0x261e82,
- 0x46d0783,
- 0x231b83,
- 0x2135c3,
- 0x332ec3,
- 0x204303,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x201383,
- 0x15f048,
- 0x32df04,
- 0x260087,
- 0x263d43,
- 0x37aa84,
- 0x214543,
- 0x212a43,
- 0x332ec3,
- 0x13ecc7,
- 0x204cc2,
- 0x168883,
- 0x5a0d1c2,
- 0x8d54d,
- 0x8d88d,
- 0x230d42,
- 0x964c4,
- 0x200382,
- 0x5e963c8,
- 0xf39c4,
- 0x15f048,
- 0x14020c2,
- 0x1509cc6,
- 0x20e443,
- 0x26ae03,
- 0x66d0783,
- 0x22ef04,
- 0x6a31b83,
- 0x6f32ec3,
- 0x20a3c2,
- 0x2964c4,
- 0x204ac3,
- 0x2fc883,
- 0x201882,
- 0x200383,
- 0x21c802,
- 0x2f8043,
+ 0x247784,
+ 0x248085,
+ 0x2481c7,
+ 0x223589,
+ 0x248fc4,
+ 0x249709,
+ 0x249948,
+ 0x249dc4,
+ 0x249dc7,
+ 0x2124aa83,
+ 0x24ad47,
+ 0x1609d02,
+ 0x16ad202,
+ 0x24bec6,
+ 0x24c507,
+ 0x24cd44,
+ 0x24e6c7,
+ 0x24fa47,
+ 0x24fdc3,
+ 0x248902,
+ 0x229642,
+ 0x250a03,
+ 0x250a04,
+ 0x250a0b,
+ 0x379a48,
+ 0x256804,
+ 0x2523c5,
+ 0x254007,
+ 0x2555c5,
+ 0x2bc00a,
+ 0x256743,
+ 0x2160fc82,
+ 0x226e84,
+ 0x258d89,
+ 0x25c343,
+ 0x25c407,
+ 0x24a849,
+ 0x282688,
+ 0x204743,
+ 0x278fc7,
+ 0x279709,
+ 0x268ac3,
+ 0x2810c4,
+ 0x283c89,
+ 0x2880c6,
+ 0x289683,
+ 0x200182,
+ 0x21f983,
+ 0x3a8a87,
+ 0x21f985,
+ 0x379746,
+ 0x256e84,
+ 0x302e85,
+ 0x2e4403,
+ 0x216c46,
+ 0x20db42,
+ 0x395144,
+ 0x221402,
+ 0x221403,
+ 0x21a00782,
+ 0x247303,
+ 0x215c44,
+ 0x215c47,
+ 0x200906,
0x202602,
- 0x203f83,
- 0x26ec83,
- 0x206d02,
- 0x15f048,
- 0x20e443,
- 0x2fc883,
- 0x201882,
- 0x2f8043,
- 0x202602,
- 0x203f83,
- 0x26ec83,
- 0x206d02,
- 0x2f8043,
- 0x202602,
- 0x203f83,
- 0x26ec83,
- 0x206d02,
- 0x2d0783,
- 0x368883,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x204303,
- 0x20fbc3,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x210582,
+ 0x21e025c2,
+ 0x2dca84,
+ 0x22235e82,
+ 0x22600b02,
+ 0x2d4f84,
+ 0x2d4f85,
+ 0x2b6dc5,
+ 0x390e06,
+ 0x22a05d42,
+ 0x205d45,
+ 0x20cf05,
+ 0x20ae03,
+ 0x210986,
+ 0x2126c5,
+ 0x2166c2,
+ 0x343605,
+ 0x2166c4,
+ 0x221ec3,
+ 0x227343,
+ 0x22e0c642,
+ 0x2d4987,
+ 0x3669c4,
+ 0x3669c9,
+ 0x249f44,
+ 0x291d43,
+ 0x2f6609,
+ 0x367508,
+ 0x232a24c4,
+ 0x2a24c6,
+ 0x21c303,
+ 0x247bc3,
+ 0x2e9dc3,
+ 0x236eb382,
+ 0x368cc2,
+ 0x23a05e82,
+ 0x323cc8,
+ 0x32a388,
+ 0x398e46,
+ 0x2e27c5,
+ 0x22efc5,
+ 0x352ec7,
+ 0x21d205,
+ 0x228782,
+ 0x23e38182,
+ 0x1603002,
+ 0x2416c8,
+ 0x32c945,
+ 0x2e3404,
+ 0x2ebac5,
+ 0x23f407,
+ 0x3207c4,
+ 0x240e42,
+ 0x24200582,
+ 0x338984,
+ 0x212cc7,
+ 0x28a2c7,
+ 0x34ff84,
+ 0x292203,
+ 0x245444,
+ 0x245448,
+ 0x22f706,
+ 0x26598a,
+ 0x223444,
+ 0x292588,
+ 0x288504,
+ 0x221946,
+ 0x294684,
+ 0x2b9a86,
+ 0x366c89,
+ 0x25da47,
+ 0x3375c3,
+ 0x24667e42,
+ 0x267e43,
+ 0x20ee02,
+ 0x24a11ec2,
+ 0x3085c6,
+ 0x365c88,
+ 0x2a4087,
+ 0x3a3f49,
+ 0x291c49,
+ 0x2a5045,
+ 0x2a6049,
+ 0x2a6805,
+ 0x2a6949,
+ 0x2a8005,
+ 0x2a9108,
+ 0x21fb84,
+ 0x24e890c7,
+ 0x2a9303,
+ 0x2a9307,
+ 0x3850c6,
+ 0x2a9b87,
+ 0x2a1085,
+ 0x2935c3,
+ 0x2521ae02,
+ 0x3b40c4,
+ 0x2562ce82,
+ 0x258203,
+ 0x25a17f42,
+ 0x36d586,
+ 0x2f3a85,
+ 0x2ac207,
+ 0x26cc43,
+ 0x325044,
+ 0x20e903,
+ 0x33e783,
+ 0x25e02bc2,
+ 0x266015c2,
+ 0x398804,
+ 0x2488c3,
+ 0x243c85,
+ 0x26a029c2,
+ 0x27206482,
+ 0x2b4506,
+ 0x318f04,
+ 0x2e3004,
+ 0x2e300a,
+ 0x27a01fc2,
+ 0x37204a,
+ 0x3756c8,
+ 0x27fb1384,
+ 0x20ad83,
+ 0x201fc3,
+ 0x3a9a49,
+ 0x217649,
+ 0x285246,
+ 0x28244183,
+ 0x3292c5,
+ 0x30180d,
+ 0x375886,
+ 0x3bac8b,
+ 0x28602e82,
+ 0x22c1c8,
+ 0x29206e82,
+ 0x29606fc2,
+ 0x2ae585,
+ 0x29a03942,
+ 0x258447,
+ 0x21c907,
+ 0x21e003,
+ 0x2306c8,
+ 0x29e06502,
+ 0x312684,
+ 0x212943,
+ 0x351d45,
+ 0x34db83,
+ 0x2f3546,
+ 0x205904,
+ 0x268103,
+ 0x2ae9c3,
+ 0x2a205fc2,
+ 0x2e8ac4,
+ 0x35f6c5,
+ 0x39f1c7,
+ 0x275643,
+ 0x2ad883,
+ 0x2ae083,
+ 0x160fec2,
+ 0x2ae143,
+ 0x2ae943,
+ 0x2a605102,
+ 0x282104,
+ 0x25e406,
+ 0x342643,
+ 0x2aec43,
+ 0x2aaafd42,
+ 0x2afd48,
+ 0x2b0004,
+ 0x36c246,
+ 0x2b0387,
+ 0x249c46,
+ 0x28e2c4,
+ 0x38600682,
+ 0x384f8b,
+ 0x2fb08e,
+ 0x21930f,
+ 0x2985c3,
+ 0x38ebbbc2,
+ 0x1600f42,
+ 0x39201582,
+ 0x28f403,
+ 0x2fdec3,
+ 0x233706,
+ 0x277c46,
+ 0x3afd87,
+ 0x3328c4,
+ 0x396188c2,
+ 0x39a08882,
+ 0x348345,
+ 0x2e6047,
+ 0x3b5746,
+ 0x39e27282,
+ 0x227284,
+ 0x2b3ac3,
+ 0x3a20be02,
+ 0x3a759ec3,
+ 0x2b4c44,
+ 0x2be409,
+ 0x16c3ac2,
+ 0x3aa03a82,
+ 0x203a85,
+ 0x3aec3d42,
+ 0x3b203202,
+ 0x346947,
+ 0x239689,
+ 0x35ca0b,
+ 0x2647c5,
+ 0x2c4849,
+ 0x2e8246,
+ 0x31e6c7,
+ 0x3b608484,
+ 0x3199c9,
+ 0x373487,
+ 0x20ab47,
+ 0x20a383,
+ 0x20a386,
+ 0x3b68c7,
+ 0x206a43,
+ 0x2565c6,
+ 0x3be02a02,
+ 0x3c232682,
+ 0x385803,
+ 0x324c45,
+ 0x350f47,
+ 0x250086,
+ 0x21f905,
+ 0x277d44,
+ 0x2c9fc5,
+ 0x2f2684,
+ 0x3c6040c2,
+ 0x331107,
+ 0x2dbd44,
+ 0x217544,
+ 0x21754d,
+ 0x257509,
+ 0x3a4448,
+ 0x253944,
+ 0x3abc45,
+ 0x206447,
+ 0x2144c4,
+ 0x2e1947,
+ 0x21c485,
+ 0x3caa4604,
+ 0x2d92c5,
+ 0x25b004,
+ 0x24bb86,
+ 0x3b2345,
+ 0x3ce250c2,
+ 0x283844,
+ 0x283845,
+ 0x36fa46,
+ 0x20c3c5,
+ 0x30c304,
+ 0x2c5dc3,
+ 0x2053c6,
+ 0x358505,
+ 0x2bb485,
+ 0x3b2444,
+ 0x2234c3,
+ 0x2234cc,
+ 0x3d288a02,
+ 0x3d6010c2,
+ 0x3da00282,
+ 0x206343,
+ 0x206344,
+ 0x3de04bc2,
+ 0x2f9688,
+ 0x379805,
+ 0x235684,
+ 0x23b086,
+ 0x3e201f42,
+ 0x3e609782,
+ 0x3ea00e82,
+ 0x306b85,
+ 0x391586,
+ 0x211084,
+ 0x3263c6,
+ 0x2ba346,
+ 0x219943,
+ 0x3ef0de0a,
+ 0x247b05,
+ 0x2c8e83,
+ 0x223186,
+ 0x300fc9,
+ 0x223187,
+ 0x297788,
+ 0x2981c9,
+ 0x224348,
+ 0x229486,
+ 0x20bf03,
+ 0x3f2a8542,
+ 0x385683,
+ 0x385689,
+ 0x332448,
+ 0x3f649a02,
+ 0x3fa02342,
+ 0x227f83,
+ 0x2da905,
+ 0x251ec4,
+ 0x2c0909,
+ 0x22cb84,
+ 0x266348,
+ 0x202343,
+ 0x202344,
+ 0x278b03,
+ 0x2187c8,
+ 0x217487,
+ 0x4020b102,
+ 0x274082,
+ 0x351905,
+ 0x266689,
+ 0x209703,
+ 0x27b184,
+ 0x329284,
+ 0x2064c3,
+ 0x27c3ca,
+ 0x40752bc2,
+ 0x40a83802,
+ 0x2c5443,
+ 0x3739c3,
+ 0x1602302,
+ 0x38ac03,
+ 0x40e0f242,
+ 0x4120ec42,
+ 0x41610444,
+ 0x210446,
+ 0x383b06,
+ 0x26ad44,
+ 0x36c643,
+ 0x38bcc3,
+ 0x226883,
+ 0x23d206,
+ 0x2cb8c5,
+ 0x2c5a07,
+ 0x31e589,
+ 0x2ca645,
+ 0x2cb806,
+ 0x2cbd88,
+ 0x2cbf86,
+ 0x236a04,
+ 0x29944b,
+ 0x2ceac3,
+ 0x2ceac5,
+ 0x2cec08,
+ 0x228502,
+ 0x346c42,
+ 0x41a44c42,
+ 0x41e0e602,
+ 0x218903,
+ 0x422675c2,
+ 0x2675c3,
+ 0x2cef04,
+ 0x2cf5c3,
+ 0x42a115c2,
+ 0x42ed43c6,
+ 0x2a7306,
+ 0x43207902,
+ 0x4360f442,
+ 0x43a27382,
+ 0x43e02c82,
+ 0x4422dd02,
+ 0x44602d02,
+ 0x234703,
+ 0x390685,
+ 0x319606,
+ 0x44a11cc4,
+ 0x3b0b0a,
+ 0x32fe86,
+ 0x2e8d84,
+ 0x281d03,
+ 0x45604642,
+ 0x200c82,
+ 0x25fd03,
+ 0x45a05503,
+ 0x2c7b87,
+ 0x3b2247,
+ 0x47250b07,
+ 0x312d87,
+ 0x227b03,
+ 0x227b0a,
+ 0x236b84,
+ 0x23e5c4,
+ 0x23e5ca,
+ 0x213f05,
+ 0x47609642,
+ 0x24e683,
+ 0x47a008c2,
+ 0x21c2c3,
+ 0x267e03,
+ 0x48203342,
+ 0x2a8444,
+ 0x21de84,
+ 0x3b9505,
+ 0x305005,
+ 0x2e1ac6,
+ 0x2e1e46,
+ 0x48608442,
+ 0x48a033c2,
+ 0x3185c5,
+ 0x2a7012,
+ 0x2511c6,
+ 0x220803,
+ 0x30a746,
+ 0x220805,
+ 0x1610602,
+ 0x50e120c2,
+ 0x353e83,
+ 0x2120c3,
+ 0x2441c3,
+ 0x512023c2,
+ 0x376e43,
+ 0x5160b482,
+ 0x210483,
+ 0x282148,
+ 0x25e983,
+ 0x25e986,
+ 0x3a2987,
+ 0x306806,
+ 0x30680b,
+ 0x2e8cc7,
+ 0x3b3ec4,
+ 0x51e04ec2,
+ 0x379685,
+ 0x522054c3,
+ 0x2a6e03,
+ 0x326c05,
+ 0x329983,
+ 0x52729986,
+ 0x391a0a,
+ 0x26a9c3,
+ 0x204584,
+ 0x3b88c6,
+ 0x21a5c6,
+ 0x52a00983,
+ 0x324f07,
+ 0x285147,
+ 0x29b0c5,
+ 0x2318c6,
+ 0x224a83,
+ 0x54a10bc3,
+ 0x54e056c2,
+ 0x328144,
+ 0x22a2cc,
+ 0x236149,
+ 0x2414c7,
+ 0x249245,
+ 0x262a84,
+ 0x273cc8,
+ 0x278305,
+ 0x55284a05,
+ 0x28c609,
+ 0x351f43,
+ 0x2a5d84,
+ 0x556013c2,
+ 0x2013c3,
+ 0x55a94142,
+ 0x2a4386,
+ 0x160f982,
+ 0x55e06e02,
+ 0x306a88,
+ 0x2be603,
+ 0x2d9207,
+ 0x2e4d05,
+ 0x2dd685,
+ 0x32840b,
+ 0x2dd686,
+ 0x328606,
+ 0x2ffac6,
+ 0x262c84,
+ 0x3042c6,
+ 0x2e3508,
+ 0x23a043,
+ 0x250dc3,
+ 0x250dc4,
+ 0x2e4484,
+ 0x2e4a07,
+ 0x2e5ec5,
+ 0x562e6002,
+ 0x5660ba02,
+ 0x20ba05,
+ 0x2e83c4,
+ 0x2e83cb,
+ 0x2e8e88,
+ 0x228f44,
+ 0x2272c2,
+ 0x56e28ec2,
+ 0x23b903,
+ 0x2e9344,
+ 0x2e9605,
+ 0x2ea047,
+ 0x2eb604,
+ 0x2e8b84,
+ 0x57201302,
+ 0x360cc9,
+ 0x2ec405,
+ 0x264a85,
+ 0x2ecf85,
+ 0x57601303,
+ 0x2ee0c4,
+ 0x2ee0cb,
+ 0x2ee644,
+ 0x2ef3cb,
+ 0x2ef7c5,
+ 0x21944a,
+ 0x2f0048,
+ 0x2f024a,
+ 0x2f0ac3,
+ 0x2f0aca,
+ 0x57a01742,
+ 0x57e2d4c2,
0x21aa03,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x368883,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x204ac3,
- 0x200383,
- 0x370145,
- 0x217082,
- 0x204cc2,
- 0x15f048,
- 0x1491b48,
- 0x332ec3,
- 0x2461c1,
- 0x2096c1,
- 0x202201,
- 0x209441,
- 0x24a5c1,
- 0x27e081,
- 0x24c0c1,
- 0x2462c1,
- 0x2e7481,
- 0x30ed01,
+ 0x582f1bc2,
+ 0x2f1bc3,
+ 0x5875c402,
+ 0x58b22842,
+ 0x2f2504,
+ 0x21afc6,
+ 0x326105,
+ 0x2f4503,
+ 0x31a9c6,
+ 0x204405,
+ 0x25e704,
+ 0x58e05ec2,
+ 0x2c9244,
+ 0x2c5f8a,
+ 0x22d787,
+ 0x2f38c6,
+ 0x380b07,
+ 0x22a403,
+ 0x283e48,
+ 0x37f48b,
+ 0x3736c5,
+ 0x333ec5,
+ 0x333ec6,
+ 0x390884,
+ 0x3aa248,
+ 0x222943,
+ 0x222944,
+ 0x222947,
+ 0x38e446,
+ 0x352686,
+ 0x29018a,
+ 0x246604,
+ 0x24660a,
+ 0x59282846,
+ 0x282847,
+ 0x252447,
+ 0x270844,
+ 0x270849,
+ 0x25e0c5,
+ 0x235e0b,
+ 0x2e81c3,
+ 0x211503,
+ 0x22f003,
+ 0x22fac4,
+ 0x59600482,
+ 0x25d4c6,
+ 0x293345,
+ 0x30a985,
+ 0x24f6c6,
+ 0x3395c4,
+ 0x59a02782,
+ 0x23f0c4,
+ 0x59e01c42,
+ 0x2b9f05,
+ 0x21ad84,
+ 0x21bec3,
+ 0x5a612102,
+ 0x212103,
+ 0x23ba46,
+ 0x5aa03082,
+ 0x27f488,
+ 0x223004,
+ 0x223006,
+ 0x374246,
+ 0x2540c4,
+ 0x205345,
+ 0x2141c8,
+ 0x216547,
+ 0x219687,
+ 0x21968f,
+ 0x292a46,
+ 0x22cf03,
+ 0x22cf04,
+ 0x310504,
+ 0x20d003,
+ 0x221a84,
+ 0x240944,
+ 0x5ae42b02,
+ 0x289d43,
+ 0x242b03,
+ 0x5b209842,
+ 0x229f83,
+ 0x38eb83,
+ 0x21484a,
+ 0x358107,
+ 0x2efc0c,
+ 0x2efec6,
+ 0x30a146,
+ 0x248547,
+ 0x5b64c687,
+ 0x24f809,
+ 0x243584,
+ 0x24fbc4,
+ 0x5ba18942,
+ 0x5be027c2,
+ 0x290546,
+ 0x324d04,
+ 0x2d6bc6,
+ 0x2a5148,
+ 0x3b8dc4,
+ 0x258486,
+ 0x2d1705,
+ 0x265c88,
+ 0x207383,
+ 0x273705,
+ 0x273e83,
+ 0x264b83,
+ 0x264b84,
+ 0x2759c3,
+ 0x5c2ec082,
+ 0x5c602e02,
+ 0x2e8089,
+ 0x278205,
+ 0x278404,
+ 0x27a9c5,
+ 0x20dd44,
+ 0x2e0d07,
+ 0x343bc5,
+ 0x250cc4,
+ 0x250cc8,
+ 0x2d5086,
+ 0x2d7984,
+ 0x2d8e88,
+ 0x2dbb87,
+ 0x5ca03902,
+ 0x2e36c4,
+ 0x20d0c4,
+ 0x20ad47,
+ 0x5ce2b804,
+ 0x2ccf42,
+ 0x5d201102,
+ 0x201543,
+ 0x203984,
+ 0x2aa283,
+ 0x374e05,
+ 0x5d61e182,
+ 0x2eb285,
+ 0x202c42,
+ 0x34d5c5,
+ 0x365e45,
+ 0x5da00c42,
+ 0x350744,
+ 0x5de00d02,
+ 0x2387c6,
+ 0x29a146,
+ 0x2667c8,
+ 0x2bfa08,
+ 0x36d504,
+ 0x36d6c5,
+ 0x3610c9,
+ 0x2db1c4,
+ 0x3919c4,
+ 0x205183,
+ 0x5e222705,
+ 0x2c3b87,
+ 0x2a2744,
+ 0x341e8d,
+ 0x361782,
+ 0x361783,
+ 0x364503,
+ 0x5e600802,
+ 0x388305,
+ 0x25f9c7,
+ 0x205b44,
+ 0x312e47,
+ 0x2983c9,
+ 0x2c60c9,
+ 0x2519c7,
+ 0x273b03,
+ 0x273b08,
+ 0x2ed249,
+ 0x24e187,
+ 0x373605,
+ 0x39e086,
+ 0x39fb86,
+ 0x3a3c05,
+ 0x257605,
+ 0x5ea02d82,
+ 0x36ce45,
+ 0x2b2908,
+ 0x2c1706,
+ 0x5eeb7487,
+ 0x2efa04,
+ 0x2aa987,
+ 0x2f62c6,
+ 0x5f230982,
+ 0x36f746,
+ 0x2f83ca,
+ 0x2f8e85,
+ 0x5f6de402,
+ 0x5fa36542,
+ 0x3b6c06,
+ 0x2a1e88,
+ 0x5fe8a487,
+ 0x60234e42,
+ 0x2255c3,
+ 0x311d86,
+ 0x225044,
+ 0x3a2846,
+ 0x390b06,
+ 0x26ff0a,
+ 0x331c05,
+ 0x367ec6,
+ 0x3759c3,
+ 0x3759c4,
+ 0x207102,
+ 0x309943,
+ 0x60606382,
+ 0x2f0f83,
+ 0x3722c4,
+ 0x2a1fc4,
+ 0x2a1fca,
+ 0x229543,
+ 0x276288,
+ 0x22954a,
+ 0x27b447,
+ 0x2fcd86,
+ 0x238684,
+ 0x290bc2,
+ 0x2a2e82,
+ 0x60a04002,
+ 0x245403,
+ 0x252207,
+ 0x31ac87,
+ 0x2848c4,
+ 0x26f8c7,
+ 0x2ea146,
+ 0x216847,
+ 0x35e604,
+ 0x242a05,
+ 0x2b7985,
+ 0x60e0fe82,
+ 0x20fe86,
+ 0x218283,
+ 0x220502,
+ 0x220506,
+ 0x61203e02,
+ 0x6160b0c2,
+ 0x3ba785,
+ 0x61a21c82,
+ 0x61e03b42,
+ 0x33b5c5,
+ 0x393105,
+ 0x367f85,
+ 0x267303,
+ 0x286385,
+ 0x2dd747,
+ 0x307bc5,
+ 0x306185,
+ 0x38b044,
+ 0x3204c6,
+ 0x23e804,
+ 0x62201442,
+ 0x62f630c5,
+ 0x2ebe07,
+ 0x2d6dc8,
+ 0x25fe86,
+ 0x25fe8d,
+ 0x260709,
+ 0x260712,
+ 0x32f345,
+ 0x3339c3,
+ 0x6320a9c2,
+ 0x309444,
+ 0x375903,
+ 0x360fc5,
+ 0x2fa085,
+ 0x63612982,
+ 0x36e843,
+ 0x63a50b82,
+ 0x642bf542,
+ 0x6460fb42,
+ 0x353805,
+ 0x37ac43,
+ 0x37a4c8,
+ 0x64a07842,
+ 0x64e000c2,
+ 0x2a8406,
+ 0x33b80a,
+ 0x21bf03,
+ 0x20c343,
+ 0x2ee3c3,
+ 0x65a02dc2,
+ 0x73e35482,
+ 0x74601c82,
+ 0x201682,
+ 0x36f549,
+ 0x2c2f04,
+ 0x2309c8,
+ 0x74af4542,
+ 0x74e08602,
+ 0x2ef605,
+ 0x2330c8,
+ 0x282288,
+ 0x2f858c,
+ 0x22d543,
+ 0x25a9c2,
+ 0x75201f82,
+ 0x2caac6,
+ 0x2fdc05,
+ 0x26d343,
+ 0x23cc46,
+ 0x2fdd46,
+ 0x201f83,
+ 0x2ff883,
+ 0x300786,
+ 0x3013c4,
+ 0x295586,
+ 0x2cec85,
+ 0x30164a,
+ 0x2eebc4,
+ 0x302304,
+ 0x30370a,
+ 0x7566b082,
+ 0x337745,
+ 0x30478a,
+ 0x305285,
+ 0x305b44,
+ 0x305c46,
+ 0x305dc4,
+ 0x218dc6,
+ 0x75a6dac2,
+ 0x2f3206,
+ 0x2f3dc5,
+ 0x3ab6c7,
+ 0x200206,
+ 0x248744,
+ 0x2d5e07,
+ 0x30dd46,
+ 0x2b8a45,
+ 0x381947,
+ 0x39eb47,
+ 0x39eb4e,
+ 0x25ed06,
+ 0x2e1805,
+ 0x27dec7,
+ 0x282b43,
+ 0x3b2f87,
+ 0x20f5c5,
+ 0x212144,
+ 0x212f82,
+ 0x3addc7,
+ 0x332944,
+ 0x377404,
+ 0x273f0b,
+ 0x21d5c3,
+ 0x2b6987,
+ 0x21d5c4,
+ 0x2cc0c7,
+ 0x228bc3,
+ 0x33678d,
+ 0x388b48,
+ 0x21d044,
+ 0x250bc5,
+ 0x307d05,
+ 0x308143,
+ 0x75e22f02,
+ 0x309903,
+ 0x309fc3,
+ 0x210004,
+ 0x279805,
+ 0x218307,
+ 0x375a46,
+ 0x372003,
+ 0x23ab4b,
+ 0x26ba4b,
+ 0x2a654b,
+ 0x2de44a,
+ 0x30254b,
+ 0x31be8b,
+ 0x356b8c,
+ 0x378d11,
+ 0x3b654a,
+ 0x3ba10b,
+ 0x30ad8b,
+ 0x30b34a,
+ 0x30b88a,
+ 0x30cb4e,
+ 0x30d18b,
+ 0x30d44a,
+ 0x30ef11,
+ 0x30f34a,
+ 0x30f84b,
+ 0x30fd8e,
+ 0x31078c,
+ 0x310c4b,
+ 0x310f0e,
+ 0x31128c,
+ 0x31474a,
+ 0x31698c,
+ 0x76316c8a,
+ 0x317489,
+ 0x31af4a,
+ 0x31b1ca,
+ 0x31b44b,
+ 0x31f60e,
+ 0x31f991,
+ 0x328b89,
+ 0x328dca,
+ 0x3295cb,
+ 0x32a84a,
+ 0x32b316,
+ 0x32e14b,
+ 0x32f10a,
+ 0x32f50a,
+ 0x33084b,
+ 0x333449,
+ 0x337109,
+ 0x337d4d,
+ 0x33870b,
+ 0x33978b,
+ 0x33a14b,
+ 0x33a609,
+ 0x33ac4e,
+ 0x33b30a,
+ 0x33fc8a,
+ 0x33ffca,
+ 0x340b8b,
+ 0x3413cb,
+ 0x34168d,
+ 0x342c0d,
+ 0x343290,
+ 0x34374b,
+ 0x34408c,
+ 0x34480b,
+ 0x34644b,
+ 0x34798b,
+ 0x34c00b,
+ 0x34ca8f,
+ 0x34ce4b,
+ 0x34d94a,
+ 0x34e689,
+ 0x34f409,
+ 0x34f8cb,
+ 0x34fb8e,
+ 0x35434b,
+ 0x35574f,
+ 0x35864b,
+ 0x35890b,
+ 0x358bcb,
+ 0x3590ca,
+ 0x35c609,
+ 0x35f34f,
+ 0x36424c,
+ 0x36488c,
+ 0x364d0e,
+ 0x3653cf,
+ 0x36578e,
+ 0x365fd0,
+ 0x3663cf,
+ 0x366f4e,
+ 0x36770c,
+ 0x367a12,
+ 0x3689d1,
+ 0x36988e,
+ 0x36a04e,
+ 0x36a58e,
+ 0x36a90f,
+ 0x36acce,
+ 0x36b053,
+ 0x36b511,
+ 0x36b94e,
+ 0x36bdcc,
+ 0x36d913,
+ 0x36e210,
+ 0x36ea8c,
+ 0x36ed8c,
+ 0x36f24b,
+ 0x3703ce,
+ 0x370c8b,
+ 0x3715cb,
+ 0x37258c,
+ 0x37814a,
+ 0x37850c,
+ 0x37880c,
+ 0x378b09,
+ 0x37bb8b,
+ 0x37be48,
+ 0x37c049,
+ 0x37c04f,
+ 0x37d98b,
+ 0x7677eb8a,
+ 0x381fcc,
+ 0x383189,
+ 0x383608,
+ 0x38380b,
+ 0x383c8b,
+ 0x38480a,
+ 0x384a8b,
+ 0x38540c,
+ 0x386008,
+ 0x388d4b,
+ 0x38b44b,
+ 0x39484b,
+ 0x3958cb,
+ 0x39e6cb,
+ 0x39e989,
+ 0x39eecd,
+ 0x3a464a,
+ 0x3a5597,
+ 0x3a6bd8,
+ 0x3a96c9,
+ 0x3ab30b,
+ 0x3ac814,
+ 0x3acd0b,
+ 0x3ad28a,
+ 0x3aea0a,
+ 0x3aec8b,
+ 0x3b4250,
+ 0x3b4651,
+ 0x3b4d0a,
+ 0x3b5b4d,
+ 0x3b624d,
+ 0x3ba3cb,
+ 0x3bbd46,
+ 0x20ff83,
+ 0x76b80483,
+ 0x22cdc6,
+ 0x247645,
+ 0x27a007,
+ 0x31bd46,
+ 0x1656682,
+ 0x2ad9c9,
+ 0x31a7c4,
+ 0x2dacc8,
+ 0x232b43,
+ 0x309387,
+ 0x234f42,
+ 0x2ac243,
+ 0x76e07b02,
+ 0x2c7406,
+ 0x2c9884,
+ 0x369f44,
+ 0x390143,
+ 0x390145,
+ 0x776c3d82,
+ 0x77aa6cc4,
+ 0x270787,
+ 0x77e4a282,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x204e83,
+ 0x205702,
+ 0x16d208,
+ 0x2099c2,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x214843,
+ 0x324556,
+ 0x325793,
+ 0x26f749,
+ 0x3b0688,
+ 0x379509,
+ 0x304906,
+ 0x3389d0,
+ 0x254b53,
+ 0x38e508,
+ 0x28ea47,
+ 0x36c747,
+ 0x284d0a,
+ 0x372349,
+ 0x38d849,
+ 0x28decb,
+ 0x349846,
+ 0x379b4a,
+ 0x220d86,
+ 0x31a3c3,
+ 0x2d48c5,
+ 0x35e288,
+ 0x23888d,
+ 0x2b984c,
+ 0x2de0c7,
+ 0x30b00d,
+ 0x2142c4,
+ 0x22fd8a,
+ 0x230d4a,
+ 0x23120a,
+ 0x2099c7,
+ 0x23af07,
+ 0x23d844,
+ 0x22e206,
+ 0x20c144,
+ 0x2b4148,
+ 0x22cbc9,
+ 0x2b0a86,
+ 0x2b0a88,
+ 0x2422cd,
+ 0x2c6309,
+ 0x3ac008,
+ 0x264a07,
+ 0x2f1f0a,
+ 0x24c506,
+ 0x2580c7,
+ 0x2cc3c4,
+ 0x23f287,
+ 0x309c0a,
+ 0x3ae54e,
+ 0x21d205,
+ 0x3b4a4b,
+ 0x331a09,
+ 0x217649,
+ 0x21c747,
+ 0x2a34ca,
+ 0x20ac87,
+ 0x2fb1c9,
+ 0x38f0c8,
+ 0x3533cb,
+ 0x2da905,
+ 0x3a430a,
+ 0x266e09,
+ 0x26d2ca,
+ 0x2ca6cb,
+ 0x23f18b,
+ 0x28dc55,
+ 0x2e3b85,
+ 0x264a85,
+ 0x2ee0ca,
+ 0x3945ca,
+ 0x331787,
+ 0x21da83,
+ 0x2904c8,
+ 0x2d2c4a,
+ 0x223006,
+ 0x24dfc9,
+ 0x265c88,
+ 0x2d7984,
+ 0x2aa289,
+ 0x2bfa08,
+ 0x29fec7,
+ 0x3630c6,
+ 0x2ebe07,
+ 0x289a47,
+ 0x23d005,
+ 0x21d04c,
+ 0x250bc5,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x205503,
+ 0x204e83,
+ 0x200983,
+ 0x2a84c3,
+ 0x205503,
+ 0x25e983,
+ 0x200983,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2099c2,
+ 0x2006c2,
+ 0x231442,
+ 0x206502,
+ 0x200542,
+ 0x2decc2,
+ 0x46a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x2e9dc3,
+ 0x244183,
+ 0x209703,
+ 0x2d47c6,
+ 0x205503,
+ 0x200983,
+ 0x233183,
+ 0x16d208,
+ 0x31ae44,
+ 0x202107,
+ 0x392403,
+ 0x2ae584,
+ 0x22e043,
+ 0x21c7c3,
+ 0x2e9dc3,
+ 0x16fc07,
+ 0x205702,
+ 0x18d2c3,
+ 0x5a099c2,
+ 0x88f4d,
+ 0x8928d,
+ 0x231442,
+ 0x1b1384,
+ 0x200442,
+ 0x5fb1288,
+ 0xed844,
+ 0x16d208,
+ 0x1411d82,
+ 0x15054c6,
+ 0x231783,
+ 0x200c03,
+ 0x66a84c3,
+ 0x22fd84,
+ 0x6a32403,
+ 0x6ee9dc3,
+ 0x202bc2,
+ 0x3b1384,
+ 0x205503,
+ 0x2f78c3,
+ 0x203ec2,
+ 0x200983,
+ 0x21b5c2,
+ 0x2f2443,
+ 0x203082,
+ 0x211643,
+ 0x265d43,
+ 0x200202,
+ 0x16d208,
+ 0x231783,
+ 0x2f78c3,
+ 0x203ec2,
+ 0x2f2443,
+ 0x203082,
+ 0x211643,
+ 0x265d43,
+ 0x200202,
+ 0x2f2443,
+ 0x203082,
+ 0x211643,
+ 0x265d43,
+ 0x200202,
+ 0x2a84c3,
+ 0x38d2c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x244183,
+ 0x209703,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x20f942,
+ 0x201303,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x38d2c3,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x205503,
+ 0x200983,
+ 0x373605,
+ 0x212982,
+ 0x205702,
+ 0x16d208,
+ 0x1456108,
+ 0x2e9dc3,
+ 0x2274c1,
+ 0x202901,
+ 0x202941,
+ 0x23ad81,
+ 0x23ad01,
+ 0x30aec1,
+ 0x23aec1,
+ 0x2275c1,
+ 0x2eea41,
+ 0x30afc1,
0x200141,
0x200001,
- 0x15f048,
+ 0x129845,
+ 0x16d208,
+ 0x201ec1,
0x200701,
- 0x200101,
- 0x2000c1,
- 0x201e41,
- 0x200181,
- 0x200941,
- 0x200041,
- 0x204ec1,
+ 0x200301,
0x200081,
- 0x201481,
- 0x200c01,
- 0x2002c1,
- 0x200381,
+ 0x200181,
+ 0x200401,
+ 0x200041,
+ 0x201181,
+ 0x200101,
+ 0x200281,
0x200e81,
- 0x21c2c1,
- 0x2003c1,
+ 0x2008c1,
+ 0x200441,
+ 0x201301,
+ 0x206ec1,
+ 0x200341,
+ 0x200801,
+ 0x2002c1,
+ 0x2000c1,
+ 0x201501,
0x200201,
- 0x200241,
- 0x200a01,
- 0x2019c1,
- 0x201a81,
+ 0x200bc1,
0x2005c1,
- 0x2007c1,
- 0x200cc1,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x200382,
- 0x200383,
- 0x13ecc7,
- 0xfcc7,
- 0x28b86,
- 0x3dcca,
- 0x8cc48,
- 0x58dc8,
- 0x59207,
- 0x62a46,
- 0xde185,
- 0x63c85,
- 0x177ac6,
- 0x125886,
- 0x24ae04,
- 0x31cdc7,
- 0x15f048,
- 0x2da904,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x332ec3,
- 0x204303,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x217082,
- 0x2c8dc3,
- 0x21fd43,
- 0x200603,
- 0x202942,
- 0x251d43,
- 0x205283,
- 0x21e743,
+ 0x201cc1,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x200442,
+ 0x200983,
+ 0x16fc07,
+ 0x9807,
+ 0x1cdc6,
+ 0x13ef8a,
+ 0x88648,
+ 0x51d48,
+ 0x52107,
+ 0x191106,
+ 0xd8c05,
+ 0x192345,
+ 0x5d306,
+ 0x125c86,
+ 0x25ef44,
+ 0x311547,
+ 0x16d208,
+ 0x2d5f04,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x2e9dc3,
+ 0x244183,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x212982,
+ 0x2c5983,
+ 0x2bb143,
+ 0x32c243,
+ 0x2022c2,
+ 0x25d183,
+ 0x2030c3,
+ 0x204903,
0x200001,
- 0x203e43,
- 0x225b04,
- 0x37f1c3,
- 0x318cc3,
- 0x21c403,
- 0x360383,
- 0xaad0783,
- 0x23a184,
- 0x21c3c3,
- 0x22f143,
- 0x231b83,
- 0x2318c3,
- 0x23a943,
- 0x2a85c3,
- 0x318c43,
- 0x233ec3,
- 0x201e43,
- 0x253f84,
- 0x2abc02,
- 0x258683,
- 0x25eb43,
- 0x27bfc3,
- 0x262883,
- 0x201dc3,
- 0x332ec3,
- 0x208803,
- 0x209e43,
- 0x204143,
- 0x210203,
- 0x2ff083,
- 0xae30043,
- 0x2b1083,
- 0x2113c3,
- 0x22d603,
- 0x20fbc3,
- 0x226302,
- 0x201683,
- 0x204ac3,
- 0x160abc3,
- 0x27d643,
- 0x20ff03,
- 0x216ec3,
- 0x200383,
- 0x3b37c3,
- 0x21aa03,
- 0x241f03,
- 0x304f43,
- 0x2f8203,
- 0x30c845,
- 0x2202c3,
- 0x2f8243,
- 0x35ed83,
- 0x218c84,
- 0x265203,
- 0x311883,
- 0x2d8fc3,
- 0x201383,
- 0x217082,
- 0x23bd83,
- 0x308484,
- 0x22fec4,
- 0x22a843,
- 0x15f048,
- 0x4cc2,
- 0x1442,
- 0x2942,
- 0x5ac2,
- 0x2302,
- 0x702,
- 0x4e242,
- 0x1c2,
- 0x8a42,
- 0xc02,
- 0xf302,
- 0xb602,
- 0x73fc2,
- 0x4c82,
- 0x61e82,
- 0x17902,
- 0x3cf82,
- 0x54c2,
- 0x18b82,
- 0xfc2,
- 0x682,
- 0x1bb82,
- 0x1f82,
- 0xc4c2,
- 0x1702,
- 0x20c42,
- 0xa42,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x20d1c2,
- 0x200383,
- 0xc2d0783,
- 0x332ec3,
- 0x20fbc3,
- 0x20dc42,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x6c82,
- 0x2031c2,
- 0x24ac42,
- 0x15f048,
- 0xd1c2,
- 0x233482,
- 0x208842,
- 0x22f942,
- 0x204182,
- 0x209282,
- 0x63c85,
- 0x204702,
- 0x201882,
- 0x211f82,
- 0x2034c2,
- 0x217902,
- 0x384982,
- 0x201ac2,
- 0x245742,
- 0x13ecc7,
- 0x169a8d,
- 0xde209,
- 0x56bcb,
- 0xe3888,
- 0x55109,
- 0x332ec3,
- 0x15f048,
- 0x15f048,
- 0x59b46,
- 0x204cc2,
- 0x24ae04,
- 0x20d1c2,
- 0x2d0783,
- 0x2000c2,
- 0x231b83,
- 0x208a42,
- 0x2da904,
- 0x204303,
- 0x2513c2,
- 0x204ac3,
- 0x200382,
- 0x200383,
- 0x2716c6,
- 0x31c0cf,
- 0x70d8c3,
- 0x15f048,
- 0x20d1c2,
- 0x2135c3,
- 0x332ec3,
- 0x20fbc3,
- 0x155afcb,
- 0xde548,
- 0x14ff507,
- 0x13ecc7,
- 0x20d1c2,
- 0x2d0783,
- 0x332ec3,
- 0x204ac3,
- 0x204cc2,
- 0x200902,
- 0x207f42,
- 0xfad0783,
- 0x2416c2,
- 0x231b83,
- 0x2101c2,
- 0x22ad02,
- 0x332ec3,
- 0x2630c2,
- 0x255302,
- 0x2ae4c2,
- 0x203742,
- 0x291e02,
- 0x209902,
- 0x200b82,
- 0x274842,
- 0x258142,
- 0x251b02,
- 0x2b36c2,
- 0x242602,
- 0x246082,
- 0x263c42,
- 0x20fbc3,
- 0x205f02,
- 0x204ac3,
- 0x231302,
- 0x27de02,
- 0x200383,
- 0x251dc2,
- 0x20c4c2,
- 0x209f42,
- 0x200b42,
- 0x20c842,
- 0x2e4742,
- 0x220382,
- 0x24d082,
- 0x234f42,
- 0x310c8a,
- 0x347d0a,
- 0x37e80a,
- 0x3b5dc2,
- 0x2046c2,
- 0x204e82,
- 0xff4f589,
- 0x10324d0a,
- 0x15926c7,
- 0x1410c43,
- 0x243d0,
- 0x9402,
- 0x24fe44,
- 0x10ad0783,
- 0x231b83,
- 0x251304,
- 0x332ec3,
- 0x2964c4,
- 0x204303,
- 0x20fbc3,
- 0x204ac3,
- 0x20abc3,
- 0x200383,
- 0x2202c3,
- 0x24abc3,
- 0x15f048,
- 0x14629c4,
- 0x614c5,
- 0x5f88a,
- 0x1168c2,
- 0x1a03c6,
- 0x102d11,
- 0x1134f589,
- 0x61548,
- 0x82a08,
- 0x5e887,
- 0xf82,
- 0x19a18a,
- 0x2ac47,
- 0x15f048,
- 0x10b708,
- 0xbac7,
- 0x16c1b74b,
- 0x1082,
- 0x15de87,
- 0xdb4a,
- 0x5e58f,
- 0xfd4f,
- 0x1c402,
- 0xd1c2,
- 0xa8508,
- 0x185b0a,
- 0x1681c8,
- 0x3b02,
- 0x5e30f,
- 0xa3d4b,
- 0x1672c8,
- 0x13edc7,
- 0x15104a,
- 0x2f64b,
- 0x11dd09,
- 0x150f47,
- 0x100c4c,
- 0x1b3c47,
- 0x18d18a,
- 0x94b88,
- 0x195a8e,
- 0x28b8e,
- 0x2aa8b,
- 0x2b2cb,
- 0x2d3cb,
- 0x2e209,
- 0x3558b,
- 0x4a68d,
- 0xe984b,
- 0xec8cd,
- 0xecc4d,
- 0x18274a,
- 0x2fd0b,
- 0x3688b,
- 0x42305,
- 0x14243d0,
- 0x125d8f,
- 0x1264cf,
- 0x48dcd,
- 0x25910,
- 0x1742,
- 0x17203988,
- 0xfb48,
- 0x176f4745,
- 0x505cb,
- 0x117050,
- 0x57488,
- 0x2b48a,
- 0x5f4c9,
- 0x695c7,
- 0x69907,
- 0x69ac7,
- 0x6c287,
- 0x6d307,
- 0x6dd07,
- 0x6e487,
- 0x6e8c7,
- 0x6f487,
- 0x6f787,
- 0x6ffc7,
- 0x70187,
- 0x70347,
- 0x70507,
- 0x70807,
- 0x70c47,
- 0x718c7,
- 0x71d87,
- 0x729c7,
- 0x72f07,
- 0x730c7,
- 0x73807,
- 0x73e87,
- 0x74087,
- 0x74347,
- 0x74507,
- 0x746c7,
- 0x75047,
- 0x754c7,
- 0x75987,
- 0x76147,
- 0x76407,
- 0x76bc7,
- 0x76d87,
- 0x77107,
- 0x77d07,
- 0x78987,
- 0x78d87,
- 0x78f47,
- 0x79107,
- 0x79547,
- 0x7a307,
- 0x7a607,
- 0x7a907,
- 0x7aac7,
- 0x7ae47,
- 0x7b387,
- 0xa9c2,
- 0x4c94a,
- 0x16dc87,
- 0x178d528b,
- 0x14d5296,
- 0x19151,
- 0xf080a,
- 0xa838a,
- 0x59b46,
- 0xd2acb,
- 0x642,
- 0x2e891,
- 0x94609,
- 0x9a109,
- 0x74842,
- 0xa4f4a,
- 0xaa689,
- 0xab24f,
- 0xaca4e,
- 0xad708,
- 0x18d82,
- 0x15da89,
- 0x18b88e,
- 0xfd08c,
- 0xf254f,
- 0x146ce,
- 0x23b4c,
- 0x2ccc9,
- 0x2db51,
- 0x465c8,
- 0x482d2,
- 0x49fcd,
- 0x82bcd,
- 0x19090b,
- 0x3d2d5,
- 0x4c809,
- 0x4ec0a,
- 0x4f489,
- 0x5ecd0,
- 0x72c4b,
- 0x79f4f,
- 0x7c48b,
- 0x8340c,
- 0x84610,
- 0x8894a,
- 0x8dd0d,
- 0x16618e,
- 0x1ae00a,
- 0x8f7cc,
- 0x93994,
- 0x94291,
- 0xa494b,
- 0xa578f,
- 0xa7bcd,
- 0xac3ce,
- 0xb1acc,
- 0xb220c,
- 0xdc90b,
- 0xdcc0e,
- 0x122110,
- 0x11640b,
- 0x17a64d,
- 0x1af38f,
- 0xb798c,
- 0xb934e,
- 0xbb311,
- 0xc3ccc,
- 0xc5a47,
- 0x15e58d,
- 0x12b50c,
- 0x14be50,
- 0xd1b4d,
- 0xd8e47,
- 0xe2350,
- 0xfa008,
- 0xfb08b,
- 0x150bcf,
- 0x17de88,
- 0xf0a0d,
- 0x181d50,
- 0x17fb1846,
- 0xb6003,
- 0x1b02,
- 0xd0309,
- 0x5ac0a,
- 0x1084c6,
- 0x180dff49,
- 0x13203,
- 0xdab91,
- 0xdafc9,
- 0xdc047,
- 0x5e40b,
- 0xe4a90,
- 0xe4f4c,
- 0xe5385,
- 0x126cc8,
- 0x19dc0a,
- 0x129607,
- 0x1002,
- 0x12464a,
- 0x25e49,
- 0x3a20a,
- 0x8eacf,
- 0x44f4b,
- 0x1b280c,
- 0x1b2ad2,
- 0xaa085,
- 0x2124a,
- 0x186f2fc5,
- 0x17698c,
- 0x121203,
- 0x184982,
- 0xf86ca,
- 0x96b88,
- 0xeca88,
- 0x14a587,
- 0xd42,
- 0x2602,
- 0x3f390,
- 0x1702,
- 0x1aa2cf,
- 0x177ac6,
- 0x301ce,
- 0xe7fcb,
- 0x1ae208,
- 0xd6c09,
- 0x17cd92,
- 0x7c0d,
- 0x56608,
- 0x56a89,
- 0x5700d,
- 0x59c89,
- 0x5a28b,
- 0x5b088,
- 0x5f6c8,
- 0x68bc8,
- 0x68e49,
- 0x6904a,
- 0x6c8cc,
- 0xe5d0a,
- 0x104f87,
- 0x16b2cd,
- 0xf910b,
- 0x12fb4c,
- 0x1a05d0,
- 0x6902,
- 0x1968cd,
- 0x16c2,
- 0x11fc2,
- 0x104eca,
- 0xf070a,
- 0xf6bcb,
- 0x36a4c,
- 0x10b48e,
- 0x21ccd,
- 0x1ab488,
- 0x6c82,
- 0x1166118e,
- 0x11f6a18e,
- 0x1266c00a,
- 0x12ed0a0e,
- 0x137156ce,
- 0x13f2a00c,
- 0x15926c7,
- 0x15926c9,
- 0x1410c43,
- 0x14731e8c,
- 0x14f3a009,
- 0x1409402,
- 0x610d1,
- 0x16a0d1,
- 0x6bf4d,
- 0xd0951,
- 0x11b1d1,
- 0x129f4f,
- 0x131dcf,
- 0x139f4c,
- 0x14a94d,
- 0x18d555,
- 0x1ace0c,
- 0x1b41cc,
- 0x1b5850,
- 0x940c,
- 0x5838c,
- 0xedc19,
- 0x1a6719,
- 0x115419,
- 0x15c754,
- 0x17f854,
- 0x198594,
- 0x19ae14,
- 0x1a9054,
- 0x1577fb09,
- 0x15d98849,
- 0x167b4289,
- 0x11b6b089,
- 0x9402,
- 0x1236b089,
- 0x9402,
- 0xedc0a,
- 0x9402,
- 0x12b6b089,
- 0x9402,
- 0xedc0a,
- 0x9402,
- 0x1336b089,
- 0x9402,
- 0x13b6b089,
- 0x9402,
- 0x1436b089,
- 0x9402,
- 0xedc0a,
- 0x9402,
- 0x14b6b089,
- 0x9402,
- 0xedc0a,
- 0x9402,
- 0x1536b089,
- 0x9402,
- 0x15b6b089,
- 0x9402,
- 0x1636b089,
- 0x9402,
- 0x16b6b089,
- 0x9402,
- 0xedc0a,
- 0x9402,
- 0x102d05,
- 0x19a184,
- 0x11d644,
- 0x1a4884,
- 0xbfc04,
- 0x2144,
- 0x5e884,
- 0x1482283,
- 0x1420183,
- 0xffd84,
- 0x1542b83,
- 0x1742,
- 0x21cc3,
- 0x204cc2,
- 0x20d1c2,
- 0x2000c2,
- 0x2041c2,
- 0x208a42,
- 0x200382,
- 0x202602,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204143,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x204ac3,
- 0x200383,
- 0x3b943,
- 0x332ec3,
- 0x204cc2,
- 0x368883,
- 0x1a2d0783,
- 0x20ef47,
- 0x332ec3,
- 0x205d83,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x25084a,
- 0x2716c5,
- 0x21aa03,
- 0x205bc2,
- 0x15f048,
- 0x15f048,
- 0xd1c2,
- 0x11f0c2,
- 0x15dfc5,
- 0x15f048,
- 0xd0783,
- 0x1ae3db07,
- 0xcfd46,
- 0x1b1acd05,
- 0xcfe07,
- 0xa54a,
- 0xa408,
- 0xb747,
- 0x5f2c8,
- 0x18c407,
- 0xed30f,
- 0x3ab07,
- 0x165bc6,
- 0x117050,
- 0x122f0f,
- 0x108544,
- 0x1b4cfece,
- 0xafd0c,
- 0x11de8a,
- 0xac687,
- 0x12d54a,
- 0x60989,
- 0xc2f4a,
- 0x77a8a,
- 0x1084c6,
- 0xac74a,
- 0x11a58a,
- 0x154009,
- 0xda448,
- 0xda746,
- 0xde74d,
- 0xb9905,
- 0x5a107,
- 0x16df94,
- 0xfe58b,
- 0x16710a,
- 0xa8bcd,
- 0x28b83,
- 0x28b83,
- 0x28b86,
- 0x28b83,
- 0x168883,
- 0x15f048,
- 0xd1c2,
- 0x51304,
- 0x8cdc3,
- 0x170145,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x205283,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x29a2c3,
- 0x24abc3,
- 0x205283,
- 0x24ae04,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x209103,
- 0x2d0783,
- 0x231b83,
- 0x2041c3,
- 0x2135c3,
- 0x332ec3,
- 0x2964c4,
- 0x23a0c3,
- 0x22d603,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x21aa03,
- 0x38c743,
- 0x1d2d0783,
- 0x231b83,
- 0x2c3ec3,
- 0x332ec3,
- 0x2075c3,
- 0x22d603,
- 0x200383,
- 0x2054c3,
- 0x343c44,
- 0x15f048,
- 0x1dad0783,
- 0x231b83,
- 0x2ad7c3,
- 0x332ec3,
- 0x20fbc3,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x21d7c3,
- 0x15f048,
- 0x1e2d0783,
- 0x231b83,
- 0x2135c3,
- 0x20abc3,
- 0x200383,
- 0x15f048,
- 0x15926c7,
- 0x368883,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x13ecc7,
- 0x16e1cb,
- 0xdb3c4,
- 0xb9905,
- 0x1491b48,
- 0xae2cd,
- 0x1f68a405,
- 0x192c4,
- 0x1a5c3,
- 0x367fc5,
- 0x15f048,
- 0x1d202,
- 0x2803,
- 0xf7286,
- 0x32f448,
- 0x304507,
- 0x24ae04,
- 0x3b3006,
- 0x3b5706,
- 0x15f048,
- 0x310683,
- 0x2384c9,
- 0x2bdad5,
- 0xbdadf,
- 0x2d0783,
- 0x39a9d2,
- 0xf5806,
- 0x10cfc5,
- 0x2b48a,
- 0x5f4c9,
- 0x39a78f,
- 0x2da904,
- 0x20f345,
- 0x2fee50,
- 0x2959c7,
- 0x20abc3,
- 0x2842c8,
- 0x1257c6,
- 0x2b400a,
- 0x200e84,
- 0x2f2a03,
- 0x2716c6,
- 0x205bc2,
- 0x26b44b,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x2f74c3,
- 0x20d1c2,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x205d83,
- 0x223103,
- 0x200383,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x204ac3,
- 0x200383,
- 0x204cc2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x24ae04,
- 0x2d0783,
- 0x231b83,
- 0x222044,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x209e43,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x262fc3,
- 0x1e303,
- 0x5d83,
- 0x204ac3,
- 0x200383,
- 0x310c8a,
- 0x32a949,
- 0x34184b,
- 0x341f8a,
- 0x347d0a,
- 0x356e8b,
- 0x37300a,
- 0x37914a,
- 0x37e80a,
- 0x37ea8b,
- 0x39d949,
- 0x39f84a,
- 0x39fbcb,
- 0x3a9d0b,
- 0x3b4a8a,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x10c9c9,
- 0x15f048,
- 0x2d0783,
- 0x2695c4,
- 0x200c82,
- 0x213184,
- 0x3ac705,
- 0x205283,
- 0x24ae04,
- 0x2d0783,
- 0x23a184,
- 0x231b83,
- 0x251304,
- 0x2da904,
- 0x2964c4,
- 0x22d603,
- 0x204ac3,
- 0x200383,
- 0x293ac5,
- 0x209103,
- 0x21aa03,
- 0x22c6c3,
- 0x258a04,
- 0x262904,
- 0x35d705,
- 0x15f048,
- 0x306e44,
- 0x20e546,
- 0x28a8c4,
- 0x20d1c2,
- 0x361ac7,
- 0x253587,
- 0x24f0c4,
- 0x25d8c5,
- 0x2d1d45,
- 0x2b0405,
- 0x2964c4,
- 0x23cfc8,
- 0x33f306,
- 0x311f48,
- 0x227b05,
- 0x2e0405,
- 0x377004,
- 0x200383,
- 0x2f39c4,
- 0x355f46,
- 0x2717c3,
- 0x258a04,
- 0x291a45,
- 0x363644,
- 0x234e84,
- 0x205bc2,
- 0x25e206,
- 0x392206,
- 0x3022c5,
- 0x204cc2,
- 0x368883,
- 0x24e0d1c2,
- 0x232dc4,
- 0x208a42,
- 0x20fbc3,
- 0x25e402,
- 0x204ac3,
- 0x200382,
- 0x213e83,
- 0x24abc3,
- 0x15f048,
- 0x15f048,
- 0x332ec3,
- 0x204cc2,
- 0x25a0d1c2,
- 0x332ec3,
- 0x2702c3,
- 0x23a0c3,
- 0x32bc44,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x204cc2,
- 0x2620d1c2,
- 0x2d0783,
- 0x204ac3,
- 0x200383,
- 0x682,
- 0x2044c2,
- 0x217082,
- 0x205d83,
- 0x2ec383,
- 0x204cc2,
- 0x15f048,
- 0x13ecc7,
- 0x20d1c2,
- 0x231b83,
- 0x251304,
- 0x202743,
- 0x332ec3,
- 0x209e43,
- 0x20fbc3,
- 0x204ac3,
- 0x2183c3,
- 0x200383,
- 0x21d743,
- 0x1286d3,
- 0x12cb54,
- 0x13ecc7,
- 0x1fd86,
- 0x5ae0b,
- 0x28b86,
- 0x58c07,
- 0x130089,
- 0xe9cca,
- 0x8cb0d,
- 0x16978c,
- 0x13d64a,
- 0x63c85,
- 0xa588,
- 0x177ac6,
- 0x125886,
- 0x201742,
- 0x827cc,
- 0x19a347,
- 0x23551,
- 0x2d0783,
- 0x5f245,
- 0x102c4,
- 0x274341c6,
- 0x19146,
- 0x178146,
- 0x920ca,
- 0xb2f03,
- 0x27a5c984,
- 0x130045,
- 0xa383,
- 0xd2b8c,
- 0xf6188,
- 0xbaf48,
- 0xa3bc9,
- 0x20c48,
- 0x141dd06,
- 0xfbc88,
- 0x5e884,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x204cc2,
- 0x20d1c2,
- 0x332ec3,
- 0x20a3c2,
- 0x204ac3,
- 0x200383,
- 0x213e83,
- 0x36388f,
- 0x363c4e,
- 0x15f048,
- 0x2d0783,
- 0x4cd07,
- 0x231b83,
- 0x332ec3,
- 0x204303,
- 0x204ac3,
- 0x200383,
- 0x21d0c3,
- 0x239c47,
- 0x200142,
- 0x2c1949,
- 0x201442,
- 0x23f68b,
- 0x2b5b8a,
- 0x2bcfc9,
- 0x200282,
- 0x262b46,
- 0x26d615,
- 0x23f7d5,
- 0x274a13,
- 0x23fd53,
- 0x202342,
- 0x20d605,
- 0x3ab1cc,
- 0x24698b,
- 0x29a745,
- 0x205ac2,
- 0x289c02,
- 0x386746,
- 0x200f82,
- 0x25fb86,
- 0x294d0d,
- 0x255dcc,
- 0x224444,
- 0x201342,
- 0x203782,
- 0x248688,
- 0x202302,
- 0x208886,
- 0x303bc4,
- 0x26d7d5,
- 0x274b93,
- 0x210b83,
- 0x33070a,
- 0x2f0187,
- 0x3b2209,
- 0x32dc47,
- 0x3124c2,
- 0x200002,
- 0x3a4386,
- 0x20a0c2,
- 0x15f048,
- 0x200802,
- 0x211cc2,
- 0x27d407,
- 0x3b3507,
- 0x21c7c5,
- 0x201082,
- 0x21d707,
- 0x21d8c8,
- 0x2413c2,
- 0x2c2fc2,
- 0x22c1c2,
- 0x20e542,
- 0x23b688,
- 0x218443,
- 0x2b72c8,
- 0x2e078d,
- 0x21fe43,
- 0x226288,
- 0x23e88f,
- 0x23ec4e,
- 0x24ac8a,
- 0x229d11,
- 0x22a190,
- 0x2bf0cd,
- 0x2bf40c,
- 0x38c5c7,
- 0x330887,
- 0x3b30c9,
- 0x204f02,
- 0x200702,
- 0x25a6cc,
- 0x25a9cb,
- 0x202ac2,
- 0x2dcac6,
- 0x20db42,
- 0x20c502,
- 0x21c402,
- 0x20d1c2,
- 0x384684,
- 0x23c7c7,
- 0x220802,
- 0x242c07,
- 0x243c47,
- 0x2271c2,
- 0x20e482,
- 0x24cbc5,
- 0x204d02,
- 0x20cb4e,
- 0x36f1cd,
- 0x231b83,
- 0x353a0e,
- 0x2c0b8d,
- 0x3ab643,
- 0x201842,
- 0x206744,
- 0x208182,
- 0x220a42,
- 0x33e805,
- 0x348447,
- 0x372202,
- 0x2041c2,
- 0x250f07,
- 0x2543c8,
- 0x2abc02,
- 0x2aa106,
- 0x25a54c,
- 0x25a88b,
- 0x20da42,
- 0x26588f,
- 0x265c50,
- 0x26604f,
- 0x266415,
- 0x266954,
- 0x266e4e,
- 0x2671ce,
- 0x26754f,
- 0x26790e,
- 0x267c94,
- 0x268193,
- 0x26864d,
- 0x27b549,
- 0x28dbc3,
- 0x200182,
- 0x237b85,
- 0x206506,
- 0x208a42,
- 0x21a2c7,
- 0x332ec3,
- 0x200642,
- 0x36edc8,
- 0x229f51,
- 0x22a390,
- 0x200bc2,
- 0x28d387,
- 0x200b02,
- 0x205fc7,
- 0x201b02,
- 0x32f249,
- 0x386707,
- 0x281408,
- 0x234006,
- 0x2cf4c3,
- 0x2cf4c5,
- 0x231e02,
- 0x204842,
- 0x3a4785,
- 0x376e05,
- 0x205e82,
- 0x245f43,
- 0x3636c7,
- 0x210687,
- 0x204982,
- 0x3aae04,
- 0x214183,
- 0x2c9209,
- 0x2ed188,
- 0x205d82,
- 0x2032c2,
- 0x26e2c7,
- 0x282185,
- 0x2ab548,
- 0x20d2c7,
- 0x216143,
- 0x372306,
- 0x2bef4d,
- 0x2bf2cc,
- 0x280346,
- 0x208842,
- 0x2017c2,
- 0x201f02,
- 0x23e70f,
- 0x23eb0e,
- 0x2d1dc7,
- 0x203cc2,
- 0x2c3345,
- 0x2c3346,
- 0x20bcc2,
- 0x205f02,
- 0x28f406,
- 0x205f03,
- 0x205f06,
- 0x2ca585,
- 0x2ca58d,
- 0x2cab55,
- 0x2cb38c,
- 0x2cc28d,
- 0x2cc652,
- 0x20b602,
- 0x273fc2,
- 0x201302,
- 0x240fc6,
- 0x2fcf46,
- 0x201002,
- 0x206586,
- 0x211f82,
- 0x37edc5,
- 0x202382,
- 0x20cc89,
- 0x2df2cc,
- 0x2df60b,
- 0x200382,
- 0x255688,
- 0x213a02,
- 0x204c82,
- 0x246746,
- 0x36b005,
- 0x235007,
- 0x2567c5,
- 0x294805,
- 0x24cd82,
- 0x20a642,
- 0x217902,
- 0x2f2847,
- 0x24410d,
- 0x24448c,
- 0x2b3387,
- 0x2aa082,
- 0x23cf82,
- 0x24ba48,
- 0x2d0488,
- 0x2e5f88,
- 0x2f09c4,
- 0x2dce87,
- 0x2ee483,
- 0x2b6042,
- 0x200e82,
- 0x2f11c9,
- 0x395e87,
- 0x2054c2,
- 0x277245,
- 0x201202,
- 0x26a102,
- 0x349c43,
- 0x349c46,
- 0x2f74c2,
- 0x2f7fc2,
- 0x201402,
- 0x3b3fc6,
- 0x206687,
- 0x207842,
- 0x200e02,
- 0x38bc8f,
- 0x35384d,
- 0x2b714e,
- 0x2c0a0c,
- 0x2003c2,
- 0x205502,
- 0x233e45,
- 0x3b4e86,
- 0x201ec2,
- 0x200fc2,
- 0x200682,
- 0x20d244,
- 0x2e0604,
- 0x2d29c6,
- 0x202602,
- 0x27e787,
- 0x22d703,
- 0x22d708,
- 0x24b048,
- 0x390787,
- 0x240ec6,
- 0x20e5c2,
- 0x23b383,
- 0x23b387,
- 0x272846,
- 0x2e4385,
- 0x2f0d48,
- 0x206342,
- 0x34a007,
- 0x220c42,
- 0x33c282,
- 0x203b82,
- 0x2dbe09,
- 0x22fb02,
+ 0x2dc745,
+ 0x206b43,
+ 0x221344,
+ 0x26cc83,
+ 0x318ec3,
+ 0x21b103,
+ 0x35ff43,
+ 0xaaa84c3,
+ 0x235ac4,
+ 0x23dbc3,
+ 0x21cc43,
+ 0x21b0c3,
+ 0x22ffc3,
+ 0x232403,
+ 0x232143,
+ 0x2459c3,
+ 0x2a2703,
+ 0x318e43,
+ 0x2344c3,
+ 0x202643,
+ 0x24ce44,
+ 0x24e347,
+ 0x248902,
+ 0x250943,
+ 0x256303,
+ 0x273ac3,
+ 0x390f43,
+ 0x2025c3,
+ 0xaee9dc3,
+ 0x20bec3,
+ 0x2143c3,
+ 0x24a5c3,
+ 0x328085,
+ 0x209d43,
+ 0x2fa383,
+ 0xb21f903,
+ 0x365f03,
+ 0x20d543,
+ 0x227f83,
+ 0x209703,
+ 0x228502,
+ 0x27d2c3,
+ 0x205503,
+ 0x1604e83,
+ 0x224a43,
+ 0x209a43,
+ 0x204a03,
+ 0x200983,
+ 0x35fe83,
+ 0x20f943,
+ 0x201303,
+ 0x2efe83,
+ 0x2ff903,
+ 0x2f2603,
+ 0x204405,
+ 0x23e743,
+ 0x285346,
+ 0x2f2643,
+ 0x36cf43,
+ 0x3759c4,
+ 0x2d9083,
+ 0x2284c3,
+ 0x267ec3,
+ 0x233183,
+ 0x212982,
+ 0x22d543,
+ 0x3024c3,
+ 0x304144,
+ 0x377404,
+ 0x20ce83,
+ 0x16d208,
+ 0x205702,
0x200242,
- 0x240183,
- 0x319ac7,
- 0x2018c2,
- 0x2df44c,
- 0x2df74b,
- 0x2803c6,
- 0x20a2c5,
- 0x222e82,
- 0x200a42,
- 0x2bd306,
- 0x235b83,
- 0x39c147,
- 0x23bb02,
- 0x203382,
- 0x26d495,
- 0x23f995,
- 0x2748d3,
- 0x23fed3,
- 0x2934c7,
- 0x2b5948,
- 0x2fb310,
- 0x30ee4f,
- 0x2b5953,
- 0x2bcd92,
- 0x2c1510,
- 0x2ca1cf,
- 0x2d57d2,
- 0x2d84d1,
- 0x2d9513,
- 0x2dbbd2,
- 0x2dd20f,
- 0x2e57ce,
- 0x2f5092,
- 0x2f6351,
- 0x2f754f,
- 0x2f834e,
- 0x300011,
- 0x355810,
- 0x35f212,
- 0x3702d1,
- 0x2f9bc6,
- 0x307487,
- 0x373387,
- 0x204b42,
- 0x284e05,
- 0x2febc7,
- 0x217082,
- 0x203142,
- 0x2293c5,
- 0x21ee43,
- 0x35d986,
- 0x2442cd,
- 0x24460c,
- 0x206602,
- 0x3ab04b,
- 0x24684a,
- 0x30be4a,
- 0x2bbf49,
- 0x2ef68b,
- 0x20d40d,
- 0x2ff2cc,
- 0x24890a,
- 0x275b0c,
- 0x27afcb,
- 0x29a58c,
- 0x2fa34b,
- 0x2df243,
- 0x35ee06,
- 0x3a6502,
- 0x2f8b82,
- 0x2db2c3,
- 0x202502,
- 0x202503,
- 0x245886,
- 0x2665c7,
- 0x365146,
- 0x385cc8,
- 0x2d0188,
- 0x2d3186,
- 0x2019c2,
- 0x301c8d,
- 0x301fcc,
- 0x2da9c7,
- 0x306d07,
- 0x21fdc2,
- 0x21ac02,
- 0x23b302,
- 0x254782,
- 0x20d1c2,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x213e83,
- 0x204cc2,
- 0x204e02,
- 0x29a94005,
- 0x29e02e85,
- 0x2a3177c6,
- 0x15f048,
- 0x2a6b5145,
- 0x20d1c2,
- 0x2000c2,
- 0x2ab9c685,
- 0x2ae83305,
- 0x2b283e07,
- 0x2b68b309,
- 0x2ba47ac4,
- 0x208a42,
- 0x200642,
- 0x2bf72245,
- 0x2c293149,
- 0x2c71db88,
- 0x2cab2085,
- 0x2cf363c7,
- 0x2d219b08,
- 0x2d6e8605,
- 0x2da5b4c6,
- 0x2de346c9,
- 0x2e2b8648,
- 0x2e6c4b48,
- 0x2ea9cf0a,
- 0x2ee52104,
- 0x2f2d6585,
- 0x2f6becc8,
- 0x2fb51245,
- 0x2184c2,
- 0x2fe63b83,
- 0x302a7786,
- 0x3064ea48,
- 0x30a24f06,
- 0x30ecec88,
- 0x3132d1c6,
- 0x316e4444,
- 0x202082,
- 0x31b630c7,
- 0x31eaeb84,
- 0x3227dc47,
- 0x327a1087,
- 0x200382,
- 0x32aa0685,
- 0x32e03bc4,
- 0x332d1807,
- 0x3362adc7,
- 0x33a87406,
- 0x33e36085,
- 0x3429b807,
- 0x346d2688,
- 0x34a37f07,
- 0x34eb0689,
- 0x3538e6c5,
- 0x35719c07,
- 0x35a92e46,
- 0x35e62d48,
- 0x2460cd,
- 0x24cf09,
- 0x2f484b,
- 0x25534b,
- 0x27de4b,
- 0x2aa88b,
- 0x30f20b,
- 0x30f4cb,
- 0x30fd49,
- 0x310f0b,
- 0x3111cb,
- 0x311ccb,
- 0x31284a,
- 0x312d8a,
- 0x31338c,
- 0x31608b,
- 0x3166ca,
- 0x327eca,
- 0x3328ce,
- 0x333a4e,
- 0x333dca,
- 0x335d8a,
- 0x3369cb,
- 0x336c8b,
- 0x337a4b,
- 0x34c7cb,
- 0x34cdca,
- 0x34da8b,
- 0x34dd4a,
- 0x34dfca,
- 0x34e24a,
- 0x373ecb,
- 0x37a2cb,
- 0x37c38e,
- 0x37c70b,
- 0x383ecb,
- 0x38500b,
- 0x38984a,
- 0x389ac9,
- 0x389d0a,
- 0x38b38a,
- 0x39e50b,
- 0x39fe8b,
- 0x3a09ca,
- 0x3a28cb,
- 0x3a588b,
- 0x3b44cb,
- 0x36285b88,
- 0x3668c289,
- 0x36aa3a49,
- 0x36ee0bc8,
- 0x33c685,
- 0x202943,
- 0x212944,
- 0x206885,
- 0x247806,
- 0x25b245,
- 0x28adc4,
- 0x21a1c8,
- 0x30af85,
- 0x297a44,
- 0x209907,
- 0x2a280a,
- 0x361d8a,
- 0x3101c7,
- 0x211f47,
- 0x2fdec7,
- 0x255b47,
- 0x2fad45,
- 0x343d06,
- 0x22cb47,
- 0x26fec4,
- 0x2e6b46,
- 0x2e6a46,
- 0x208305,
- 0x3492c4,
- 0x38ec86,
- 0x2a1647,
- 0x22d046,
- 0x351b47,
- 0x26a783,
- 0x2b4846,
- 0x232045,
- 0x283f07,
- 0x270e0a,
- 0x26dfc4,
- 0x218ec8,
- 0x2affc9,
- 0x2cb147,
- 0x334646,
- 0x255908,
- 0x200a49,
- 0x3b23c4,
- 0x2210c4,
- 0x278285,
- 0x22c848,
- 0x2c7f47,
- 0x2a7109,
- 0x2f9cc8,
- 0x347a86,
- 0x24c646,
- 0x29de88,
- 0x354c46,
- 0x202e85,
- 0x2874c6,
- 0x27e108,
- 0x254b86,
- 0x25d14b,
- 0x29dac6,
- 0x29f50d,
- 0x3b1785,
- 0x2aea46,
- 0x20f505,
- 0x349909,
- 0x2abe87,
- 0x3195c8,
- 0x292986,
- 0x29e709,
- 0x364546,
- 0x270d85,
- 0x2a4dc6,
- 0x2c99c6,
- 0x2cdb89,
- 0x200846,
- 0x253087,
- 0x277885,
- 0x202383,
- 0x25d2c5,
- 0x29f7c7,
- 0x358e06,
- 0x3b1689,
- 0x3177c6,
- 0x287706,
- 0x215ec9,
- 0x286ec9,
- 0x2a5607,
- 0x2cf688,
- 0x377f89,
- 0x284a88,
- 0x379386,
- 0x2d9dc5,
- 0x23cb4a,
- 0x287786,
- 0x3a8506,
- 0x2cbbc5,
- 0x272188,
- 0x215587,
- 0x22e68a,
- 0x251746,
- 0x24d345,
- 0x329cc6,
- 0x2d6347,
- 0x334507,
- 0x2c4145,
- 0x270f45,
- 0x2b2f86,
- 0x351746,
- 0x387046,
- 0x2b8bc4,
- 0x286209,
- 0x28d146,
- 0x30e50a,
- 0x222848,
- 0x309148,
- 0x361d8a,
- 0x2145c5,
- 0x2a1585,
- 0x37f588,
- 0x2b6348,
- 0x21b507,
- 0x293846,
- 0x320d48,
- 0x3674c7,
- 0x285188,
- 0x2b9206,
- 0x2885c8,
- 0x29ad46,
- 0x227c87,
- 0x272b06,
- 0x38ec86,
- 0x25d9ca,
- 0x384706,
- 0x2d9dc9,
- 0x2b5446,
- 0x2e3d8a,
- 0x2e4449,
- 0x362586,
+ 0x2022c2,
+ 0x201702,
+ 0x202a42,
+ 0x206c02,
+ 0x245482,
+ 0x2007c2,
+ 0x20d882,
+ 0x200e82,
+ 0x20b102,
+ 0x20e602,
+ 0x2675c2,
+ 0x2056c2,
+ 0x2decc2,
+ 0x2013c2,
+ 0x2069c2,
+ 0x201302,
+ 0x2172c2,
+ 0x202482,
+ 0x200482,
+ 0x219382,
+ 0x202782,
+ 0x209842,
+ 0x2027c2,
+ 0x222702,
+ 0x203b42,
+ 0x5702,
+ 0x242,
+ 0x22c2,
+ 0x1702,
+ 0x2a42,
+ 0x6c02,
+ 0x45482,
+ 0x7c2,
+ 0xd882,
+ 0xe82,
+ 0xb102,
+ 0xe602,
+ 0x675c2,
+ 0x56c2,
+ 0xdecc2,
+ 0x13c2,
+ 0x69c2,
+ 0x1302,
+ 0x172c2,
+ 0x2482,
+ 0x482,
+ 0x19382,
+ 0x2782,
+ 0x9842,
+ 0x27c2,
+ 0x22702,
+ 0x3b42,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2099c2,
+ 0x200983,
+ 0xc6a84c3,
+ 0x2e9dc3,
+ 0x209703,
+ 0x21a2c2,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x7b02,
+ 0x201bc2,
+ 0x153f3c5,
+ 0x25ed82,
+ 0x16d208,
+ 0x99c2,
+ 0x20c182,
+ 0x208d02,
+ 0x2024c2,
+ 0x209642,
+ 0x208442,
+ 0x192345,
+ 0x2038c2,
+ 0x203ec2,
+ 0x2023c2,
+ 0x204dc2,
+ 0x2013c2,
+ 0x385502,
+ 0x201102,
+ 0x236582,
+ 0x16fc07,
+ 0x1b270d,
+ 0xd8c89,
+ 0x56e8b,
+ 0xdd608,
+ 0x53dc9,
+ 0xfacc6,
+ 0x2e9dc3,
+ 0x16d208,
+ 0x16d208,
+ 0x52e06,
+ 0x1a78c7,
+ 0x205702,
+ 0x25ef44,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x2006c2,
+ 0x232403,
+ 0x20d882,
+ 0x2d5f04,
+ 0x244183,
+ 0x249a02,
+ 0x205503,
+ 0x200442,
+ 0x200983,
+ 0x264a86,
+ 0x31ba0f,
+ 0x70a403,
+ 0x16d208,
+ 0x2099c2,
+ 0x2163c3,
+ 0x2e9dc3,
+ 0x209703,
+ 0x1526f4b,
+ 0xd9888,
+ 0x142b68a,
+ 0x14fa807,
+ 0xda405,
+ 0x16fc07,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x2e9dc3,
+ 0x205503,
+ 0x205702,
+ 0x20c202,
+ 0x20bb42,
+ 0xfea84c3,
+ 0x23c042,
+ 0x232403,
+ 0x209d02,
+ 0x221402,
+ 0x2e9dc3,
+ 0x228782,
+ 0x251442,
+ 0x2a6c82,
+ 0x200f82,
+ 0x28d742,
+ 0x203442,
+ 0x202e42,
+ 0x267e42,
+ 0x24ecc2,
+ 0x211ec2,
+ 0x2ad882,
+ 0x2eab02,
+ 0x2182c2,
+ 0x2ad342,
+ 0x209703,
+ 0x20ec42,
+ 0x205503,
+ 0x200e42,
+ 0x281702,
+ 0x200983,
+ 0x25d202,
+ 0x209842,
+ 0x218942,
+ 0x202e02,
+ 0x200c42,
+ 0x2de402,
+ 0x20fe82,
+ 0x250b82,
+ 0x220642,
+ 0x30d44a,
+ 0x34d94a,
+ 0x37fc4a,
+ 0x3bbec2,
+ 0x202cc2,
+ 0x2058c2,
+ 0x1026e389,
+ 0x1072510a,
+ 0x1594ac7,
+ 0x1410843,
+ 0x24d50,
+ 0x50642,
+ 0x2030c4,
+ 0x10ea84c3,
+ 0x232403,
+ 0x249944,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x244183,
+ 0x209703,
+ 0x205503,
+ 0xdc105,
+ 0x204e83,
+ 0x200983,
+ 0x23e743,
+ 0x25ed03,
+ 0x16d208,
+ 0x1591084,
+ 0x18ff45,
+ 0x1a768a,
+ 0x116902,
+ 0x18ae46,
+ 0xaf551,
+ 0x1166e389,
+ 0x18ffc8,
+ 0x13f9c8,
+ 0xff387,
+ 0xec2,
+ 0x12984b,
+ 0x1a5b0a,
+ 0x21347,
+ 0x16d208,
+ 0x108f08,
+ 0xe4c7,
+ 0x17818f4b,
+ 0x1b887,
+ 0x1c02,
+ 0x6c707,
+ 0x1a1ca,
+ 0x13f6cf,
+ 0x988f,
+ 0x1b102,
+ 0x99c2,
+ 0xa2648,
+ 0x19e30a,
+ 0x1320c8,
+ 0xdc2,
+ 0x13f44f,
+ 0x9e18b,
+ 0x68bc8,
+ 0x38f47,
+ 0x388a,
+ 0x304cb,
+ 0x4efc9,
+ 0x11dd07,
+ 0xfc34c,
+ 0x2c07,
+ 0x19b40a,
+ 0xd4ac8,
+ 0x1a3cce,
+ 0x1cdce,
+ 0x2118b,
+ 0x26ccb,
+ 0x27d4b,
+ 0x2c009,
+ 0x2da0b,
+ 0x5e7cd,
+ 0x85acb,
+ 0xdfc8d,
+ 0xe000d,
+ 0xe164a,
+ 0x17724b,
+ 0x1ae0cb,
+ 0x31c45,
+ 0x1424d50,
+ 0x12618f,
+ 0x1268cf,
+ 0xe2c0d,
+ 0x1b8f90,
+ 0x2bb82,
+ 0x17fb0388,
+ 0x9688,
+ 0x182ee705,
+ 0x48fcb,
+ 0x117090,
+ 0x4fdc8,
+ 0x26e8a,
+ 0x56b49,
+ 0x5cb47,
+ 0x5ce87,
+ 0x5d047,
+ 0x5f507,
+ 0x60587,
+ 0x60b87,
+ 0x61387,
+ 0x617c7,
+ 0x61cc7,
+ 0x61fc7,
+ 0x62fc7,
+ 0x63187,
+ 0x63347,
+ 0x63507,
+ 0x63807,
+ 0x64007,
+ 0x64c87,
+ 0x65407,
+ 0x66547,
+ 0x66b07,
+ 0x66cc7,
+ 0x67047,
+ 0x67487,
+ 0x67687,
+ 0x67947,
+ 0x67b07,
+ 0x67cc7,
+ 0x67f87,
+ 0x68247,
+ 0x68f07,
+ 0x69607,
+ 0x698c7,
+ 0x6a047,
+ 0x6a207,
+ 0x6a607,
+ 0x6aec7,
+ 0x6b147,
+ 0x6b547,
+ 0x6b707,
+ 0x6b8c7,
+ 0x70587,
+ 0x71387,
+ 0x718c7,
+ 0x71e47,
+ 0x72007,
+ 0x72387,
+ 0x728c7,
+ 0xdb42,
+ 0xbbb0a,
+ 0xffb87,
+ 0x184cfa0b,
+ 0x14cfa16,
+ 0x17e91,
+ 0x1082ca,
+ 0xa24ca,
+ 0x52e06,
+ 0xd0f8b,
+ 0x5e82,
+ 0x2f711,
+ 0x157789,
+ 0x942c9,
+ 0x67e42,
+ 0x9f54a,
+ 0xa4909,
+ 0xa504f,
+ 0xa5a8e,
+ 0xa6388,
+ 0x17f42,
+ 0x18ef09,
+ 0x17f08e,
+ 0xf80cc,
+ 0xdf20f,
+ 0x198f4e,
+ 0xc84c,
+ 0x11809,
+ 0x13491,
+ 0x222c8,
+ 0x24512,
+ 0x281cd,
+ 0x2e0cd,
+ 0x8618b,
+ 0xbadd5,
+ 0xbb9c9,
+ 0xe268a,
+ 0x120689,
+ 0x160310,
+ 0x39a0b,
+ 0x4480f,
+ 0x5648b,
+ 0x58a8c,
+ 0x70f90,
+ 0x7beca,
+ 0x7d18d,
+ 0x80d4e,
+ 0x86cca,
+ 0x8720c,
+ 0x89714,
+ 0x157411,
+ 0x1a200b,
+ 0x9004f,
+ 0x9320d,
+ 0x9a00e,
+ 0x9fd8c,
+ 0xa1acc,
+ 0xaae8b,
+ 0xab18e,
+ 0xab990,
+ 0x154c0b,
+ 0x1160cd,
+ 0x10e80f,
+ 0x17e50c,
+ 0xb090e,
+ 0xb2391,
+ 0xb3ecc,
+ 0xc00c7,
+ 0xc064d,
+ 0xc0fcc,
+ 0xc1dd0,
+ 0x102c8d,
+ 0x12bc87,
+ 0xc7750,
+ 0xd3748,
+ 0xd51cb,
+ 0x12aa8f,
+ 0x17e248,
+ 0x1084cd,
+ 0x14d550,
+ 0x18ba60c6,
+ 0xaff43,
+ 0xbe02,
+ 0x11e309,
+ 0x5394a,
+ 0x104186,
+ 0x18cd9009,
+ 0x11d43,
+ 0xd6191,
+ 0xd65c9,
+ 0xd7607,
+ 0xaf6cb,
+ 0xde6d0,
+ 0xdeb8c,
+ 0xdf6c5,
+ 0x18f248,
+ 0x19f94a,
+ 0x111947,
+ 0x33c2,
+ 0x124a4a,
+ 0x127549,
+ 0x35b4a,
+ 0x8a3cf,
+ 0x3edcb,
+ 0x12814c,
+ 0x169b92,
+ 0xaea45,
+ 0x166aca,
+ 0x192ece45,
+ 0x18020c,
+ 0x122843,
+ 0x185502,
+ 0xf2bca,
+ 0x14f3fcc,
+ 0x1b1a48,
+ 0xdfe48,
+ 0x16fb87,
+ 0x1c42,
+ 0x3082,
+ 0x3f590,
+ 0x27c2,
+ 0x1ad58f,
+ 0x5d306,
+ 0x77ece,
+ 0xe598b,
+ 0x86ec8,
+ 0xd1a49,
+ 0x17d152,
+ 0x1abecd,
+ 0x55b08,
+ 0x56d49,
+ 0x572cd,
+ 0x57b89,
+ 0x5c58b,
+ 0x5d848,
+ 0x61ac8,
+ 0x628c8,
+ 0x62b49,
+ 0x62d4a,
+ 0x6398c,
+ 0xe3cca,
+ 0xff947,
+ 0x2270d,
+ 0xf4b4b,
+ 0x11a5cc,
+ 0x18b050,
+ 0xc2,
+ 0x7a14d,
+ 0x2dc2,
+ 0x35482,
+ 0xff88a,
+ 0x1081ca,
+ 0x10928b,
+ 0x1ae28c,
+ 0x108c8e,
+ 0x100cd,
+ 0x1b3908,
+ 0x7b02,
+ 0x11b5ec4e,
+ 0x1227020e,
+ 0x12a83a0a,
+ 0x1336864e,
+ 0x13b143ce,
+ 0x1432ee0c,
+ 0x1594ac7,
+ 0x1594ac9,
+ 0x1410843,
+ 0x14b3054c,
+ 0x15333209,
+ 0x15b49dc9,
+ 0x50642,
+ 0x18fb51,
+ 0x70151,
+ 0x8394d,
+ 0x17acd1,
+ 0x114311,
+ 0x12ed4f,
+ 0x13048f,
+ 0x13314c,
+ 0x149d0c,
+ 0x1a688d,
+ 0x1bb815,
+ 0x5064c,
+ 0x11f0cc,
+ 0xe9c50,
+ 0x11d44c,
+ 0x12a54c,
+ 0x15e999,
+ 0x168399,
+ 0x16fd99,
+ 0x175d54,
+ 0x181ad4,
+ 0x19b7d4,
+ 0x19d714,
+ 0x1ac314,
+ 0x16250709,
+ 0x1699ba89,
+ 0x1731f189,
+ 0x11e224c9,
+ 0x50642,
+ 0x126224c9,
+ 0x50642,
+ 0x15e98a,
+ 0x50642,
+ 0x12e224c9,
+ 0x50642,
+ 0x15e98a,
+ 0x50642,
+ 0x136224c9,
+ 0x50642,
+ 0x13e224c9,
+ 0x50642,
+ 0x146224c9,
+ 0x50642,
+ 0x15e98a,
+ 0x50642,
+ 0x14e224c9,
+ 0x50642,
+ 0x15e98a,
+ 0x50642,
+ 0x156224c9,
+ 0x50642,
+ 0x15e224c9,
+ 0x50642,
+ 0x15e98a,
+ 0x50642,
+ 0x166224c9,
+ 0x50642,
+ 0x16e224c9,
+ 0x50642,
+ 0x176224c9,
+ 0x50642,
+ 0x15e98a,
+ 0x50642,
+ 0xaf545,
+ 0x1a5b04,
+ 0x2bb84,
+ 0x1aa404,
+ 0x1a75c4,
+ 0xc484,
+ 0x13fc4,
+ 0x58f44,
+ 0xff384,
+ 0x14ab3c3,
+ 0x143e603,
+ 0xfb244,
+ 0x1547c03,
+ 0x2bb82,
+ 0x100c3,
+ 0x205702,
+ 0x2099c2,
+ 0x2006c2,
+ 0x218342,
+ 0x20d882,
+ 0x200442,
+ 0x203082,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x24a5c3,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x205503,
+ 0x200983,
+ 0x3fc3,
+ 0x2e9dc3,
+ 0x205702,
+ 0x38d2c3,
+ 0x1aea84c3,
+ 0x3b8e47,
+ 0x2e9dc3,
+ 0x206343,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x255cca,
+ 0x264a85,
+ 0x201303,
+ 0x20b0c2,
+ 0x16d208,
+ 0x16d208,
+ 0x99c2,
+ 0x11fd02,
+ 0x6c845,
+ 0x129845,
+ 0x16d208,
+ 0x1b887,
+ 0xa84c3,
+ 0x1ba38e47,
+ 0x13ee06,
+ 0x1bd49c05,
+ 0x11de07,
+ 0x66ca,
+ 0x3748,
+ 0x65c7,
+ 0x56948,
+ 0x28d87,
+ 0x2c6cf,
+ 0x30b87,
+ 0x3b806,
+ 0x117090,
+ 0x12330f,
+ 0x104204,
+ 0x1c11dece,
+ 0xa8b4c,
+ 0x4f14a,
+ 0x9a2c7,
+ 0x112b8a,
+ 0x18f409,
+ 0xbf34a,
+ 0x5414a,
+ 0x104186,
+ 0x9a38a,
+ 0x8350a,
+ 0xe47c9,
+ 0xd5a48,
+ 0xd5d46,
+ 0xd9a8d,
+ 0xb3c45,
+ 0x1a78c7,
+ 0x5d6c7,
+ 0xd9394,
+ 0xf938b,
+ 0x68a0a,
+ 0xa2d0d,
+ 0x1cdc3,
+ 0x1cdc3,
+ 0x1cdc6,
+ 0x1cdc3,
+ 0x18d2c3,
+ 0x16d208,
+ 0x99c2,
+ 0x49944,
+ 0x887c3,
+ 0x173605,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2030c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x294483,
+ 0x25ed03,
+ 0x2030c3,
+ 0x25ef44,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2082c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x218343,
+ 0x2163c3,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x353903,
+ 0x227f83,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x201303,
+ 0x311dc3,
+ 0x1dea84c3,
+ 0x232403,
+ 0x246383,
+ 0x2e9dc3,
+ 0x20a203,
+ 0x227f83,
+ 0x200983,
+ 0x2072c3,
+ 0x33bac4,
+ 0x16d208,
+ 0x1e6a84c3,
+ 0x232403,
+ 0x2a6443,
+ 0x2e9dc3,
+ 0x209703,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x21db03,
+ 0x16d208,
+ 0x1eea84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x204e83,
+ 0x200983,
+ 0x16d208,
+ 0x1594ac7,
+ 0x38d2c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x129845,
+ 0x16fc07,
+ 0xd95cb,
+ 0xd69c4,
+ 0xb3c45,
+ 0x1456108,
+ 0xa6a8d,
+ 0x20284a05,
+ 0x18004,
+ 0x169c3,
+ 0x186345,
+ 0x349a05,
+ 0x16d208,
+ 0x1cdc2,
+ 0x336c3,
+ 0xf1446,
+ 0x319ec8,
+ 0x313bc7,
+ 0x25ef44,
+ 0x3b2c86,
+ 0x3bb6c6,
+ 0x16d208,
+ 0x30ce43,
+ 0x33e589,
+ 0x237295,
+ 0x3729f,
+ 0x2a84c3,
+ 0x31d012,
+ 0xefac6,
+ 0x10a045,
+ 0x26e8a,
+ 0x56b49,
+ 0x31cdcf,
+ 0x2d5f04,
+ 0x20b145,
+ 0x2fa150,
+ 0x3b0887,
+ 0x204e83,
+ 0x28b148,
+ 0x125bc6,
+ 0x2ae1ca,
+ 0x256044,
+ 0x2ec883,
+ 0x264a86,
+ 0x20b0c2,
+ 0x22d54b,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x2f1743,
+ 0x2099c2,
+ 0x2cd83,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x206343,
+ 0x221f03,
+ 0x200983,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x205503,
+ 0x200983,
+ 0x205702,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x9885,
+ 0x25ef44,
+ 0x2a84c3,
+ 0x232403,
+ 0x210444,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x2143c3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x391683,
+ 0x63643,
+ 0x6343,
+ 0x205503,
+ 0x200983,
+ 0x30d44a,
+ 0x32b0c9,
+ 0x346b0b,
+ 0x34708a,
+ 0x34d94a,
+ 0x35d74b,
+ 0x371e0a,
+ 0x37814a,
+ 0x37fc4a,
+ 0x37fecb,
+ 0x39f689,
+ 0x3a140a,
+ 0x3a178b,
+ 0x3acfcb,
+ 0x3b9eca,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x4589,
+ 0x16d208,
+ 0x2a84c3,
+ 0x25cb44,
+ 0x207ac2,
+ 0x211cc4,
+ 0x26fc45,
+ 0x2030c3,
+ 0x25ef44,
+ 0x2a84c3,
+ 0x235ac4,
+ 0x232403,
+ 0x249944,
+ 0x2d5f04,
+ 0x3b1384,
+ 0x227f83,
+ 0x205503,
+ 0x200983,
+ 0x27a305,
+ 0x2082c3,
+ 0x201303,
+ 0x22ed03,
+ 0x250cc4,
+ 0x390fc4,
+ 0x34ae45,
+ 0x16d208,
+ 0x302044,
+ 0x3510c6,
+ 0x276384,
+ 0x2099c2,
+ 0x371007,
+ 0x24c0c7,
+ 0x247784,
+ 0x2555c5,
+ 0x302e85,
+ 0x2a9305,
+ 0x3b1384,
+ 0x3b8ac8,
+ 0x239486,
+ 0x30c188,
+ 0x24ed05,
+ 0x2da905,
+ 0x236b84,
+ 0x200983,
+ 0x2ed844,
+ 0x35c946,
+ 0x264b83,
+ 0x250cc4,
+ 0x256005,
+ 0x32d104,
+ 0x334944,
+ 0x20b0c2,
+ 0x2425c6,
+ 0x3962c6,
+ 0x2fdc05,
+ 0x205702,
+ 0x38d2c3,
+ 0x262099c2,
+ 0x2333c4,
+ 0x20d882,
+ 0x209703,
+ 0x202c82,
+ 0x205503,
+ 0x200442,
+ 0x214843,
+ 0x25ed03,
+ 0x16d208,
+ 0x16d208,
+ 0x2e9dc3,
+ 0x205702,
+ 0x26e099c2,
+ 0x2e9dc3,
+ 0x245b43,
+ 0x353903,
+ 0x327344,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x205702,
+ 0x276099c2,
+ 0x2a84c3,
+ 0x205503,
+ 0x200983,
+ 0x482,
+ 0x20a9c2,
+ 0x212982,
+ 0x206343,
+ 0x2e87c3,
+ 0x205702,
+ 0x129845,
+ 0x16d208,
+ 0x16fc07,
+ 0x2099c2,
+ 0x232403,
+ 0x249944,
+ 0x2032c3,
+ 0x2e9dc3,
+ 0x2143c3,
+ 0x209703,
+ 0x205503,
+ 0x216b03,
+ 0x200983,
+ 0x21da83,
+ 0x118fd3,
+ 0x11c954,
+ 0x16fc07,
+ 0x13b46,
+ 0x53b4b,
+ 0x1cdc6,
+ 0x51b87,
+ 0x11ab09,
+ 0xe6d4a,
+ 0x8850d,
+ 0x1b240c,
+ 0x1ada8a,
+ 0x192345,
+ 0x6708,
+ 0x5d306,
+ 0x125c86,
+ 0x22bb82,
+ 0xff14c,
+ 0x1a5cc7,
+ 0x22e51,
+ 0x2a84c3,
+ 0x568c5,
+ 0x77848,
+ 0x9e04,
+ 0x288347c6,
+ 0x17e86,
+ 0x8cb46,
+ 0x8da0a,
+ 0xac543,
+ 0x28e54b04,
+ 0x11aac5,
+ 0xde283,
+ 0xdc105,
+ 0xd104c,
+ 0xf04c8,
+ 0xb5708,
+ 0x9e009,
+ 0x134b08,
+ 0x141e046,
+ 0xda40a,
+ 0x82b48,
+ 0xf4648,
+ 0xff384,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x205702,
+ 0x2099c2,
+ 0x2e9dc3,
+ 0x202bc2,
+ 0x205503,
+ 0x200983,
+ 0x214843,
+ 0x3653cf,
+ 0x36578e,
+ 0x16d208,
+ 0x2a84c3,
+ 0x42f87,
+ 0x232403,
+ 0x2e9dc3,
+ 0x244183,
+ 0x205503,
+ 0x200983,
+ 0x201bc3,
+ 0x201bc7,
+ 0x200142,
+ 0x32c249,
+ 0x200242,
+ 0x23f88b,
+ 0x297b8a,
+ 0x2a2a49,
+ 0x200882,
+ 0x391206,
+ 0x34ed15,
+ 0x23f9d5,
+ 0x246993,
+ 0x23ff53,
+ 0x202a82,
+ 0x205ac5,
+ 0x3b364c,
+ 0x27160b,
+ 0x2726c5,
+ 0x201702,
+ 0x284202,
+ 0x386fc6,
+ 0x200ec2,
+ 0x3695c6,
+ 0x2d4c4d,
+ 0x27ef4c,
+ 0x224dc4,
+ 0x203dc2,
+ 0x205942,
+ 0x2248c8,
+ 0x202a42,
+ 0x312fc6,
0x2ba844,
- 0x237c4d,
- 0x28c507,
- 0x3268c6,
- 0x2c4a05,
- 0x3645c5,
- 0x375846,
- 0x2d1649,
- 0x2b4287,
- 0x27f886,
- 0x2c9546,
- 0x28ae49,
- 0x264a04,
- 0x2d4a44,
- 0x3ac808,
- 0x245c46,
- 0x277308,
- 0x2e66c8,
- 0x202fc7,
- 0x3a80c9,
- 0x387247,
- 0x2b500a,
- 0x2498cf,
- 0x250b0a,
- 0x233c45,
- 0x27e345,
- 0x218745,
- 0x303b07,
- 0x20e183,
- 0x2cf888,
- 0x3028c6,
- 0x3029c9,
- 0x2d4006,
- 0x3aeb47,
- 0x29e4c9,
- 0x3194c8,
- 0x2cbc87,
- 0x30d803,
- 0x33c705,
- 0x20e105,
- 0x2b8a0b,
- 0x351304,
- 0x257984,
- 0x27cbc6,
- 0x30e887,
- 0x38b10a,
- 0x2757c7,
- 0x38c807,
- 0x283305,
- 0x200045,
- 0x240909,
- 0x38ec86,
- 0x27564d,
- 0x35af05,
- 0x29f4c3,
- 0x20ad83,
- 0x34f785,
- 0x347845,
- 0x255908,
- 0x280047,
- 0x2d47c6,
- 0x2a36c6,
- 0x2296c5,
- 0x231e47,
- 0x202ac7,
- 0x33f1c7,
- 0x2d660a,
- 0x2b4908,
- 0x2b8bc4,
- 0x254907,
- 0x281607,
- 0x3400c6,
- 0x26f8c7,
- 0x2eaa08,
- 0x2e9e88,
- 0x2abd86,
- 0x2d1ec8,
- 0x2008c4,
- 0x22cb46,
- 0x247d86,
- 0x216646,
- 0x3a8c46,
- 0x22d9c4,
- 0x255c06,
- 0x2c31c6,
- 0x29d406,
- 0x235ec6,
- 0x20ac46,
- 0x2ea846,
- 0x2d46c8,
- 0x3af1c8,
- 0x2d6e48,
- 0x25b448,
- 0x37f506,
- 0x212485,
- 0x2e2006,
- 0x2b2105,
- 0x388c87,
- 0x216605,
- 0x2136c3,
- 0x203ec5,
- 0x33fb44,
- 0x20ad85,
- 0x2266c3,
- 0x338007,
- 0x34bc88,
- 0x351c06,
- 0x32250d,
- 0x27e306,
- 0x29c985,
- 0x2d9743,
- 0x2be689,
- 0x264b86,
- 0x23c0c6,
- 0x2a4ec4,
- 0x250a87,
- 0x233006,
- 0x2b4545,
- 0x234a83,
- 0x207ac4,
- 0x2817c6,
- 0x2ded04,
- 0x32b8c8,
- 0x39ba49,
- 0x24d849,
- 0x2a4cca,
- 0x387acd,
- 0x208d07,
- 0x224bc6,
- 0x20a684,
- 0x28b309,
- 0x28a088,
- 0x28c106,
- 0x23dfc6,
- 0x26f8c7,
- 0x2b9a46,
- 0x21f706,
- 0x3ac246,
- 0x3a110a,
- 0x219b08,
- 0x2464c5,
- 0x26fd09,
- 0x28568a,
- 0x2fa988,
- 0x2a0ec8,
- 0x29bd48,
- 0x2af08c,
- 0x316305,
- 0x2a3948,
- 0x2e8e06,
- 0x319746,
- 0x3aea07,
- 0x2756c5,
- 0x287645,
- 0x24d709,
- 0x213487,
- 0x302985,
- 0x227487,
- 0x20ad83,
- 0x2c8485,
- 0x20b8c8,
- 0x25d647,
- 0x2a0d89,
- 0x2de405,
- 0x307784,
- 0x2a6508,
- 0x363207,
- 0x2cbe48,
- 0x368c48,
- 0x2dc805,
- 0x304286,
- 0x278686,
- 0x2ac1c9,
- 0x31c407,
- 0x2b29c6,
- 0x3b3907,
- 0x221d03,
- 0x247ac4,
- 0x2a7885,
- 0x231f84,
- 0x383c84,
- 0x286947,
- 0x35bdc7,
- 0x27fa44,
- 0x2a0bd0,
- 0x367c87,
- 0x200045,
- 0x2536cc,
- 0x225344,
- 0x2b1588,
- 0x227b89,
- 0x2b4e06,
- 0x220d88,
- 0x247344,
- 0x247348,
- 0x22ec86,
- 0x235d48,
- 0x2a1c06,
- 0x2d328b,
- 0x202385,
- 0x2cb988,
- 0x216ac4,
- 0x39be8a,
- 0x2a0d89,
- 0x381346,
- 0x218808,
- 0x25ebc5,
- 0x2b69c4,
- 0x2b1486,
- 0x33f088,
- 0x285b88,
- 0x340bc6,
- 0x31d104,
- 0x23cac6,
- 0x3872c7,
- 0x27db47,
- 0x26f8cf,
- 0x205547,
- 0x362647,
- 0x38eb45,
- 0x352245,
- 0x2a52c9,
- 0x30e1c6,
- 0x284045,
- 0x2871c7,
- 0x2c1108,
- 0x29d505,
- 0x272b06,
- 0x222688,
- 0x224f0a,
- 0x2e13c8,
- 0x28f187,
- 0x249d06,
- 0x26fcc6,
- 0x20df43,
- 0x218303,
- 0x285849,
- 0x377e09,
- 0x2b0586,
- 0x2de405,
- 0x2163c8,
- 0x218808,
- 0x354dc8,
- 0x3ac2cb,
- 0x322747,
- 0x30b249,
- 0x26fb48,
- 0x335844,
- 0x349588,
- 0x291409,
- 0x2b2cc5,
- 0x303a07,
- 0x247b45,
- 0x285a88,
- 0x293e8b,
- 0x29b550,
- 0x2ae605,
- 0x216a0c,
- 0x2d4985,
- 0x283383,
- 0x29f386,
- 0x2c0984,
- 0x203cc6,
- 0x2a1647,
- 0x222704,
- 0x24b388,
- 0x2cf74d,
- 0x35e245,
- 0x208d44,
- 0x233984,
- 0x287bc9,
- 0x2990c8,
- 0x317647,
- 0x22ed08,
- 0x2862c8,
- 0x27fb85,
- 0x20f747,
- 0x27fb07,
- 0x238287,
- 0x270f49,
- 0x232e89,
- 0x242d86,
- 0x2bf606,
- 0x26fb06,
- 0x289845,
- 0x39b744,
- 0x3b0e86,
- 0x3b5306,
- 0x27fbc8,
- 0x2d600b,
- 0x26de87,
- 0x20a684,
- 0x364a46,
- 0x367a47,
- 0x34f0c5,
- 0x263645,
- 0x212dc4,
- 0x232e06,
- 0x3b0f08,
- 0x28b309,
- 0x252f86,
- 0x289a48,
- 0x2b4606,
- 0x342708,
- 0x34c34c,
- 0x27fa46,
- 0x29c64d,
- 0x29cacb,
- 0x253145,
- 0x202c07,
- 0x200946,
- 0x3343c8,
- 0x242e09,
- 0x393c88,
- 0x200045,
- 0x2e2a87,
- 0x284b88,
- 0x358649,
- 0x344106,
- 0x252e8a,
- 0x334148,
- 0x393acb,
- 0x3298cc,
- 0x247448,
- 0x280e46,
- 0x303d08,
- 0x3a8347,
- 0x363489,
- 0x29304d,
- 0x29f986,
- 0x21e608,
- 0x3af089,
- 0x2bfd08,
- 0x2886c8,
- 0x2c3a0c,
- 0x2c5047,
- 0x2c5507,
- 0x270d85,
- 0x31e5c7,
- 0x2c0fc8,
- 0x2b1506,
- 0x2aaccc,
- 0x2f55c8,
- 0x2d0d88,
- 0x2ba286,
- 0x20de87,
- 0x242f84,
- 0x25b448,
- 0x28f50c,
- 0x353d0c,
- 0x233cc5,
- 0x2d2887,
- 0x31d086,
- 0x20de06,
- 0x349ac8,
- 0x2027c4,
- 0x22d04b,
- 0x27e8cb,
- 0x249d06,
- 0x2cf5c7,
- 0x31a2c5,
- 0x276545,
- 0x22d186,
- 0x25eb85,
- 0x3512c5,
- 0x2cd5c7,
- 0x27d1c9,
- 0x351904,
- 0x34ee05,
- 0x2e6fc5,
- 0x2dea88,
- 0x2287c5,
- 0x2bca49,
- 0x37aac7,
- 0x37aacb,
- 0x244806,
- 0x2d4409,
- 0x349208,
- 0x27c385,
- 0x238388,
- 0x232ec8,
- 0x23a6c7,
- 0x2e2f87,
- 0x2869c9,
- 0x235c87,
- 0x289149,
- 0x2acf8c,
- 0x2b0588,
- 0x2b6189,
- 0x321f87,
- 0x286389,
- 0x35bf07,
- 0x3299c8,
- 0x3a8285,
- 0x22cac6,
- 0x2c4a48,
- 0x2f0fc8,
- 0x285549,
- 0x351307,
- 0x276605,
- 0x36b6c9,
- 0x2b9ec6,
- 0x2323c4,
- 0x2323c6,
- 0x24e8c8,
- 0x252847,
- 0x2d6208,
- 0x2d1f89,
- 0x3a1e07,
- 0x2a29c6,
- 0x202cc4,
- 0x203f49,
- 0x20f5c8,
- 0x2ba147,
- 0x343e06,
- 0x20e1c6,
- 0x3a8484,
- 0x247f86,
- 0x201b83,
- 0x296789,
- 0x202346,
- 0x2d2205,
- 0x2a36c6,
- 0x24f305,
- 0x285008,
- 0x247187,
- 0x244b46,
- 0x39c6c6,
- 0x309148,
- 0x2a5447,
- 0x29f9c5,
- 0x2a09c8,
- 0x3ada88,
- 0x334148,
- 0x2d4845,
- 0x22cb46,
- 0x24d609,
- 0x2ac044,
- 0x24f18b,
- 0x21f40b,
- 0x2463c9,
- 0x20ad83,
- 0x25bf05,
- 0x213a86,
- 0x313788,
- 0x249844,
- 0x351c06,
- 0x2d6749,
- 0x2bc545,
- 0x2cd506,
- 0x363206,
- 0x2163c4,
- 0x2aec0a,
- 0x2d2148,
- 0x2f0fc6,
- 0x2c2585,
- 0x3b1987,
- 0x231147,
- 0x304284,
- 0x21f647,
- 0x2165c4,
- 0x2165c6,
- 0x203c83,
- 0x270f45,
- 0x350e85,
- 0x205788,
- 0x254ac5,
- 0x27f789,
- 0x25b287,
- 0x25b28b,
- 0x2a758c,
- 0x2a810a,
- 0x3363c7,
- 0x204083,
- 0x212188,
- 0x2d4a05,
- 0x29d585,
- 0x20ae44,
- 0x3298c6,
- 0x227b86,
- 0x247fc7,
- 0x2349cb,
- 0x22d9c4,
- 0x2e8f04,
- 0x219e04,
- 0x2cd786,
- 0x222704,
- 0x22c948,
- 0x33c5c5,
- 0x244d85,
- 0x354d07,
- 0x202d09,
- 0x347845,
- 0x37584a,
- 0x277789,
- 0x29810a,
- 0x3a1249,
- 0x335fc4,
- 0x2c9605,
- 0x2b9b48,
- 0x2d18cb,
- 0x278285,
- 0x2f0086,
- 0x2200c4,
- 0x27fcc6,
- 0x3a1c89,
- 0x364b07,
- 0x317988,
- 0x387e46,
- 0x387247,
- 0x285b88,
- 0x380946,
- 0x37f0c4,
- 0x363f87,
- 0x366085,
- 0x377547,
- 0x25b4c4,
- 0x2008c6,
- 0x2f1e08,
- 0x29cc88,
- 0x2e88c7,
- 0x27d548,
- 0x29ae05,
- 0x20abc4,
- 0x361c88,
- 0x27d644,
- 0x2186c5,
- 0x2fac44,
- 0x3675c7,
- 0x28d207,
- 0x2864c8,
- 0x2cbfc6,
- 0x254a45,
- 0x27f588,
- 0x2e15c8,
- 0x2a4c09,
- 0x21f706,
- 0x22e708,
- 0x39bd0a,
- 0x34f148,
- 0x2e8605,
- 0x2e2206,
- 0x277648,
- 0x2e2b4a,
- 0x20b387,
- 0x28a645,
- 0x298888,
- 0x2b3c44,
- 0x272206,
- 0x2c5888,
- 0x20ac46,
- 0x239a88,
- 0x29bfc7,
- 0x209806,
- 0x2ba844,
- 0x28ba07,
- 0x2b6804,
- 0x3a1c47,
- 0x23bf0d,
+ 0x34eed5,
+ 0x246b13,
+ 0x210783,
+ 0x32fa0a,
+ 0x3bb147,
+ 0x3094c9,
+ 0x37b887,
+ 0x30f242,
+ 0x200002,
+ 0x3aef06,
+ 0x20cb42,
+ 0x16d208,
+ 0x2105c2,
+ 0x20b382,
+ 0x274e87,
+ 0x20f687,
0x21b585,
- 0x2d144b,
- 0x2a1d06,
- 0x255788,
- 0x24b344,
- 0x27bc86,
- 0x2817c6,
- 0x304047,
- 0x29c30d,
- 0x226dc7,
- 0x2b6d48,
- 0x271a05,
- 0x27f048,
- 0x2c7ec6,
- 0x29ae88,
- 0x223a06,
- 0x26a9c7,
- 0x336689,
- 0x33d2c7,
- 0x28c3c8,
- 0x279685,
- 0x21c848,
- 0x20dd45,
- 0x396005,
- 0x3a14c5,
- 0x221443,
- 0x235984,
- 0x26fd05,
- 0x2346c9,
- 0x285f86,
- 0x2eab08,
- 0x2e2d45,
- 0x2b8847,
- 0x2aee8a,
- 0x2cd449,
- 0x2c98ca,
- 0x2d6ec8,
- 0x2272cc,
- 0x28724d,
- 0x2ff683,
- 0x239988,
- 0x207a85,
- 0x224cc6,
- 0x319346,
- 0x2e7f05,
- 0x3b3a09,
- 0x358f45,
- 0x27f588,
- 0x2841c6,
- 0x348806,
- 0x2a63c9,
- 0x38f247,
- 0x294146,
- 0x2aee08,
- 0x216548,
- 0x2e0dc7,
- 0x235ece,
- 0x2c8105,
- 0x358545,
- 0x20ab48,
- 0x27f3c7,
- 0x20e202,
- 0x2c3584,
- 0x203bca,
- 0x2ba208,
- 0x367b46,
- 0x29e608,
- 0x278686,
- 0x31a7c8,
- 0x2b29c8,
- 0x395fc4,
- 0x2b8d85,
- 0x68a8c4,
- 0x68a8c4,
- 0x68a8c4,
- 0x202403,
- 0x20e046,
- 0x27fa46,
- 0x2a220c,
- 0x209843,
- 0x285686,
- 0x215344,
- 0x264b08,
- 0x2d6585,
- 0x203cc6,
- 0x2bedc8,
- 0x2d8206,
- 0x244ac6,
- 0x381148,
- 0x2a7907,
- 0x235a49,
- 0x2d4bca,
- 0x208a84,
- 0x216605,
- 0x2a70c5,
- 0x264886,
- 0x208d46,
- 0x2a2dc6,
- 0x2f9ec6,
- 0x235b84,
- 0x235b8b,
- 0x231144,
- 0x2a23c5,
- 0x2b19c5,
- 0x203086,
- 0x3b5548,
- 0x287107,
- 0x317744,
- 0x2453c3,
- 0x2b3745,
- 0x30a847,
- 0x28700b,
- 0x205687,
- 0x2becc8,
- 0x2e8b47,
- 0x231646,
- 0x24d1c8,
- 0x2e318b,
- 0x2067c6,
- 0x213bc9,
- 0x2e3305,
- 0x30d803,
- 0x2cd506,
- 0x29bec8,
- 0x214cc3,
- 0x200a03,
- 0x285b86,
- 0x278686,
- 0x375dca,
- 0x280e85,
- 0x28160b,
- 0x2a360b,
- 0x245103,
- 0x202043,
- 0x2b4f84,
- 0x278447,
- 0x247444,
- 0x202ec4,
- 0x2e8c84,
- 0x34f448,
- 0x2c24c8,
- 0x3b2049,
- 0x38e748,
- 0x200c07,
- 0x235ec6,
- 0x2ea74f,
- 0x2c8246,
- 0x2d6504,
- 0x2c230a,
- 0x30a747,
- 0x208386,
- 0x292e89,
- 0x3b1fc5,
- 0x2058c5,
- 0x3b2106,
- 0x21c983,
- 0x2b3c89,
- 0x219c86,
- 0x212009,
- 0x38b106,
- 0x270f45,
- 0x2340c5,
- 0x205543,
- 0x278588,
- 0x211607,
- 0x3028c4,
- 0x264988,
- 0x2313c4,
- 0x338d86,
- 0x29f386,
- 0x2419c6,
- 0x2cb849,
- 0x29d505,
- 0x38ec86,
- 0x2a2fc9,
- 0x2c7606,
- 0x2ea846,
- 0x386e86,
- 0x200b45,
- 0x2fac46,
- 0x26a9c4,
- 0x3a8285,
- 0x2c4a44,
- 0x2b7846,
- 0x35aec4,
- 0x20f843,
- 0x28a145,
- 0x232bc8,
- 0x2e9687,
- 0x2bd949,
- 0x28a548,
- 0x29dc51,
- 0x36328a,
- 0x249c47,
- 0x2ea1c6,
- 0x215344,
- 0x2c4b48,
- 0x282f48,
- 0x29de0a,
- 0x2bc80d,
- 0x2a4dc6,
- 0x381246,
- 0x28bac6,
- 0x2c3fc7,
- 0x2b6e05,
- 0x262c07,
- 0x264a45,
- 0x37ac04,
- 0x2ad586,
- 0x216287,
- 0x2b398d,
+ 0x201c02,
+ 0x21da47,
+ 0x21dc08,
+ 0x242b42,
+ 0x2bf3c2,
+ 0x22e802,
+ 0x201ec2,
+ 0x237b88,
+ 0x201ec3,
+ 0x2b5308,
+ 0x2cf1cd,
+ 0x213c03,
+ 0x327988,
+ 0x239f8f,
+ 0x23a34e,
+ 0x25edca,
+ 0x229751,
+ 0x229bd0,
+ 0x2bcdcd,
+ 0x2bd10c,
+ 0x311c47,
+ 0x32fb87,
+ 0x3b2d49,
+ 0x224ec2,
+ 0x206c02,
+ 0x25340c,
+ 0x25370b,
+ 0x204142,
+ 0x2ab046,
+ 0x21a1c2,
+ 0x209882,
+ 0x21b102,
+ 0x2099c2,
+ 0x383a84,
+ 0x238bc7,
+ 0x204682,
+ 0x23d147,
+ 0x23e487,
+ 0x20e142,
+ 0x2301c2,
+ 0x242e45,
+ 0x205742,
+ 0x362e0e,
+ 0x2ebb8d,
+ 0x232403,
+ 0x2be90e,
+ 0x2e064d,
+ 0x37eac3,
+ 0x200e02,
+ 0x21fec4,
+ 0x2454c2,
+ 0x2175c2,
+ 0x358e45,
+ 0x364b47,
+ 0x383382,
+ 0x218342,
+ 0x249547,
+ 0x24d288,
+ 0x248902,
+ 0x2aeac6,
+ 0x25328c,
+ 0x2535cb,
+ 0x20fc82,
+ 0x25924f,
+ 0x259610,
+ 0x259a0f,
+ 0x259dd5,
+ 0x25a314,
+ 0x25a80e,
+ 0x25ab8e,
+ 0x25af0f,
+ 0x25b2ce,
+ 0x25b654,
+ 0x25bb53,
+ 0x25c00d,
+ 0x272a89,
+ 0x2895c3,
+ 0x200782,
+ 0x22b0c5,
+ 0x207f86,
+ 0x20d882,
+ 0x21f507,
+ 0x2e9dc3,
+ 0x205e82,
+ 0x362a08,
+ 0x229991,
+ 0x229dd0,
+ 0x206482,
+ 0x288d87,
+ 0x203942,
+ 0x214607,
+ 0x20be02,
+ 0x319cc9,
+ 0x386f87,
+ 0x27aac8,
+ 0x234606,
+ 0x2e86c3,
+ 0x32a105,
+ 0x232682,
+ 0x202082,
+ 0x3af305,
+ 0x380685,
+ 0x2040c2,
+ 0x24c543,
+ 0x32d187,
+ 0x223787,
+ 0x200502,
+ 0x254684,
+ 0x223b83,
+ 0x223b89,
+ 0x22c548,
+ 0x200282,
+ 0x204bc2,
+ 0x3105c7,
+ 0x31ff05,
+ 0x2a5348,
+ 0x219947,
+ 0x200e83,
+ 0x28c446,
+ 0x2bcc4d,
+ 0x2bcfcc,
+ 0x2b45c6,
+ 0x208d02,
+ 0x2a8542,
+ 0x202342,
+ 0x239e0f,
+ 0x23a20e,
+ 0x302f07,
+ 0x203d02,
+ 0x2bf745,
+ 0x2bf746,
+ 0x20f242,
+ 0x20ec42,
+ 0x221f06,
+ 0x214543,
+ 0x214546,
+ 0x2c6985,
+ 0x2c698d,
+ 0x2c6f55,
+ 0x2c814c,
+ 0x2c95cd,
+ 0x2c9992,
+ 0x20e602,
+ 0x2675c2,
+ 0x202d02,
+ 0x240806,
+ 0x2f7f86,
+ 0x2033c2,
+ 0x208006,
+ 0x2023c2,
+ 0x38b785,
+ 0x200542,
+ 0x2ebc89,
+ 0x31554c,
+ 0x31588b,
+ 0x200442,
+ 0x24e748,
+ 0x203b02,
+ 0x2056c2,
+ 0x26a346,
+ 0x222445,
+ 0x226747,
+ 0x257d85,
+ 0x29e405,
+ 0x243002,
+ 0x2067c2,
+ 0x2013c2,
+ 0x2df507,
+ 0x380c0d,
+ 0x380f8c,
+ 0x22f087,
+ 0x20f982,
+ 0x2069c2,
+ 0x241248,
+ 0x31e488,
+ 0x2e3988,
+ 0x308484,
+ 0x2ab407,
+ 0x2e90c3,
+ 0x228ec2,
+ 0x2082c2,
+ 0x2eb3c9,
+ 0x3a40c7,
+ 0x201302,
+ 0x26a745,
+ 0x22d4c2,
+ 0x21aa02,
+ 0x2f9f03,
+ 0x2f9f06,
+ 0x2f1742,
+ 0x2f23c2,
+ 0x201a42,
+ 0x202f86,
+ 0x21fe07,
+ 0x213bc2,
+ 0x205ec2,
+ 0x2b514f,
+ 0x2be74d,
+ 0x3872ce,
+ 0x2e04cc,
+ 0x2009c2,
+ 0x207302,
+ 0x234445,
+ 0x30ba46,
+ 0x2018c2,
+ 0x202482,
+ 0x200482,
+ 0x2198c4,
+ 0x2cf044,
+ 0x2d0e86,
+ 0x203082,
+ 0x36cac7,
+ 0x203083,
+ 0x285d48,
+ 0x34e488,
+ 0x239887,
+ 0x240706,
+ 0x203902,
+ 0x234b03,
+ 0x234b07,
+ 0x273946,
+ 0x2dee45,
+ 0x308808,
+ 0x200d02,
+ 0x331207,
+ 0x222702,
+ 0x361782,
+ 0x20cfc2,
+ 0x2c6749,
+ 0x230982,
+ 0x200842,
+ 0x22f303,
+ 0x331c87,
+ 0x2002c2,
+ 0x3156cc,
+ 0x3159cb,
+ 0x2b4646,
+ 0x2de1c5,
+ 0x221c82,
+ 0x203b42,
+ 0x2b7bc6,
+ 0x260dc3,
+ 0x38c187,
+ 0x236102,
+ 0x201442,
+ 0x34eb95,
+ 0x23fb95,
+ 0x246853,
+ 0x2400d3,
+ 0x2585c7,
+ 0x271a48,
+ 0x271a50,
+ 0x28d2cf,
+ 0x297953,
+ 0x2a2812,
+ 0x32be10,
+ 0x2d544f,
+ 0x35f7d2,
+ 0x30c3d1,
+ 0x2b7613,
+ 0x2c6512,
+ 0x2cff4f,
+ 0x2d2e8e,
+ 0x2d3f52,
+ 0x2d71d1,
+ 0x2d7c8f,
+ 0x30440e,
+ 0x2f0691,
+ 0x2f17d0,
+ 0x2f2752,
+ 0x2fc711,
+ 0x364586,
+ 0x36d3c7,
+ 0x372187,
+ 0x203142,
+ 0x27d8c5,
+ 0x3933c7,
+ 0x212982,
+ 0x209942,
+ 0x228a85,
+ 0x21e743,
+ 0x34b0c6,
+ 0x380dcd,
+ 0x38110c,
+ 0x201682,
+ 0x3b34cb,
+ 0x2714ca,
+ 0x20598a,
+ 0x2b6449,
+ 0x2ea64b,
+ 0x219a8d,
+ 0x2fa5cc,
+ 0x25180a,
+ 0x22090c,
+ 0x26908b,
+ 0x27250c,
+ 0x29474b,
+ 0x3154c3,
+ 0x36cfc6,
+ 0x3a98c2,
+ 0x2f4542,
+ 0x20a743,
+ 0x208602,
+ 0x21fe83,
+ 0x2366c6,
+ 0x259f87,
+ 0x2c7fc6,
+ 0x39e4c8,
+ 0x31e188,
+ 0x2ce146,
+ 0x201f82,
+ 0x2fd5cd,
+ 0x2fd90c,
+ 0x2d5fc7,
+ 0x301f07,
+ 0x213b82,
+ 0x201502,
+ 0x234a82,
+ 0x24d642,
+ 0x2099c2,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x214843,
+ 0x205702,
+ 0x2021c2,
+ 0x2ae8fdc5,
+ 0x2b247e45,
+ 0x2b717806,
+ 0x16d208,
+ 0x2baaee05,
+ 0x2099c2,
+ 0x2006c2,
+ 0x2bfb3ac5,
+ 0x2c27bdc5,
+ 0x2c67c9c7,
+ 0x2ca86a09,
+ 0x2ce3bc44,
+ 0x20d882,
+ 0x205e82,
+ 0x2d24b5c5,
+ 0x2d68f849,
+ 0x2db1db88,
+ 0x2deab805,
+ 0x2e300187,
+ 0x2e61ed48,
+ 0x2eae5d85,
+ 0x2ee00106,
+ 0x2f337809,
+ 0x2f6b5a48,
+ 0x2fac0488,
+ 0x2fe9704a,
+ 0x302732c4,
+ 0x306d13c5,
+ 0x30abc9c8,
+ 0x30e03a85,
+ 0x20cec2,
+ 0x31248a43,
+ 0x316a1686,
+ 0x31b60148,
+ 0x31eb94c6,
+ 0x32281f08,
+ 0x32719606,
+ 0x32adef04,
+ 0x200c82,
+ 0x32f2cb87,
+ 0x332a75c4,
+ 0x336756c7,
+ 0x33ba2987,
+ 0x200442,
+ 0x33e9b0c5,
+ 0x34334f84,
+ 0x346cd907,
+ 0x34a5f187,
+ 0x34e80886,
+ 0x3527c585,
+ 0x356959c7,
+ 0x35ad0b48,
+ 0x35e2b447,
+ 0x363164c9,
+ 0x36793105,
+ 0x36b31dc7,
+ 0x36e8f546,
+ 0x37391408,
+ 0x2273cd,
+ 0x279909,
+ 0x28174b,
+ 0x2a4b0b,
+ 0x34058b,
+ 0x2ffe8b,
+ 0x30bc4b,
+ 0x30bf0b,
+ 0x30c809,
+ 0x30d6cb,
+ 0x30d98b,
+ 0x30e48b,
+ 0x30f5ca,
+ 0x30fb0a,
+ 0x31010c,
+ 0x314d8b,
+ 0x31670a,
+ 0x32904a,
+ 0x33404e,
+ 0x33568e,
+ 0x335a0a,
+ 0x33808a,
+ 0x338dcb,
+ 0x33908b,
+ 0x339e8b,
+ 0x354ecb,
+ 0x3554ca,
+ 0x35618b,
+ 0x35644a,
+ 0x3566ca,
+ 0x35694a,
+ 0x372b0b,
+ 0x37914b,
+ 0x37c74e,
+ 0x37cacb,
+ 0x38454b,
+ 0x385acb,
+ 0x38900a,
+ 0x389289,
+ 0x3894ca,
+ 0x38a94a,
+ 0x3a00cb,
+ 0x3a1a4b,
+ 0x3a22ca,
+ 0x3a48cb,
+ 0x3a8c4b,
+ 0x3b990b,
+ 0x3767e648,
+ 0x37a87c89,
+ 0x37e9de89,
+ 0x382dacc8,
+ 0x342505,
+ 0x217083,
+ 0x21c6c4,
+ 0x220005,
+ 0x23b986,
+ 0x25da05,
+ 0x2864c4,
+ 0x21f408,
+ 0x308005,
+ 0x291784,
+ 0x203447,
+ 0x29cf8a,
+ 0x3712ca,
+ 0x338547,
+ 0x3af9c7,
+ 0x2f8f07,
+ 0x264e87,
+ 0x2f60c5,
+ 0x33bb86,
+ 0x2bb847,
+ 0x2b4904,
+ 0x2e4646,
+ 0x2e4546,
+ 0x3b9585,
+ 0x26d1c4,
+ 0x3519c6,
+ 0x29bf47,
+ 0x285746,
+ 0x2e3247,
+ 0x25e443,
+ 0x2b1c06,
+ 0x2328c5,
+ 0x27cac7,
+ 0x2641ca,
+ 0x260e44,
+ 0x217c08,
+ 0x2abd89,
+ 0x2cd247,
+ 0x336286,
+ 0x24e9c8,
+ 0x2b9c09,
+ 0x309684,
+ 0x366944,
+ 0x244245,
+ 0x2bb548,
+ 0x2c4b07,
+ 0x2a9709,
+ 0x364688,
+ 0x345e86,
+ 0x3204c6,
+ 0x298048,
+ 0x359646,
+ 0x247e45,
+ 0x280946,
+ 0x275ec8,
+ 0x24da46,
+ 0x2525cb,
+ 0x298646,
+ 0x29994d,
+ 0x3a6005,
+ 0x2a7486,
+ 0x208b45,
+ 0x2f9bc9,
+ 0x2f9a87,
+ 0x37a208,
+ 0x266986,
+ 0x298bc9,
+ 0x3793c6,
+ 0x264145,
+ 0x268686,
+ 0x2cae46,
+ 0x2cb3c9,
+ 0x3530c6,
+ 0x339487,
+ 0x26ad85,
+ 0x202ac3,
+ 0x252745,
+ 0x299c07,
+ 0x33c6c6,
+ 0x3a5f09,
+ 0x317806,
+ 0x280b86,
+ 0x210c49,
+ 0x280349,
+ 0x29fc07,
+ 0x282f88,
+ 0x28c989,
+ 0x27d548,
+ 0x378386,
+ 0x2d5805,
+ 0x2418ca,
+ 0x280c06,
+ 0x3b7986,
+ 0x2c8985,
+ 0x265808,
+ 0x223307,
+ 0x22f50a,
+ 0x249e46,
+ 0x279d45,
+ 0x37aa46,
+ 0x21ac47,
+ 0x336147,
+ 0x21bbc5,
+ 0x264305,
+ 0x357dc6,
+ 0x2ac5c6,
+ 0x34dc06,
+ 0x2b3204,
+ 0x27f689,
+ 0x288b46,
+ 0x2dd38a,
+ 0x21b388,
+ 0x3078c8,
+ 0x3712ca,
+ 0x20b445,
+ 0x29be85,
+ 0x350b88,
+ 0x2b2c88,
+ 0x27b5c7,
+ 0x258946,
+ 0x322388,
+ 0x2fdec7,
+ 0x27dc48,
+ 0x2b3846,
+ 0x281408,
+ 0x294f06,
+ 0x24ee87,
+ 0x299ec6,
+ 0x3519c6,
+ 0x3778ca,
+ 0x2bd8c6,
+ 0x2d5809,
+ 0x26dbc6,
+ 0x2af14a,
+ 0x2def09,
+ 0x2fb486,
+ 0x2b4b04,
+ 0x22b18d,
+ 0x287f07,
+ 0x326cc6,
+ 0x2c0345,
+ 0x379445,
+ 0x374246,
+ 0x2cd749,
+ 0x2b1647,
+ 0x277306,
+ 0x2cc246,
+ 0x286549,
+ 0x247d84,
+ 0x3482c4,
+ 0x352cc8,
+ 0x236a86,
+ 0x26a808,
+ 0x2e41c8,
+ 0x312747,
+ 0x3b7549,
+ 0x34de07,
+ 0x2aecca,
+ 0x2e1f8f,
+ 0x23188a,
+ 0x234245,
+ 0x276105,
+ 0x216e85,
+ 0x2ba787,
+ 0x21a803,
+ 0x283188,
+ 0x396786,
+ 0x396889,
+ 0x2b87c6,
+ 0x3b5207,
+ 0x298989,
+ 0x37a108,
+ 0x2c8a47,
+ 0x30a343,
+ 0x342585,
+ 0x21a785,
+ 0x2b304b,
+ 0x203b44,
+ 0x2c2084,
+ 0x274646,
+ 0x30abc7,
+ 0x382bca,
+ 0x248ac7,
+ 0x311e87,
+ 0x27bdc5,
+ 0x200645,
+ 0x2eef89,
+ 0x3519c6,
+ 0x24894d,
+ 0x353305,
+ 0x2b1383,
+ 0x205043,
+ 0x26f685,
+ 0x345c45,
+ 0x24e9c8,
+ 0x2790c7,
+ 0x348046,
+ 0x29db06,
+ 0x229105,
+ 0x2326c7,
+ 0x312247,
+ 0x239347,
+ 0x2d144a,
+ 0x2b1cc8,
+ 0x2b3204,
+ 0x24d7c7,
+ 0x27acc7,
+ 0x339306,
+ 0x262107,
+ 0x2dc4c8,
+ 0x2e6f08,
+ 0x268506,
+ 0x303008,
+ 0x2c87c4,
+ 0x2bb846,
+ 0x2353c6,
+ 0x33bfc6,
+ 0x2ba986,
+ 0x286004,
+ 0x264f46,
+ 0x2bf5c6,
+ 0x297546,
+ 0x247846,
+ 0x204f06,
+ 0x26e2c6,
+ 0x347f48,
+ 0x2b0748,
+ 0x2d1c88,
+ 0x25dc08,
+ 0x350b06,
+ 0x20dcc5,
+ 0x315ec6,
+ 0x2ab885,
+ 0x388447,
+ 0x215305,
+ 0x2125c3,
+ 0x211585,
+ 0x344cc4,
+ 0x205045,
+ 0x203b03,
+ 0x33a447,
+ 0x354648,
+ 0x2e3306,
+ 0x2c218d,
+ 0x2760c6,
+ 0x296ac5,
+ 0x2b7843,
+ 0x2bc389,
+ 0x247f06,
+ 0x28e7c6,
+ 0x29f4c4,
+ 0x231807,
+ 0x233606,
+ 0x2b1905,
+ 0x203cc3,
+ 0x3abd84,
+ 0x27ae86,
+ 0x2354c4,
+ 0x2da048,
+ 0x38ba89,
+ 0x215589,
+ 0x29f2ca,
+ 0x2a070d,
+ 0x313447,
+ 0x2b9186,
+ 0x206804,
+ 0x286a09,
+ 0x284688,
+ 0x287b06,
+ 0x33f286,
+ 0x262107,
+ 0x2b6b46,
+ 0x226346,
+ 0x26d606,
+ 0x3a2a0a,
+ 0x21ed48,
+ 0x2bacc5,
+ 0x262549,
+ 0x27e14a,
+ 0x2f5d08,
+ 0x29b908,
+ 0x295f08,
+ 0x2a7acc,
+ 0x30e705,
+ 0x29dd88,
+ 0x2e6586,
+ 0x37a386,
+ 0x3b50c7,
+ 0x2489c5,
+ 0x280ac5,
+ 0x215449,
+ 0x20e247,
+ 0x396845,
+ 0x227887,
+ 0x205043,
+ 0x2c5045,
+ 0x20ef48,
+ 0x252ac7,
+ 0x29b7c9,
+ 0x2d7985,
+ 0x2fa984,
+ 0x2a03c8,
+ 0x32ccc7,
+ 0x2c8c08,
+ 0x38d688,
+ 0x354b05,
+ 0x3a3946,
+ 0x278cc6,
+ 0x244609,
+ 0x2b01c7,
+ 0x2ac006,
+ 0x313787,
+ 0x210103,
+ 0x23bc44,
+ 0x2a1785,
+ 0x232804,
+ 0x3833c4,
+ 0x27fdc7,
+ 0x26c147,
+ 0x22e704,
+ 0x29b610,
+ 0x3b3c47,
+ 0x200645,
+ 0x24c20c,
+ 0x20a8c4,
+ 0x2c1488,
+ 0x24ed89,
+ 0x35acc6,
+ 0x334c48,
+ 0x215244,
+ 0x36c4c8,
+ 0x22fb06,
+ 0x2accc8,
+ 0x29c506,
+ 0x2bec0b,
+ 0x202ac5,
+ 0x2c8748,
+ 0x215ac4,
+ 0x38beca,
+ 0x29b7c9,
+ 0x245f06,
+ 0x216f48,
+ 0x256385,
+ 0x2b0f44,
+ 0x2c1386,
+ 0x239208,
+ 0x27e648,
+ 0x322c06,
+ 0x3a9ec4,
+ 0x241846,
+ 0x34de87,
+ 0x2755c7,
+ 0x26210f,
+ 0x207347,
+ 0x2fb547,
+ 0x3709c5,
+ 0x353e05,
+ 0x29f8c9,
+ 0x2dd046,
+ 0x27cc05,
+ 0x280647,
+ 0x2e0bc8,
+ 0x297645,
+ 0x299ec6,
+ 0x21b1c8,
+ 0x2b94ca,
+ 0x2db4c8,
+ 0x28ac87,
+ 0x2e23c6,
+ 0x262506,
+ 0x21a5c3,
+ 0x216a43,
+ 0x27e309,
+ 0x28c809,
+ 0x2c1286,
+ 0x2d7985,
+ 0x33bd48,
+ 0x216f48,
+ 0x3597c8,
+ 0x26d68b,
+ 0x2c23c7,
+ 0x30a589,
+ 0x262388,
+ 0x343084,
+ 0x3514c8,
+ 0x28cd89,
+ 0x2ac305,
+ 0x2ba687,
+ 0x23bcc5,
+ 0x27e548,
+ 0x28fc4b,
+ 0x295710,
+ 0x2a6dc5,
+ 0x215a0c,
+ 0x348205,
+ 0x27be43,
+ 0x2a8f86,
+ 0x2be6c4,
+ 0x335086,
+ 0x29bf47,
+ 0x21b244,
+ 0x240b88,
+ 0x28304d,
+ 0x302945,
+ 0x29b104,
+ 0x2243c4,
+ 0x276949,
+ 0x2a11c8,
+ 0x317687,
+ 0x22fb88,
+ 0x27f748,
+ 0x277605,
+ 0x209287,
0x277587,
- 0x21a0c8,
- 0x27f889,
- 0x2e2106,
- 0x344085,
- 0x226704,
- 0x24e9c6,
- 0x304186,
- 0x2ba386,
- 0x29ee88,
- 0x2179c3,
- 0x203043,
- 0x3598c5,
- 0x2300c6,
- 0x2b2985,
- 0x388048,
- 0x2a180a,
- 0x2cee04,
- 0x264b08,
- 0x29bd48,
- 0x202ec7,
- 0x2e2e09,
- 0x2be9c8,
- 0x28b387,
- 0x2936c6,
- 0x20ac4a,
- 0x24ea48,
- 0x396449,
- 0x299188,
- 0x21cec9,
- 0x2ea087,
- 0x2effc5,
- 0x3ac4c6,
- 0x2b1388,
- 0x285d08,
- 0x2a1048,
- 0x249e08,
- 0x2a23c5,
- 0x20f444,
- 0x211308,
- 0x208484,
- 0x3a1044,
- 0x270f45,
- 0x297a87,
- 0x202ac9,
- 0x303e47,
- 0x215f45,
- 0x27cdc6,
- 0x34ebc6,
- 0x203d44,
- 0x2a6706,
- 0x254884,
- 0x27ef46,
- 0x202886,
- 0x214b06,
- 0x200045,
- 0x387f07,
- 0x204083,
- 0x206b49,
- 0x308f48,
- 0x264984,
- 0x28b20d,
- 0x29cd88,
- 0x3053c8,
- 0x3963c6,
- 0x336789,
- 0x2cd449,
- 0x3a1985,
- 0x2a190a,
- 0x2adb4a,
- 0x2af7cc,
- 0x2af946,
- 0x27d9c6,
- 0x2c83c6,
- 0x273209,
- 0x224f06,
- 0x262c46,
- 0x359006,
- 0x25b448,
- 0x27d546,
- 0x2d36cb,
- 0x297c05,
- 0x244d85,
- 0x27dc45,
- 0x366f46,
- 0x20ac03,
- 0x241946,
- 0x277507,
- 0x2c4a05,
- 0x24c705,
- 0x3645c5,
- 0x327346,
+ 0x33e347,
+ 0x264309,
+ 0x233489,
+ 0x214c46,
+ 0x2bd306,
+ 0x262346,
+ 0x37f785,
+ 0x3a7184,
+ 0x200006,
+ 0x200386,
+ 0x277648,
+ 0x21a90b,
+ 0x260d07,
+ 0x206804,
+ 0x353646,
+ 0x2fe447,
+ 0x26dec5,
+ 0x391d05,
+ 0x219644,
+ 0x233406,
+ 0x200088,
+ 0x286a09,
+ 0x2510c6,
+ 0x284048,
+ 0x2b19c6,
+ 0x345248,
+ 0x306dcc,
+ 0x2774c6,
+ 0x29678d,
+ 0x296c0b,
+ 0x339545,
+ 0x312387,
+ 0x3531c6,
+ 0x336008,
+ 0x214cc9,
+ 0x2d0588,
+ 0x200645,
+ 0x277987,
+ 0x27d648,
+ 0x349649,
+ 0x28e946,
+ 0x250fca,
+ 0x335d88,
+ 0x2d03cb,
+ 0x39818c,
+ 0x36c5c8,
+ 0x27a7c6,
+ 0x208c88,
+ 0x3b77c7,
+ 0x32cf49,
+ 0x28f74d,
+ 0x299dc6,
+ 0x27b808,
+ 0x2b0609,
+ 0x2bda48,
+ 0x281508,
+ 0x2bfe0c,
+ 0x2c0b47,
+ 0x2c1887,
+ 0x264145,
+ 0x2ad587,
+ 0x2e0a88,
+ 0x2c1406,
+ 0x2556cc,
+ 0x2ef888,
+ 0x2ccb88,
+ 0x25dec6,
+ 0x21a507,
+ 0x214e44,
+ 0x25dc08,
+ 0x22200c,
+ 0x2ce24c,
+ 0x2342c5,
+ 0x2d0d47,
+ 0x3a9e46,
+ 0x21a486,
+ 0x2f9d88,
+ 0x3af904,
+ 0x28574b,
+ 0x36cc0b,
+ 0x2e23c6,
+ 0x282ec7,
+ 0x37a805,
+ 0x269a05,
+ 0x285886,
+ 0x256345,
+ 0x203b05,
+ 0x2cc9c7,
+ 0x274c49,
+ 0x2ac784,
+ 0x2fbb45,
+ 0x2e4bc5,
+ 0x2d9dc8,
+ 0x329d05,
+ 0x2b72c9,
+ 0x2ae5c7,
+ 0x2ae5cb,
+ 0x381306,
+ 0x347c89,
+ 0x26d108,
+ 0x276545,
+ 0x33e448,
+ 0x2334c8,
+ 0x245747,
+ 0x3776c7,
+ 0x27fe49,
+ 0x2acc07,
+ 0x28a989,
+ 0x2aa70c,
+ 0x3163c8,
+ 0x2b2ac9,
+ 0x2b3d47,
+ 0x27f809,
+ 0x26c287,
+ 0x398288,
+ 0x3b7705,
+ 0x2bb7c6,
+ 0x2c0388,
+ 0x308a88,
+ 0x27e009,
+ 0x203b47,
+ 0x269ac5,
+ 0x222b09,
+ 0x2bd6c6,
+ 0x28f544,
+ 0x30e1c6,
+ 0x35ffc8,
+ 0x232ac7,
+ 0x21ab08,
+ 0x3030c9,
+ 0x3a3707,
+ 0x29d146,
+ 0x312444,
+ 0x211609,
+ 0x209108,
+ 0x25dd87,
+ 0x27eb46,
+ 0x21a846,
+ 0x3b7904,
+ 0x2241c6,
+ 0x204fc3,
+ 0x3b1649,
+ 0x202a86,
+ 0x303345,
+ 0x29db06,
+ 0x26cac5,
+ 0x27dac8,
+ 0x36c307,
+ 0x381646,
+ 0x3b3b06,
+ 0x3078c8,
+ 0x29fa47,
+ 0x299e05,
+ 0x29b408,
+ 0x3a1e48,
+ 0x335d88,
+ 0x3480c5,
+ 0x2bb846,
+ 0x215349,
+ 0x244484,
+ 0x26c94b,
+ 0x22604b,
+ 0x2babc9,
+ 0x205043,
+ 0x254485,
+ 0x2214c6,
+ 0x385208,
+ 0x2e1f04,
+ 0x2e3306,
+ 0x2d1589,
+ 0x2ca445,
+ 0x2cc906,
+ 0x32ccc6,
+ 0x216f44,
+ 0x2a764a,
+ 0x303288,
+ 0x308a86,
+ 0x3b8645,
+ 0x37a687,
+ 0x2e0fc7,
+ 0x3a3944,
+ 0x226287,
+ 0x2aecc4,
+ 0x33bf46,
+ 0x2096c3,
+ 0x264305,
+ 0x32ad45,
+ 0x207588,
+ 0x24d985,
+ 0x277209,
+ 0x25da47,
+ 0x25da4b,
+ 0x2a148c,
+ 0x2a224a,
+ 0x300187,
+ 0x203503,
+ 0x3afc08,
+ 0x348285,
+ 0x2976c5,
+ 0x205104,
+ 0x398186,
+ 0x24ed86,
+ 0x224207,
+ 0x33448b,
+ 0x286004,
+ 0x2e6684,
+ 0x21f044,
+ 0x2cafc6,
+ 0x21b244,
+ 0x2bb648,
+ 0x342445,
+ 0x21ba45,
+ 0x359707,
+ 0x312489,
+ 0x345c45,
+ 0x37424a,
+ 0x26ac89,
+ 0x2996ca,
+ 0x3a2b49,
+ 0x33fec4,
+ 0x2cc305,
+ 0x2b6c48,
+ 0x2cd9cb,
+ 0x244245,
+ 0x2f2fc6,
+ 0x213e84,
+ 0x277746,
+ 0x3a3589,
+ 0x353707,
+ 0x3179c8,
+ 0x2a0a86,
+ 0x34de07,
+ 0x27e648,
+ 0x3747c6,
+ 0x375604,
+ 0x365ac7,
+ 0x357305,
+ 0x367287,
+ 0x200104,
+ 0x353146,
+ 0x2f4308,
+ 0x296dc8,
+ 0x2e6047,
+ 0x274fc8,
+ 0x294fc5,
+ 0x204e84,
+ 0x3711c8,
+ 0x2750c4,
+ 0x216e05,
+ 0x2f5fc4,
+ 0x2fdfc7,
+ 0x288c07,
+ 0x27f948,
+ 0x2c8d86,
+ 0x24d905,
+ 0x277008,
+ 0x2db6c8,
+ 0x29f209,
+ 0x226346,
+ 0x22f588,
+ 0x38bd4a,
+ 0x26df48,
+ 0x2e5d85,
+ 0x20b306,
+ 0x26ab48,
+ 0x277a4a,
+ 0x210f87,
+ 0x284c45,
+ 0x292708,
+ 0x2ade04,
+ 0x265886,
+ 0x2c1c08,
+ 0x204f06,
+ 0x38e7c8,
+ 0x28f187,
+ 0x203346,
+ 0x2b4b04,
+ 0x284fc7,
+ 0x2b0d84,
+ 0x3a3547,
+ 0x28e60d,
+ 0x27b645,
+ 0x2cd54b,
+ 0x29c606,
+ 0x24e848,
+ 0x240b44,
+ 0x350d06,
+ 0x27ae86,
+ 0x208fc7,
+ 0x29644d,
+ 0x243cc7,
+ 0x2b12c8,
+ 0x269b85,
+ 0x278648,
+ 0x2c4a86,
+ 0x295048,
+ 0x228086,
+ 0x33d987,
+ 0x300449,
+ 0x343ac7,
+ 0x287dc8,
+ 0x2706c5,
+ 0x21b608,
+ 0x21a3c5,
+ 0x3a4245,
+ 0x3a2dc5,
+ 0x234543,
+ 0x2809c4,
+ 0x262545,
+ 0x337809,
+ 0x27ea46,
+ 0x2dc5c8,
+ 0x377485,
+ 0x2b2e87,
+ 0x2a78ca,
+ 0x2cc849,
+ 0x2cad4a,
+ 0x2d1d08,
+ 0x2276cc,
+ 0x2806cd,
+ 0x2fc003,
+ 0x38e6c8,
+ 0x3abd45,
+ 0x2b9286,
+ 0x379f86,
+ 0x2e58c5,
+ 0x313889,
+ 0x33cc45,
+ 0x277008,
+ 0x2552c6,
+ 0x347806,
+ 0x2a0289,
+ 0x393947,
+ 0x28ff06,
+ 0x2a7848,
+ 0x33bec8,
+ 0x2daec7,
+ 0x2ace4e,
+ 0x2c4cc5,
+ 0x349545,
+ 0x204e08,
+ 0x21fcc7,
+ 0x21a882,
+ 0x2bf984,
+ 0x334f8a,
+ 0x25de48,
+ 0x2fe546,
+ 0x298ac8,
+ 0x278cc6,
+ 0x332608,
+ 0x2ac008,
+ 0x3a4204,
+ 0x2b33c5,
+ 0x676384,
+ 0x676384,
+ 0x676384,
+ 0x202b43,
+ 0x21a6c6,
+ 0x2774c6,
+ 0x29cb0c,
+ 0x203383,
+ 0x27e146,
+ 0x2151c4,
+ 0x247e88,
+ 0x2d13c5,
+ 0x335086,
+ 0x2bcac8,
+ 0x2d2bc6,
+ 0x3815c6,
+ 0x245d08,
+ 0x2a1807,
+ 0x2ac9c9,
+ 0x2f214a,
+ 0x22b484,
+ 0x215305,
+ 0x2a96c5,
+ 0x247c06,
+ 0x313486,
+ 0x29d546,
+ 0x2f5546,
+ 0x2acb04,
+ 0x2acb0b,
+ 0x231804,
+ 0x29ccc5,
+ 0x2aad85,
+ 0x312806,
+ 0x3a6308,
+ 0x280587,
+ 0x317784,
+ 0x236203,
+ 0x2ad905,
+ 0x306047,
+ 0x28048b,
+ 0x207487,
+ 0x2bc9c8,
+ 0x2e62c7,
+ 0x370b06,
+ 0x279bc8,
+ 0x2a820b,
+ 0x21ff46,
+ 0x212309,
+ 0x2a8385,
+ 0x30a343,
+ 0x2cc906,
+ 0x28f088,
+ 0x213403,
+ 0x24f403,
+ 0x27e646,
+ 0x278cc6,
+ 0x35d10a,
+ 0x27a805,
+ 0x27accb,
+ 0x29da4b,
+ 0x23ef83,
+ 0x202843,
+ 0x2aec44,
+ 0x278a87,
+ 0x28f104,
+ 0x244504,
+ 0x2e6404,
+ 0x26e248,
+ 0x3b8588,
+ 0x3baf89,
+ 0x393188,
+ 0x2b9dc7,
+ 0x247846,
+ 0x2dc20f,
+ 0x2c4e06,
+ 0x2d1344,
+ 0x3b83ca,
+ 0x305f47,
+ 0x3b9606,
+ 0x28f589,
+ 0x3baf05,
+ 0x2076c5,
+ 0x3bb046,
+ 0x21b743,
+ 0x2ade49,
+ 0x21eec6,
+ 0x3afa89,
+ 0x382bc6,
+ 0x264305,
+ 0x2346c5,
+ 0x207343,
+ 0x278bc8,
+ 0x20d787,
+ 0x396784,
+ 0x247d08,
+ 0x2e1244,
+ 0x2f1006,
+ 0x2a8f86,
+ 0x23c346,
+ 0x2c8609,
+ 0x297645,
+ 0x3519c6,
+ 0x2582c9,
+ 0x2c41c6,
+ 0x26e2c6,
+ 0x387886,
+ 0x2160c5,
+ 0x2f5fc6,
+ 0x33d984,
+ 0x3b7705,
+ 0x2c0384,
+ 0x2b2246,
+ 0x3532c4,
+ 0x203c43,
+ 0x284745,
+ 0x2331c8,
+ 0x25e607,
+ 0x2b8209,
+ 0x284b48,
+ 0x297e11,
+ 0x32cd4a,
+ 0x2e2307,
+ 0x2e7246,
+ 0x2151c4,
+ 0x2c0488,
+ 0x22e448,
+ 0x297fca,
+ 0x2b708d,
+ 0x268686,
+ 0x245e06,
+ 0x285086,
+ 0x21ba47,
+ 0x2b1385,
+ 0x3912c7,
+ 0x247dc5,
+ 0x2ae704,
+ 0x2a6206,
+ 0x224047,
+ 0x2adb4d,
+ 0x26aa87,
+ 0x21f308,
+ 0x277309,
+ 0x20b206,
+ 0x28e8c5,
+ 0x22cb04,
+ 0x3600c6,
+ 0x3a3846,
+ 0x25dfc6,
+ 0x299348,
+ 0x215f83,
+ 0x208fc3,
+ 0x352105,
+ 0x277dc6,
+ 0x2abfc5,
+ 0x2a0c88,
+ 0x29c10a,
+ 0x282084,
+ 0x247e88,
+ 0x295f08,
+ 0x312647,
+ 0x377549,
+ 0x2bc6c8,
+ 0x286a87,
+ 0x2587c6,
+ 0x204f0a,
+ 0x360148,
+ 0x2f98c9,
+ 0x2a1288,
+ 0x221609,
+ 0x2e7107,
+ 0x2f2f05,
+ 0x26d886,
+ 0x2c1288,
+ 0x27e7c8,
+ 0x296088,
+ 0x2e24c8,
+ 0x29ccc5,
+ 0x208a84,
+ 0x20d488,
+ 0x23e2c4,
+ 0x3a2944,
+ 0x264305,
+ 0x2917c7,
+ 0x312249,
+ 0x208dc7,
+ 0x210cc5,
+ 0x274846,
+ 0x34f606,
+ 0x212444,
+ 0x2a05c6,
+ 0x24d744,
+ 0x278546,
+ 0x312006,
+ 0x213246,
+ 0x200645,
+ 0x2a0b47,
+ 0x203503,
+ 0x2079c9,
+ 0x3076c8,
+ 0x247d04,
+ 0x28690d,
+ 0x296ec8,
+ 0x2e3788,
+ 0x2f9846,
+ 0x300549,
+ 0x2cc849,
+ 0x3a3285,
+ 0x29c20a,
+ 0x27cf4a,
+ 0x29d74c,
+ 0x29d8c6,
+ 0x275446,
+ 0x2c4f86,
+ 0x2b4749,
+ 0x2b94c6,
+ 0x29fa86,
+ 0x33cd06,
+ 0x25dc08,
+ 0x274fc6,
+ 0x2ce80b,
+ 0x291945,
+ 0x21ba45,
+ 0x2756c5,
+ 0x352a46,
+ 0x204ec3,
+ 0x23c2c6,
+ 0x26aa07,
+ 0x2c0345,
+ 0x320585,
+ 0x379445,
+ 0x318446,
0x31da84,
0x31da86,
- 0x3add49,
- 0x366dcc,
- 0x37a948,
- 0x33f004,
- 0x2fa886,
- 0x2a1e06,
- 0x29bec8,
- 0x218808,
- 0x366cc9,
- 0x3b1987,
- 0x245989,
- 0x254106,
- 0x22c2c4,
- 0x20bf04,
- 0x286cc4,
- 0x285b88,
- 0x20290a,
- 0x3477c6,
- 0x352107,
- 0x36f007,
- 0x2d4505,
- 0x2a7084,
- 0x2913c6,
- 0x2b6e46,
- 0x202803,
- 0x308d87,
- 0x368b48,
- 0x3a1aca,
- 0x2ce348,
- 0x2cec88,
- 0x35af05,
- 0x253245,
- 0x26df85,
- 0x2d48c6,
- 0x33d4c6,
- 0x35bd05,
- 0x2969c9,
- 0x2a6e8c,
- 0x26e047,
- 0x29de88,
- 0x381a45,
- 0x68a8c4,
- 0x24df84,
- 0x25d784,
- 0x214486,
- 0x2a450e,
- 0x205947,
- 0x2c41c5,
- 0x2abfcc,
- 0x231287,
- 0x216207,
- 0x218089,
- 0x218f89,
- 0x28a645,
- 0x308f48,
- 0x24d609,
- 0x334005,
- 0x2c4948,
- 0x322906,
- 0x361f06,
- 0x2e4444,
- 0x2ae848,
- 0x251f43,
- 0x303084,
- 0x2b37c5,
- 0x3ac0c7,
- 0x210445,
- 0x39bbc9,
- 0x28aa8d,
- 0x299886,
- 0x245404,
- 0x2937c8,
- 0x27d00a,
- 0x224107,
- 0x23be45,
- 0x203143,
- 0x2a37ce,
- 0x27868c,
- 0x2faa87,
- 0x2a46c7,
- 0x203c03,
- 0x224f45,
- 0x25d785,
- 0x29e9c8,
- 0x29bb89,
- 0x33ef06,
- 0x247444,
- 0x249b86,
- 0x21e3cb,
- 0x2cd1cc,
- 0x221507,
- 0x2d5c45,
- 0x3ad988,
- 0x2e0b85,
- 0x2c2307,
- 0x3630c7,
- 0x251f45,
- 0x20ac03,
- 0x39a644,
- 0x212905,
- 0x351805,
- 0x351806,
- 0x34fd08,
- 0x216287,
- 0x319646,
- 0x35c106,
- 0x3a1406,
- 0x2d5e89,
- 0x20f847,
- 0x26a5c6,
- 0x2cd346,
- 0x252006,
- 0x2aeb45,
- 0x219646,
- 0x3768c5,
- 0x228848,
- 0x2973cb,
- 0x291086,
- 0x36f044,
- 0x2e2909,
- 0x25b284,
- 0x322888,
- 0x2324c7,
- 0x2885c4,
- 0x2be288,
- 0x2c5304,
- 0x2aeb84,
- 0x28b145,
- 0x35e286,
- 0x34f387,
- 0x239b43,
- 0x2a2a85,
- 0x322e84,
- 0x358586,
- 0x3a1a08,
- 0x368885,
- 0x297089,
- 0x3363c5,
- 0x2e1e88,
- 0x215207,
- 0x388dc8,
- 0x2bd787,
- 0x362709,
- 0x255a86,
- 0x32b3c6,
- 0x359004,
- 0x293605,
- 0x30150c,
- 0x27dc47,
- 0x27e207,
- 0x36eec8,
- 0x299886,
- 0x277444,
- 0x32e344,
- 0x286849,
- 0x2c84c6,
- 0x240987,
- 0x3a8bc4,
- 0x286086,
- 0x343905,
- 0x2cbb07,
- 0x2d3646,
- 0x252d49,
- 0x2aab07,
- 0x26f8c7,
- 0x2a6246,
- 0x3879c5,
- 0x283988,
- 0x219b08,
- 0x2646c6,
- 0x3688c5,
- 0x261b06,
- 0x209983,
- 0x29e849,
- 0x2a2b4e,
- 0x2bd488,
- 0x2314c8,
- 0x2644cb,
- 0x2972c6,
- 0x2089c4,
- 0x244ac4,
- 0x2a2c4a,
- 0x216907,
- 0x26a685,
- 0x213bc9,
- 0x2c3285,
- 0x3a1087,
- 0x2b4c04,
- 0x284487,
- 0x2e65c8,
- 0x2cb206,
- 0x21e789,
- 0x2beaca,
- 0x216886,
- 0x29c8c6,
- 0x2b1945,
- 0x37ccc5,
- 0x31a107,
- 0x24dd08,
- 0x343848,
- 0x395fc6,
- 0x234145,
- 0x208ace,
- 0x2b8bc4,
- 0x264645,
- 0x27c749,
- 0x30dfc8,
- 0x28f0c6,
- 0x2a04cc,
- 0x2a1410,
- 0x2a414f,
- 0x2a51c8,
- 0x3363c7,
- 0x200045,
- 0x26fd05,
- 0x34f209,
- 0x298a89,
- 0x23cbc6,
- 0x278307,
- 0x2d2805,
- 0x21b509,
- 0x340146,
- 0x224d4d,
- 0x286b89,
- 0x202ec4,
- 0x2bd208,
- 0x2113c9,
- 0x347986,
- 0x27cec5,
- 0x32b3c6,
- 0x317849,
- 0x26ba08,
- 0x212485,
- 0x2ae844,
- 0x2a068b,
- 0x347845,
- 0x2a07c6,
- 0x287586,
- 0x26ed86,
- 0x287fcb,
- 0x297189,
- 0x35c045,
- 0x388b87,
- 0x363206,
- 0x220f06,
- 0x25d508,
- 0x35e389,
- 0x219e8c,
- 0x30a648,
- 0x360406,
- 0x340bc3,
- 0x303c06,
- 0x287e05,
- 0x281948,
- 0x233b46,
- 0x2cbd48,
- 0x275845,
- 0x29dfc5,
- 0x215348,
- 0x31a947,
- 0x319287,
- 0x247fc7,
- 0x220d88,
- 0x336508,
- 0x31e4c6,
- 0x2b7687,
- 0x247987,
- 0x287cca,
- 0x254003,
- 0x366f46,
- 0x202a45,
- 0x203bc4,
- 0x27f889,
- 0x362684,
- 0x2a7e44,
- 0x2a1c84,
- 0x2a46cb,
- 0x211547,
- 0x208d05,
- 0x29ab08,
- 0x27cdc6,
- 0x27cdc8,
- 0x280dc6,
- 0x2900c5,
- 0x290385,
- 0x291f46,
- 0x292b08,
- 0x292dc8,
- 0x27fa46,
- 0x29a94f,
- 0x29e310,
- 0x3b1785,
- 0x204083,
- 0x22c385,
- 0x30b188,
- 0x298989,
- 0x334148,
- 0x2d5d08,
- 0x224788,
- 0x211607,
- 0x27ca89,
- 0x2cbf48,
- 0x25bd44,
- 0x2a1b08,
- 0x2deb49,
- 0x2b81c7,
- 0x29f904,
- 0x303f08,
- 0x387cca,
- 0x2ebe06,
- 0x2a4dc6,
- 0x21f5c9,
- 0x2a1647,
- 0x2ce1c8,
- 0x30cc88,
- 0x3a8a48,
- 0x356245,
- 0x37dc45,
- 0x244d85,
- 0x25d745,
- 0x37e287,
- 0x20ac05,
- 0x2c4a05,
- 0x2b5546,
- 0x334087,
- 0x2d1807,
- 0x387fc6,
- 0x2d7405,
- 0x2a07c6,
- 0x212245,
- 0x2b84c8,
- 0x2f1d84,
- 0x2c7686,
- 0x343744,
- 0x2b69c8,
- 0x2c778a,
- 0x28004c,
- 0x234bc5,
- 0x2c4086,
- 0x21a046,
- 0x368706,
- 0x30b384,
- 0x343bc5,
- 0x280c07,
- 0x2a16c9,
- 0x2cdc87,
- 0x68a8c4,
- 0x68a8c4,
- 0x3175c5,
- 0x32dd04,
- 0x29fe8a,
- 0x27cc46,
- 0x24d404,
- 0x208305,
- 0x37a545,
- 0x2b6d44,
- 0x2871c7,
- 0x36b847,
- 0x2cd788,
- 0x368ec8,
- 0x212489,
- 0x340248,
- 0x2a004b,
- 0x250b44,
- 0x221005,
- 0x2840c5,
- 0x247f49,
- 0x35e389,
- 0x2e2808,
- 0x232248,
- 0x203084,
- 0x2a1e45,
- 0x202943,
- 0x264845,
- 0x38ed06,
- 0x29b9cc,
- 0x20f4c6,
- 0x247246,
- 0x28f345,
- 0x3273c8,
- 0x2bd606,
- 0x2ea346,
- 0x2a4dc6,
- 0x2297cc,
- 0x2ba544,
- 0x3a154a,
- 0x28f288,
- 0x29b807,
- 0x322d86,
- 0x33efc7,
- 0x2f2185,
- 0x343e06,
- 0x34af86,
- 0x356707,
- 0x2be7c4,
- 0x3676c5,
- 0x27c744,
- 0x37ac87,
- 0x27c988,
- 0x27d84a,
- 0x284a07,
- 0x2d22c7,
- 0x336347,
- 0x2e0cc9,
- 0x29b9ca,
- 0x219e43,
- 0x2e9645,
- 0x200c83,
- 0x2e8cc9,
- 0x26ac48,
- 0x38eb47,
- 0x334249,
- 0x219c06,
- 0x2d4108,
- 0x337f85,
- 0x2e16ca,
- 0x2d8c49,
- 0x2abc49,
- 0x3aea07,
- 0x283049,
- 0x214a08,
- 0x3568c6,
- 0x2c4248,
- 0x217b07,
- 0x235c87,
- 0x277787,
- 0x2d2688,
- 0x2fa706,
- 0x387a85,
- 0x280c07,
- 0x29c3c8,
- 0x3436c4,
- 0x30e3c4,
- 0x294047,
- 0x2b2d47,
- 0x24d48a,
- 0x356846,
- 0x330f0a,
- 0x2c34c7,
- 0x2b8987,
- 0x257e44,
- 0x289204,
- 0x2d3546,
- 0x3b3d44,
- 0x3b3d4c,
- 0x203505,
- 0x218649,
- 0x2dfc44,
- 0x2b6e05,
- 0x27cf88,
- 0x292e85,
- 0x375846,
- 0x217f84,
- 0x3ae3ca,
- 0x32b7c6,
- 0x2a68ca,
- 0x237f07,
- 0x2d3385,
- 0x21c985,
- 0x2d454a,
- 0x2a6805,
- 0x2a4cc6,
- 0x208484,
- 0x2b5106,
- 0x31a1c5,
- 0x233c06,
- 0x2e88cc,
- 0x2cd90a,
- 0x2936c4,
- 0x235ec6,
- 0x2a1647,
- 0x2d5204,
- 0x25b448,
- 0x38e5c6,
- 0x208949,
- 0x2bb109,
- 0x2b0689,
- 0x24f346,
- 0x217c06,
- 0x2c4387,
- 0x296908,
- 0x217a09,
- 0x211547,
- 0x29ac86,
- 0x3872c7,
- 0x28b985,
- 0x2b8bc4,
- 0x2c3f47,
- 0x247b45,
- 0x28b085,
- 0x235247,
- 0x251e08,
+ 0x292f49,
+ 0x3528cc,
+ 0x2ae448,
+ 0x239184,
+ 0x2f5c06,
+ 0x29c706,
+ 0x28f088,
+ 0x216f48,
+ 0x3527c9,
+ 0x37a687,
+ 0x2367c9,
+ 0x24cfc6,
+ 0x22e904,
+ 0x20ea44,
+ 0x280144,
+ 0x27e648,
+ 0x31208a,
+ 0x345bc6,
+ 0x353cc7,
+ 0x362c47,
+ 0x347d85,
+ 0x2a9684,
+ 0x28cd46,
+ 0x2b13c6,
+ 0x2336c3,
+ 0x307507,
+ 0x38d588,
+ 0x3a33ca,
+ 0x2cbb88,
+ 0x281f08,
+ 0x353305,
+ 0x339645,
+ 0x260e05,
+ 0x348146,
0x3ad906,
- 0x29d24d,
- 0x29ebcf,
- 0x2a360d,
- 0x215f84,
- 0x232cc6,
- 0x2d91c8,
- 0x358fc5,
- 0x287e88,
- 0x23a58a,
- 0x202ec4,
- 0x21e946,
- 0x239607,
- 0x22d9c7,
- 0x2a79c9,
- 0x2c4205,
- 0x2b6d44,
- 0x2b8cca,
- 0x2be589,
- 0x283147,
- 0x272086,
- 0x347986,
- 0x2a1d86,
- 0x364046,
- 0x2d890f,
- 0x2d9089,
- 0x27d546,
- 0x282e46,
- 0x32fd89,
- 0x2b7787,
- 0x226743,
- 0x229946,
- 0x218303,
- 0x2e7dc8,
- 0x387107,
- 0x2a53c9,
- 0x29f208,
- 0x3193c8,
- 0x351446,
- 0x20f409,
- 0x23c1c5,
- 0x2b7844,
- 0x2a73c7,
- 0x273285,
- 0x215f84,
- 0x208dc8,
- 0x216bc4,
- 0x2b74c7,
- 0x34bc06,
- 0x2b3045,
- 0x299188,
- 0x34784b,
- 0x319c07,
- 0x2d47c6,
- 0x2c82c4,
- 0x32d146,
- 0x270f45,
- 0x247b45,
- 0x283709,
- 0x286dc9,
- 0x235cc4,
- 0x235d05,
- 0x235f05,
- 0x2e1546,
- 0x309048,
- 0x2c2c46,
- 0x36898b,
- 0x2b4c8a,
- 0x2b6905,
- 0x290406,
- 0x3025c5,
- 0x2e0a45,
- 0x2ab6c7,
- 0x3ac808,
- 0x245984,
- 0x26c586,
- 0x292e46,
- 0x214bc7,
- 0x30d7c4,
- 0x2817c6,
- 0x2b9f85,
- 0x2b9f89,
- 0x2135c4,
- 0x2a7209,
- 0x27fa46,
- 0x2c5108,
- 0x235f05,
- 0x36f105,
- 0x233c06,
- 0x219d89,
- 0x218f89,
- 0x2472c6,
- 0x30e0c8,
- 0x28abc8,
- 0x302584,
- 0x2b9004,
- 0x2b9008,
- 0x3269c8,
- 0x245a89,
- 0x38ec86,
- 0x2a4dc6,
- 0x320c0d,
- 0x351c06,
- 0x34c209,
- 0x23d1c5,
- 0x3b2106,
- 0x262d48,
- 0x31d9c5,
- 0x2479c4,
- 0x270f45,
- 0x2866c8,
- 0x29fc49,
- 0x27c804,
- 0x2008c6,
- 0x39660a,
- 0x2fa988,
- 0x24d609,
- 0x244c4a,
- 0x3341c6,
- 0x29ed88,
- 0x2c20c5,
- 0x2c0e48,
- 0x2bd885,
- 0x219ac9,
- 0x36bd09,
- 0x203602,
- 0x2e3305,
- 0x276286,
- 0x27f987,
- 0x295705,
- 0x2f0ec6,
- 0x306288,
- 0x299886,
- 0x2b9a09,
- 0x27e306,
- 0x25d388,
- 0x2afb85,
- 0x25c586,
- 0x26aac8,
- 0x285b88,
- 0x2e9f88,
- 0x347b08,
- 0x219644,
- 0x209fc3,
- 0x2b9c44,
- 0x249b06,
- 0x28b9c4,
- 0x231407,
- 0x2ea249,
- 0x2c7a05,
- 0x30cc86,
- 0x229946,
- 0x34fb4b,
- 0x2b6846,
- 0x20edc6,
- 0x2cb6c8,
- 0x24c646,
- 0x2bcb03,
- 0x2080c3,
- 0x2b8bc4,
- 0x22e605,
- 0x2b4447,
- 0x27c988,
- 0x27c98f,
- 0x280b0b,
- 0x308e48,
- 0x200946,
- 0x30914e,
- 0x233c03,
- 0x2b43c4,
- 0x2b67c5,
- 0x2b6bc6,
- 0x2914cb,
- 0x297b46,
- 0x222709,
- 0x2b3045,
- 0x38a208,
- 0x211d88,
- 0x218e4c,
- 0x2a4706,
- 0x264886,
- 0x2de405,
- 0x28c188,
- 0x26aac5,
- 0x335848,
- 0x2a084a,
- 0x2a3a49,
- 0x68a8c4,
- 0x3760d1c2,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x368883,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x204ac3,
- 0x200383,
- 0x210e03,
- 0x24ae04,
- 0x2d0783,
- 0x23a184,
- 0x231b83,
- 0x2da904,
- 0x332ec3,
+ 0x26c085,
+ 0x3b1889,
+ 0x2a948c,
+ 0x260ec7,
+ 0x298048,
+ 0x2e5c05,
+ 0x676384,
+ 0x320944,
+ 0x252c04,
+ 0x22df86,
+ 0x29eb0e,
+ 0x207747,
+ 0x21bc45,
+ 0x24440c,
+ 0x2e1107,
+ 0x223fc7,
+ 0x225109,
+ 0x217cc9,
+ 0x284c45,
+ 0x3076c8,
+ 0x215349,
+ 0x335c45,
+ 0x2c0288,
+ 0x2c2586,
+ 0x371446,
+ 0x2def04,
+ 0x2553c8,
+ 0x20b3c3,
+ 0x2af8c4,
+ 0x2ad985,
+ 0x3bab07,
+ 0x21c245,
+ 0x38bc09,
+ 0x28b30d,
+ 0x2a33c6,
+ 0x225fc4,
+ 0x2588c8,
+ 0x274a8a,
+ 0x2611c7,
+ 0x235d45,
+ 0x23b403,
+ 0x29dc0e,
+ 0x278ccc,
+ 0x2f5e07,
+ 0x29ecc7,
+ 0x200143,
+ 0x2b9505,
+ 0x252c05,
+ 0x298e88,
+ 0x295d49,
+ 0x239086,
+ 0x28f104,
+ 0x2e2246,
+ 0x27b5cb,
+ 0x2cc5cc,
+ 0x366d87,
+ 0x2d0305,
+ 0x3a1d48,
+ 0x2dac85,
+ 0x3b83c7,
+ 0x32cb87,
+ 0x247585,
+ 0x204ec3,
+ 0x26e584,
+ 0x21c685,
+ 0x2ac685,
+ 0x2ac686,
+ 0x292008,
+ 0x224047,
+ 0x37a286,
+ 0x26c486,
+ 0x3a2d06,
+ 0x268789,
+ 0x209387,
+ 0x25e286,
+ 0x2cc746,
+ 0x2731c6,
+ 0x2a7585,
+ 0x3b2b46,
+ 0x380145,
+ 0x329d88,
+ 0x29114b,
+ 0x28c346,
+ 0x362c84,
+ 0x2b4389,
+ 0x25da44,
+ 0x2c2508,
+ 0x30e2c7,
+ 0x281404,
+ 0x2bbd88,
+ 0x2c1684,
+ 0x2a75c4,
+ 0x286845,
+ 0x302986,
+ 0x26e187,
+ 0x203043,
+ 0x29d205,
+ 0x323284,
+ 0x349586,
+ 0x3a3308,
+ 0x38d2c5,
+ 0x290e09,
+ 0x222d05,
+ 0x2dbf88,
+ 0x215087,
+ 0x388588,
+ 0x2b8047,
+ 0x2fb609,
+ 0x264dc6,
+ 0x32bb46,
+ 0x28cac4,
+ 0x258705,
+ 0x2fce4c,
+ 0x2756c7,
+ 0x275fc7,
+ 0x362b08,
+ 0x2a33c6,
+ 0x26a944,
+ 0x328004,
+ 0x27fcc9,
+ 0x2c5086,
+ 0x298a07,
+ 0x208c04,
+ 0x23da46,
+ 0x33b785,
+ 0x2c88c7,
+ 0x2ce786,
+ 0x250e89,
+ 0x27cd87,
+ 0x262107,
+ 0x2a0106,
+ 0x23d985,
+ 0x27c548,
+ 0x21ed48,
+ 0x247a46,
+ 0x38d305,
+ 0x390586,
+ 0x2034c3,
+ 0x298d09,
+ 0x29d2ce,
+ 0x2b7d48,
+ 0x2e1348,
+ 0x24784b,
+ 0x291046,
+ 0x313104,
+ 0x2802c4,
+ 0x29d3ca,
+ 0x215907,
+ 0x25e345,
+ 0x212309,
+ 0x2bf685,
+ 0x3a2987,
+ 0x245c84,
+ 0x287087,
+ 0x2e40c8,
+ 0x2cd306,
+ 0x27b989,
+ 0x2bc7ca,
+ 0x215886,
+ 0x296a06,
+ 0x2aad05,
+ 0x37d085,
+ 0x282d07,
+ 0x244e48,
+ 0x33b6c8,
+ 0x3a4206,
+ 0x234745,
+ 0x31320e,
+ 0x2b3204,
+ 0x2479c5,
+ 0x2741c9,
+ 0x2dce48,
+ 0x28abc6,
+ 0x29af0c,
+ 0x29bd10,
+ 0x29e74f,
+ 0x29f7c8,
+ 0x300187,
+ 0x200645,
+ 0x262545,
+ 0x26e009,
+ 0x292909,
+ 0x241946,
+ 0x2442c7,
+ 0x2d0cc5,
+ 0x337b09,
+ 0x339386,
+ 0x2b930d,
+ 0x280009,
+ 0x244504,
+ 0x2b7ac8,
+ 0x20d549,
+ 0x345d86,
+ 0x274945,
+ 0x32bb46,
+ 0x317889,
+ 0x2f3c48,
+ 0x20dcc5,
+ 0x2553c4,
+ 0x29b0cb,
+ 0x345c45,
+ 0x29b206,
+ 0x280a06,
+ 0x265e46,
+ 0x276d4b,
+ 0x290f09,
+ 0x26c3c5,
+ 0x388347,
+ 0x32ccc6,
+ 0x334dc6,
+ 0x252988,
+ 0x302a89,
+ 0x21f0cc,
+ 0x305e48,
+ 0x309e46,
+ 0x322c03,
+ 0x2ba886,
+ 0x276b85,
+ 0x27b008,
+ 0x234146,
+ 0x2c8b08,
+ 0x248b45,
+ 0x279305,
+ 0x32eb08,
+ 0x332787,
+ 0x379ec7,
+ 0x224207,
+ 0x334c48,
+ 0x3002c8,
+ 0x2ad486,
+ 0x2b2087,
+ 0x23bb07,
+ 0x276a4a,
+ 0x201e03,
+ 0x352a46,
+ 0x2392c5,
+ 0x334f84,
+ 0x277309,
+ 0x2fb584,
+ 0x25e684,
+ 0x29c584,
+ 0x29eccb,
+ 0x20d6c7,
+ 0x313445,
+ 0x294cc8,
+ 0x274846,
+ 0x274848,
+ 0x27a746,
+ 0x28b085,
+ 0x28b645,
+ 0x28d886,
+ 0x28ee48,
+ 0x28f4c8,
+ 0x2774c6,
+ 0x294b0f,
+ 0x2987d0,
+ 0x3a6005,
+ 0x203503,
+ 0x22e9c5,
+ 0x30a4c8,
+ 0x292809,
+ 0x335d88,
+ 0x268608,
+ 0x2b8d48,
+ 0x20d787,
+ 0x274509,
+ 0x2c8d08,
+ 0x265304,
+ 0x29c408,
+ 0x2d9e89,
+ 0x2b27c7,
+ 0x299d44,
+ 0x208e88,
+ 0x2a090a,
+ 0x2e77c6,
+ 0x268686,
+ 0x226209,
+ 0x29bf47,
+ 0x2cba08,
+ 0x204848,
+ 0x2ddd88,
+ 0x35cc45,
+ 0x37e005,
+ 0x21ba45,
+ 0x252bc5,
+ 0x3b5987,
+ 0x204ec5,
+ 0x2c0345,
+ 0x313686,
+ 0x335cc7,
+ 0x2cd907,
+ 0x2a0c06,
+ 0x2d2245,
+ 0x29b206,
+ 0x27ba85,
+ 0x2b58c8,
+ 0x2f4284,
+ 0x2c4246,
+ 0x33b5c4,
+ 0x2b0f48,
+ 0x2c434a,
+ 0x2790cc,
+ 0x334685,
+ 0x21bb06,
+ 0x21f286,
+ 0x351fc6,
+ 0x309ec4,
+ 0x33ba45,
+ 0x27a587,
+ 0x29bfc9,
+ 0x2cb4c7,
+ 0x676384,
+ 0x676384,
+ 0x317605,
+ 0x37b944,
+ 0x29a8ca,
+ 0x2746c6,
+ 0x279e04,
+ 0x3b9585,
+ 0x37e405,
+ 0x2b12c4,
+ 0x280647,
+ 0x222c87,
+ 0x2cafc8,
+ 0x33de88,
+ 0x20dcc9,
+ 0x29cd88,
+ 0x29aa8b,
+ 0x2318c4,
+ 0x366885,
+ 0x27cc85,
+ 0x224189,
+ 0x302a89,
+ 0x2b4288,
+ 0x30e048,
+ 0x2d6604,
+ 0x29c745,
+ 0x217083,
+ 0x247bc5,
+ 0x351a46,
+ 0x295b8c,
+ 0x208b06,
+ 0x36c3c6,
+ 0x28ae45,
+ 0x3184c8,
+ 0x2b7ec6,
+ 0x2e73c6,
+ 0x268686,
+ 0x22920c,
+ 0x25e184,
+ 0x3a2e4a,
+ 0x28ad88,
0x2959c7,
- 0x20fbc3,
- 0x20abc3,
- 0x2842c8,
- 0x200383,
- 0x2b400b,
- 0x2f2a03,
- 0x2716c6,
- 0x205bc2,
- 0x26b44b,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x200383,
- 0x200e03,
- 0x203383,
- 0x204cc2,
- 0x15f048,
- 0x325b45,
- 0x247bc8,
- 0x2ec408,
- 0x20d1c2,
- 0x329dc5,
- 0x39c307,
- 0x2001c2,
- 0x24b587,
- 0x208a42,
- 0x246f87,
- 0x239ec9,
- 0x2c1c88,
- 0x3a88c9,
- 0x338b02,
- 0x270647,
- 0x2abac4,
- 0x39c3c7,
- 0x2b4b87,
- 0x24ca02,
- 0x20fbc3,
- 0x20b602,
- 0x202082,
- 0x200382,
- 0x217902,
- 0x200e02,
- 0x20c4c2,
- 0x2af685,
- 0x24dec5,
- 0xd1c2,
- 0x31b83,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x117c3,
- 0x701,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x204303,
- 0x204ac3,
- 0x200383,
- 0x21bd03,
- 0x3a40d686,
- 0x5e303,
- 0x854c5,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x8082,
- 0x15f048,
- 0x4dcc4,
- 0xe0f85,
- 0x204cc2,
- 0x2cfa44,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x236d03,
- 0x2b0405,
- 0x204303,
- 0x205d83,
- 0x204ac3,
- 0x2104c3,
- 0x200383,
- 0x213e83,
- 0x24ae83,
- 0x24abc3,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x20d1c2,
- 0x200383,
- 0x15f048,
- 0x332ec3,
- 0x15f048,
- 0x26ae03,
- 0x2d0783,
- 0x22ef04,
- 0x231b83,
- 0x332ec3,
- 0x20a3c2,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20a3c2,
- 0x22d603,
- 0x204ac3,
- 0x200383,
- 0x2ec383,
- 0x213e83,
- 0x204cc2,
- 0x20d1c2,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2716c5,
- 0x1540c6,
- 0x24ae04,
- 0x205bc2,
- 0x15f048,
- 0x204cc2,
- 0x1d508,
- 0x20d1c2,
- 0x97606,
- 0x1681c4,
- 0x16e1cb,
- 0x3dc06,
- 0xfcc7,
- 0x231b83,
- 0x332ec3,
- 0x15ae05,
- 0x19c804,
- 0x221543,
- 0x53fc7,
- 0xdc304,
- 0x204ac3,
- 0x94fc4,
- 0x200383,
- 0x2f39c4,
- 0xfe588,
- 0x125886,
- 0x114f85,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x20abc3,
- 0x200383,
- 0x2f2a03,
- 0x205bc2,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204143,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x2da904,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2716c6,
- 0x231b83,
- 0x332ec3,
- 0x178ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0xfcc7,
- 0x15f048,
- 0x332ec3,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x40ed0783,
- 0x231b83,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x204cc2,
- 0x20d1c2,
- 0x2d0783,
- 0x332ec3,
- 0x204ac3,
- 0x200382,
- 0x200383,
- 0x316e47,
- 0x23860b,
- 0x2396c3,
- 0x24be08,
- 0x296687,
- 0x225246,
- 0x2c6145,
- 0x373549,
- 0x20f948,
- 0x260d09,
- 0x260d10,
- 0x35d28b,
- 0x385989,
- 0x209303,
- 0x2b5649,
- 0x230806,
- 0x23080c,
- 0x260f08,
- 0x3ae848,
- 0x35d7c9,
- 0x2a5d0e,
- 0x20780b,
- 0x2eb20c,
- 0x205283,
- 0x26cc4c,
- 0x205289,
- 0x257a87,
- 0x231acc,
- 0x36aa8a,
- 0x24fe44,
- 0x393f4d,
- 0x26cb08,
- 0x210e0d,
- 0x272746,
- 0x29258b,
- 0x31a3c9,
- 0x23d087,
- 0x339606,
- 0x349d89,
- 0x38ce8a,
- 0x37a0c8,
- 0x2f24c4,
- 0x34ecc7,
- 0x3ac5c7,
- 0x3a8dc4,
- 0x32d984,
- 0x237209,
- 0x2ceac9,
- 0x237908,
- 0x210b85,
- 0x392545,
- 0x20aa06,
- 0x393e09,
- 0x23a80d,
- 0x2eac88,
- 0x20a907,
- 0x2c61c8,
- 0x382986,
- 0x37ed04,
- 0x359b85,
- 0x202246,
- 0x203204,
- 0x205187,
- 0x206d8a,
- 0x211cc4,
- 0x2167c6,
- 0x2182c9,
- 0x2182cf,
- 0x2197cd,
- 0x21a486,
- 0x21d110,
- 0x21d506,
- 0x21dc47,
- 0x21ebc7,
- 0x21ebcf,
- 0x21f889,
- 0x2242c6,
- 0x226487,
- 0x226488,
- 0x227649,
- 0x2b3108,
- 0x2e7907,
- 0x20a203,
- 0x378c86,
- 0x3abf08,
- 0x2a5fca,
- 0x21fe49,
- 0x20fa83,
- 0x39c206,
- 0x26c3ca,
- 0x2fca47,
- 0x2578ca,
- 0x26a24e,
- 0x21f9c6,
- 0x2e3507,
- 0x227086,
- 0x201806,
- 0x37da4b,
- 0x30c58a,
- 0x317ecd,
- 0x217cc7,
- 0x359188,
- 0x359189,
- 0x35918f,
- 0x20e28c,
- 0x281bc9,
- 0x2e928e,
- 0x295aca,
- 0x3035c6,
- 0x2fbbc6,
- 0x3b06cc,
- 0x3106cc,
- 0x311448,
- 0x33d1c7,
- 0x25b7c5,
- 0x2251c4,
- 0x2438ce,
- 0x38d104,
- 0x257bc7,
- 0x26d08a,
- 0x36e914,
- 0x373a4f,
- 0x21ed88,
- 0x378b48,
- 0x357e8d,
- 0x357e8e,
- 0x3823c9,
- 0x3a5b08,
- 0x3a5b0f,
- 0x2317cc,
- 0x2317cf,
- 0x232a07,
- 0x23acca,
- 0x21cc4b,
- 0x23bcc8,
- 0x23e5c7,
- 0x264f4d,
- 0x3151c6,
- 0x394106,
- 0x2417c9,
- 0x259888,
- 0x24c108,
- 0x24c10e,
- 0x238707,
- 0x226985,
- 0x24da85,
- 0x205e04,
- 0x225506,
- 0x237808,
- 0x260183,
- 0x2efb8e,
- 0x265308,
- 0x2f198b,
- 0x26afc7,
- 0x395e05,
- 0x26cdc6,
- 0x2b0e07,
- 0x307048,
- 0x319f09,
- 0x298fc5,
- 0x28a188,
- 0x217306,
- 0x3a02ca,
- 0x2437c9,
- 0x231b89,
- 0x231b8b,
- 0x201148,
- 0x3a8c89,
- 0x210c46,
- 0x22c54a,
- 0x2b7f4a,
- 0x23aecc,
- 0x3acb87,
- 0x2c1a8a,
- 0x328ecb,
- 0x328ed9,
- 0x30fa48,
- 0x271745,
- 0x265106,
- 0x258fc9,
- 0x261cc6,
- 0x21324a,
- 0x20fb46,
- 0x201e44,
- 0x2c9ecd,
- 0x201e47,
- 0x20b549,
- 0x383305,
- 0x24e548,
- 0x24ee89,
- 0x24f0c4,
- 0x24fd47,
- 0x24fd48,
- 0x250287,
- 0x26ea08,
- 0x2545c7,
- 0x35c2c5,
- 0x25c70c,
- 0x25cf49,
- 0x2c4dca,
- 0x38f0c9,
- 0x2b5749,
- 0x2739cc,
- 0x263e0b,
- 0x2640c8,
- 0x265688,
- 0x268a44,
- 0x288288,
- 0x289389,
- 0x36ab47,
- 0x218506,
- 0x317287,
- 0x21e1c9,
- 0x328b0b,
- 0x32cfc7,
- 0x200407,
- 0x238047,
- 0x210d84,
- 0x210d85,
- 0x2ac905,
- 0x33c00b,
- 0x399404,
- 0x369d08,
- 0x26f08a,
- 0x2173c7,
- 0x341dc7,
- 0x290c12,
- 0x27ee46,
- 0x22e886,
- 0x35898e,
- 0x281346,
- 0x298708,
- 0x29938f,
- 0x2111c8,
- 0x38bb08,
- 0x3af64a,
- 0x3af651,
- 0x2a6b4e,
- 0x254e4a,
- 0x254e4c,
- 0x2014c7,
- 0x3a5d10,
- 0x3b5388,
- 0x2a6d45,
- 0x2b114a,
- 0x20324c,
- 0x29afcd,
- 0x2fce06,
- 0x2fce07,
- 0x2fce0c,
- 0x305c8c,
- 0x32814c,
- 0x28f98b,
- 0x289b84,
- 0x21f744,
- 0x374149,
- 0x2fe3c7,
- 0x23e389,
- 0x2b7d89,
- 0x35a587,
- 0x36a906,
- 0x36a909,
- 0x39d403,
- 0x2129ca,
- 0x32f807,
- 0x238acb,
- 0x317d4a,
- 0x2abb44,
- 0x39c546,
- 0x284c89,
- 0x3b3bc4,
- 0x2035ca,
- 0x2d4ac5,
- 0x2c0005,
- 0x2c000d,
- 0x2c034e,
- 0x378205,
- 0x323506,
- 0x2712c7,
- 0x38684a,
- 0x38d406,
- 0x35ecc4,
- 0x2f8987,
- 0x2da18b,
- 0x382a47,
- 0x282ac4,
- 0x24f706,
- 0x24f70d,
- 0x21de8c,
- 0x204986,
- 0x2eae8a,
- 0x235806,
- 0x2f3248,
- 0x28bf47,
- 0x33f88a,
- 0x23d986,
- 0x217bc3,
- 0x262ec6,
- 0x3abd88,
- 0x2a024a,
- 0x2766c7,
- 0x2766c8,
- 0x27dd84,
- 0x2cc0c7,
- 0x23ccc8,
- 0x29e008,
- 0x288b48,
- 0x33110a,
- 0x2e0405,
- 0x2e0687,
- 0x254c93,
- 0x2d0806,
- 0x26f288,
- 0x222c09,
- 0x24b448,
- 0x3514cb,
- 0x2cddc8,
- 0x273704,
- 0x215446,
- 0x3b4f06,
- 0x35e0c9,
- 0x2c72c7,
- 0x25c808,
- 0x29e186,
- 0x235144,
- 0x2ce085,
- 0x2c8a08,
- 0x2c900a,
- 0x2c9b48,
- 0x2ce746,
- 0x29ef8a,
- 0x351988,
- 0x2d5008,
- 0x2d6a88,
- 0x2d70c6,
- 0x2d93c6,
- 0x20168c,
- 0x2d99d0,
- 0x28de45,
- 0x210fc8,
- 0x306790,
- 0x210fd0,
- 0x260b8e,
- 0x20130e,
- 0x201314,
- 0x31abcf,
- 0x31af86,
- 0x3319d1,
- 0x339793,
- 0x339c08,
- 0x3aafc5,
- 0x35b6c8,
- 0x385785,
- 0x22854c,
- 0x229489,
- 0x282449,
- 0x245d47,
- 0x377009,
- 0x243d87,
- 0x2fadc6,
- 0x359987,
- 0x261245,
- 0x211803,
- 0x260349,
- 0x222ec9,
- 0x378ac3,
- 0x39a544,
- 0x35c40d,
- 0x3b1b0f,
- 0x235185,
- 0x35b5c6,
- 0x211b07,
- 0x325987,
- 0x28cd86,
- 0x28cd8b,
- 0x2a82c5,
- 0x25f106,
- 0x2fba47,
- 0x276ec9,
- 0x2290c6,
- 0x22e405,
- 0x31190b,
- 0x23bb46,
- 0x3724c5,
- 0x28b548,
- 0x321d88,
- 0x2d75cc,
- 0x2d75d0,
- 0x2e0149,
- 0x2e7107,
- 0x30860b,
- 0x2e6186,
- 0x2e77ca,
- 0x2ea4cb,
- 0x2eb74a,
- 0x2eb9c6,
- 0x2ec245,
- 0x32f546,
- 0x27e4c8,
- 0x245e0a,
- 0x357b1c,
- 0x2f2acc,
- 0x2f2dc8,
- 0x2716c5,
- 0x2f4f07,
- 0x26a106,
- 0x27d385,
- 0x21c2c6,
- 0x28cf48,
- 0x2be807,
- 0x2a5c08,
- 0x2e360a,
- 0x34a10c,
- 0x34a389,
- 0x37ee87,
- 0x20d244,
- 0x24db46,
- 0x38b68a,
- 0x2b7e85,
- 0x20734c,
- 0x20b088,
- 0x377648,
- 0x20d98c,
- 0x21be8c,
- 0x2206c9,
- 0x220907,
- 0x342c0c,
- 0x3aa644,
- 0x23c54a,
- 0x2580cc,
- 0x278acb,
- 0x24140b,
- 0x241f46,
- 0x383847,
- 0x2ddb07,
- 0x3a5f4f,
- 0x2fda11,
- 0x2ddb12,
- 0x30d0cd,
- 0x30d0ce,
- 0x30d40e,
- 0x31ad88,
- 0x31ad92,
- 0x252288,
- 0x2962c7,
- 0x25260a,
- 0x204748,
- 0x281305,
- 0x37e0ca,
- 0x21da47,
- 0x305304,
- 0x21b083,
- 0x2b0fc5,
- 0x3af8c7,
- 0x2fea07,
- 0x29b1ce,
- 0x30ff4d,
- 0x313c49,
- 0x220c45,
- 0x33aa03,
- 0x25fac6,
- 0x36ffc5,
- 0x2f1bc8,
- 0x30c009,
- 0x265145,
- 0x26514f,
- 0x2ec087,
- 0x373485,
- 0x21b2ca,
- 0x299b86,
- 0x2f33c9,
- 0x384d0c,
- 0x2f99c9,
- 0x207b06,
- 0x26ee8c,
- 0x340cc6,
- 0x2fc548,
- 0x2fc746,
- 0x30fbc6,
- 0x349344,
- 0x264443,
- 0x2b270a,
- 0x35b211,
- 0x281d8a,
- 0x255d05,
- 0x277947,
- 0x259307,
- 0x23cdc4,
- 0x23cdcb,
- 0x3a8748,
- 0x2bd306,
- 0x36ef45,
- 0x3a05c4,
- 0x291949,
- 0x330304,
- 0x25cd87,
- 0x332705,
- 0x332707,
- 0x358bc5,
- 0x2af743,
- 0x296188,
- 0x34398a,
- 0x239b43,
- 0x325b8a,
- 0x3b4086,
- 0x264ecf,
- 0x353689,
- 0x2efb10,
- 0x2dee88,
- 0x2d0e89,
- 0x29d087,
- 0x24f68f,
- 0x334604,
- 0x2da984,
- 0x21d386,
- 0x2b3546,
- 0x256dca,
- 0x383586,
- 0x32a787,
- 0x3055c8,
- 0x3057c7,
- 0x306047,
- 0x307a4a,
- 0x309b4b,
- 0x3a2445,
- 0x2dd748,
- 0x2166c3,
- 0x3b120c,
- 0x37140f,
- 0x25b5cd,
- 0x2c4607,
- 0x313d89,
- 0x217687,
- 0x23e148,
- 0x36eb0c,
- 0x273608,
- 0x258908,
- 0x3188ce,
- 0x32bad4,
- 0x32bfe4,
- 0x3424ca,
- 0x35ea8b,
- 0x243e44,
- 0x243e49,
- 0x21e9c8,
- 0x24e105,
- 0x25fc8a,
- 0x239d87,
- 0x2957c4,
- 0x368883,
- 0x2d0783,
- 0x23a184,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x204303,
- 0x20fbc3,
- 0x201686,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x21aa03,
- 0x204cc2,
- 0x368883,
- 0x20d1c2,
- 0x2d0783,
- 0x23a184,
- 0x231b83,
- 0x332ec3,
- 0x204303,
- 0x201686,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x204cc2,
- 0x21fd43,
- 0x20d1c2,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x20e542,
+ 0x323186,
+ 0x239147,
+ 0x2ec145,
+ 0x27eb46,
+ 0x34d406,
+ 0x35b847,
+ 0x25e6c4,
+ 0x2fe0c5,
+ 0x2741c4,
+ 0x2ae787,
+ 0x274408,
+ 0x2752ca,
+ 0x27d4c7,
+ 0x303407,
+ 0x300107,
+ 0x2dadc9,
+ 0x295b8a,
+ 0x21f083,
+ 0x25e5c5,
+ 0x213283,
+ 0x2e6449,
+ 0x33dc08,
+ 0x3709c7,
+ 0x335e89,
+ 0x21ee46,
+ 0x2b88c8,
+ 0x33a3c5,
+ 0x2db7ca,
+ 0x2d3549,
+ 0x2683c9,
+ 0x3b50c7,
+ 0x22e549,
+ 0x213148,
+ 0x35ba06,
+ 0x21bcc8,
+ 0x2160c7,
+ 0x2acc07,
+ 0x26ac87,
+ 0x2d0b48,
+ 0x2f5a86,
+ 0x2a06c5,
+ 0x27a587,
+ 0x296508,
+ 0x33b544,
+ 0x2dd244,
+ 0x28fe07,
+ 0x2ac387,
+ 0x2151ca,
+ 0x35b986,
+ 0x38c74a,
+ 0x2bf8c7,
+ 0x2b2fc7,
+ 0x246004,
+ 0x28aa44,
+ 0x2ce686,
+ 0x202d04,
+ 0x202d0c,
+ 0x3aff05,
+ 0x216d89,
+ 0x2d4f04,
+ 0x2b1385,
+ 0x274a08,
+ 0x279fc5,
+ 0x374246,
+ 0x223ec4,
+ 0x293c4a,
+ 0x2b00c6,
+ 0x29ba8a,
+ 0x22b447,
+ 0x21ac45,
+ 0x21b745,
+ 0x347dca,
+ 0x28efc5,
+ 0x26dfc6,
+ 0x23e2c4,
+ 0x2aedc6,
+ 0x282dc5,
+ 0x234206,
+ 0x2e604c,
+ 0x2cb14a,
+ 0x2587c4,
+ 0x247846,
+ 0x29bf47,
+ 0x2cf984,
+ 0x25dc08,
+ 0x393006,
+ 0x313089,
+ 0x2c7549,
+ 0x3164c9,
+ 0x26cb06,
+ 0x2161c6,
+ 0x21be07,
+ 0x3b17c8,
+ 0x215fc9,
+ 0x20d6c7,
+ 0x294e46,
+ 0x34de87,
+ 0x284f45,
+ 0x2b3204,
+ 0x21b9c7,
+ 0x23bcc5,
+ 0x286785,
+ 0x226987,
+ 0x247448,
+ 0x3a1cc6,
+ 0x29738d,
+ 0x29908f,
+ 0x29da4d,
+ 0x210d04,
+ 0x2332c6,
+ 0x2d3c08,
+ 0x33ccc5,
+ 0x276c08,
+ 0x24560a,
+ 0x244504,
+ 0x27bb46,
+ 0x26f3c7,
+ 0x286007,
+ 0x2a18c9,
+ 0x21bc85,
+ 0x2b12c4,
+ 0x2b330a,
+ 0x2bc289,
+ 0x22e647,
+ 0x265706,
+ 0x345d86,
+ 0x29c686,
+ 0x365b86,
+ 0x2d320f,
+ 0x2d3ac9,
+ 0x274fc6,
+ 0x22e346,
+ 0x31a809,
+ 0x2b2187,
+ 0x217443,
+ 0x229386,
+ 0x216a43,
+ 0x2e5788,
+ 0x34dcc7,
+ 0x29f9c9,
+ 0x2a8e08,
+ 0x37a008,
+ 0x203c86,
+ 0x208a49,
+ 0x242785,
+ 0x2b2244,
+ 0x2a99c7,
+ 0x2b47c5,
+ 0x210d04,
+ 0x313508,
+ 0x215bc4,
+ 0x2b1ec7,
+ 0x3545c6,
+ 0x357e85,
+ 0x2a1288,
+ 0x345c4b,
+ 0x331dc7,
+ 0x348046,
+ 0x2c4e84,
+ 0x319586,
+ 0x264305,
+ 0x23bcc5,
+ 0x27c2c9,
+ 0x280249,
+ 0x2acc44,
+ 0x2acc85,
+ 0x247885,
+ 0x2db646,
+ 0x3077c8,
+ 0x2bf046,
+ 0x38d3cb,
+ 0x35ab4a,
+ 0x2b0e85,
+ 0x28b6c6,
+ 0x396485,
+ 0x2cf485,
+ 0x2a54c7,
+ 0x352cc8,
+ 0x2367c4,
+ 0x25f806,
+ 0x28f546,
+ 0x213307,
+ 0x30a304,
+ 0x27ae86,
+ 0x237cc5,
+ 0x237cc9,
+ 0x2163c4,
+ 0x2a9809,
+ 0x2774c6,
+ 0x2c0c08,
+ 0x247885,
+ 0x362d45,
+ 0x234206,
+ 0x21efc9,
+ 0x217cc9,
+ 0x36c446,
+ 0x2dcf48,
+ 0x244508,
+ 0x396444,
+ 0x2b3644,
+ 0x2b3648,
+ 0x326dc8,
+ 0x2368c9,
+ 0x3519c6,
+ 0x268686,
+ 0x32224d,
+ 0x2e3306,
+ 0x306c89,
+ 0x315fc5,
+ 0x3bb046,
+ 0x391408,
+ 0x31d9c5,
+ 0x23bb44,
+ 0x264305,
+ 0x27fb48,
+ 0x29a689,
+ 0x274284,
+ 0x353146,
+ 0x279e8a,
+ 0x2f5d08,
+ 0x215349,
+ 0x38174a,
+ 0x335e06,
+ 0x299248,
+ 0x3b8185,
+ 0x2e0908,
+ 0x2b8145,
+ 0x21ed09,
+ 0x36a349,
+ 0x20d8c2,
+ 0x2a8385,
+ 0x269746,
+ 0x277407,
+ 0x3b05c5,
+ 0x308986,
+ 0x301448,
+ 0x2a33c6,
+ 0x2b6b09,
+ 0x2760c6,
+ 0x252808,
+ 0x2a89c5,
+ 0x23ebc6,
+ 0x33da88,
+ 0x27e648,
+ 0x2e7008,
+ 0x345f08,
+ 0x3b2b44,
+ 0x22a183,
+ 0x2b6d44,
+ 0x27d6c6,
+ 0x284f84,
+ 0x2e1287,
+ 0x2e72c9,
+ 0x2c45c5,
+ 0x204846,
+ 0x229386,
+ 0x291e4b,
+ 0x2b0dc6,
+ 0x3b8cc6,
+ 0x2c8488,
+ 0x3204c6,
+ 0x21aa43,
+ 0x3af743,
+ 0x2b3204,
+ 0x22f485,
+ 0x2b1807,
+ 0x274408,
+ 0x27440f,
+ 0x27a48b,
+ 0x3075c8,
+ 0x3531c6,
+ 0x3078ce,
+ 0x2319c3,
+ 0x2b1784,
+ 0x2b0d45,
+ 0x2b1146,
+ 0x28ce4b,
+ 0x291886,
+ 0x21b249,
+ 0x357e85,
+ 0x3899c8,
+ 0x20c688,
+ 0x217b8c,
+ 0x29ed06,
+ 0x247c06,
+ 0x2d7985,
+ 0x287b88,
+ 0x2790c5,
+ 0x343088,
+ 0x29b28a,
+ 0x29de89,
+ 0x676384,
+ 0x38a099c2,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x38d2c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x205503,
+ 0x200983,
+ 0x20cf83,
+ 0x25ef44,
+ 0x2a84c3,
+ 0x235ac4,
+ 0x232403,
+ 0x2d5f04,
+ 0x2e9dc3,
+ 0x3b0887,
+ 0x209703,
+ 0x204e83,
+ 0x28b148,
+ 0x200983,
+ 0x2ae1cb,
+ 0x2ec883,
+ 0x264a86,
+ 0x20b0c2,
+ 0x22d54b,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x200983,
+ 0x26be43,
+ 0x204783,
+ 0x205702,
+ 0x16d208,
+ 0x325f45,
+ 0x23bd48,
+ 0x2df7c8,
+ 0x2099c2,
+ 0x37ab45,
+ 0x38c347,
+ 0x2007c2,
+ 0x240d87,
0x20d882,
- 0x20d1c2,
- 0x2d0783,
- 0x209c02,
- 0x201d42,
- 0x2964c4,
- 0x222044,
- 0x223342,
- 0x213184,
- 0x200382,
- 0x200383,
- 0x21aa03,
- 0x241f46,
- 0x217082,
- 0x2016c2,
- 0x201a82,
- 0x436111c3,
- 0x43a014c3,
- 0x59a86,
- 0x59a86,
- 0x24ae04,
- 0x143768a,
- 0x2608c,
- 0x21ecc,
- 0x852cd,
- 0x2ac47,
- 0x1a608,
- 0x218c8,
- 0x19834a,
- 0x446db445,
- 0x12b089,
- 0x103008,
- 0x8ed4a,
- 0x14a60e,
- 0x144b24b,
- 0x1681c4,
- 0x1672c8,
- 0x13edc7,
- 0x16f07,
- 0x11dd09,
- 0x1b3c47,
- 0x94b88,
- 0x61f49,
- 0x4bfc5,
- 0x12494e,
- 0xafbcd,
- 0xfb48,
- 0x44a37046,
- 0x45437048,
- 0x79c88,
- 0x117050,
- 0x69c87,
- 0x6cf47,
- 0x71187,
- 0x75f87,
- 0xa9c2,
- 0x62507,
- 0x10c74c,
- 0x3b9c7,
- 0xa9f46,
- 0xaa689,
- 0xad708,
- 0x18d82,
- 0x1d42,
- 0x24a0b,
- 0x2ccc9,
- 0x4c809,
- 0x17de88,
- 0xb5e02,
- 0x104389,
- 0xd2fca,
- 0xdb9c9,
- 0xdd048,
- 0xddfc7,
- 0xe0389,
- 0xe4685,
- 0xe4a90,
- 0x1a8e86,
- 0x63c85,
- 0x4a84d,
- 0x1b3806,
- 0xee547,
- 0xf39d8,
- 0x96b88,
- 0xba9ca,
- 0x53b4d,
- 0x1702,
- 0x177ac6,
- 0x91788,
- 0x1ae208,
- 0x15ef09,
- 0x56608,
- 0x5dece,
- 0xd68d,
- 0xf8805,
- 0x62288,
- 0x59688,
- 0x6902,
- 0x125886,
- 0x6c82,
- 0x3c1,
- 0x8b4c3,
- 0x44ef4244,
- 0x4529a283,
+ 0x248707,
+ 0x32c589,
+ 0x3b7d48,
+ 0x2ddc09,
+ 0x23e202,
+ 0x263647,
+ 0x36c1c4,
+ 0x38c407,
+ 0x35aa47,
+ 0x2bbbc2,
+ 0x209703,
+ 0x20e602,
+ 0x200c82,
+ 0x200442,
+ 0x2013c2,
+ 0x205ec2,
+ 0x209842,
+ 0x2a80c5,
+ 0x320885,
+ 0x99c2,
+ 0x32403,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x12083,
+ 0x1ec1,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x244183,
+ 0x205503,
+ 0x200983,
+ 0x219503,
+ 0x3b819d06,
+ 0x13f443,
+ 0x7df85,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x4a82,
+ 0x16d208,
+ 0x44e04,
+ 0xdb085,
+ 0x205702,
+ 0x26f544,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x2358c3,
+ 0x2a9305,
+ 0x244183,
+ 0x206343,
+ 0x205503,
+ 0x21c2c3,
+ 0x200983,
+ 0x214843,
+ 0x2387c3,
+ 0x25ed03,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2099c2,
+ 0x200983,
+ 0x16d208,
+ 0x2e9dc3,
+ 0x16d208,
+ 0x200c03,
+ 0x2a84c3,
+ 0x22fd84,
+ 0x232403,
+ 0x2e9dc3,
+ 0x202bc2,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x202bc2,
+ 0x227f83,
+ 0x205503,
+ 0x200983,
+ 0x2e87c3,
+ 0x214843,
+ 0x205702,
+ 0x2099c2,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x264a85,
+ 0xe4886,
+ 0x25ef44,
+ 0x20b0c2,
+ 0x16d208,
+ 0x205702,
+ 0x1d848,
+ 0x1b4183,
+ 0x2099c2,
+ 0x3fc91386,
+ 0x1320c4,
+ 0xd95cb,
+ 0x13eec6,
+ 0x9807,
+ 0x232403,
+ 0x47208,
+ 0x2e9dc3,
+ 0xb9b45,
+ 0x13fb84,
+ 0x260f83,
+ 0x4ce87,
+ 0xd78c4,
+ 0x205503,
+ 0x7f1c4,
+ 0x200983,
+ 0x2ed844,
+ 0xd9388,
+ 0x125c86,
+ 0x82b48,
+ 0x6cf05,
+ 0x1fa49,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x204e83,
+ 0x200983,
+ 0x2ec883,
+ 0x20b0c2,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x24a5c3,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2d5f04,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x264a86,
+ 0x232403,
+ 0x2e9dc3,
+ 0x176e43,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x9807,
+ 0x16d208,
+ 0x2e9dc3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x426a84c3,
+ 0x232403,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x205702,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200442,
+ 0x200983,
+ 0x316e87,
+ 0x33e6cb,
+ 0x22d703,
+ 0x241608,
+ 0x3b1547,
+ 0x20a7c6,
+ 0x2c2c45,
+ 0x372349,
+ 0x209488,
+ 0x360d49,
+ 0x38f790,
+ 0x360d4b,
+ 0x39e189,
+ 0x201b03,
+ 0x20fb89,
+ 0x230f06,
+ 0x230f0c,
+ 0x326008,
+ 0x3b4f08,
+ 0x34af09,
+ 0x2905ce,
+ 0x2dd9cb,
+ 0x2f364c,
+ 0x2030c3,
+ 0x263d0c,
+ 0x207089,
+ 0x2fee47,
+ 0x23234c,
+ 0x3a89ca,
+ 0x2030c4,
+ 0x2d084d,
+ 0x263bc8,
+ 0x20cf8d,
+ 0x273846,
+ 0x28decb,
+ 0x283349,
+ 0x3b8b87,
+ 0x32fd06,
+ 0x330f89,
+ 0x351b8a,
+ 0x30b148,
+ 0x2ec484,
+ 0x2fba07,
+ 0x34f707,
+ 0x2bab04,
+ 0x37b5c4,
+ 0x22a749,
+ 0x281d49,
+ 0x22ae48,
+ 0x210785,
+ 0x3b4005,
+ 0x20db86,
+ 0x2d0709,
+ 0x24588d,
+ 0x2f30c8,
+ 0x20da87,
+ 0x2c2cc8,
+ 0x2e1886,
+ 0x38b6c4,
+ 0x3523c5,
+ 0x202986,
+ 0x204b04,
+ 0x206f87,
+ 0x20b8ca,
+ 0x212244,
+ 0x2157c6,
+ 0x216a09,
+ 0x216a0f,
+ 0x21788d,
+ 0x2184c6,
+ 0x21d450,
+ 0x21d846,
+ 0x21df87,
+ 0x21e4c7,
+ 0x21e4cf,
+ 0x21f6c9,
+ 0x224c46,
+ 0x225347,
+ 0x225348,
+ 0x225809,
+ 0x246088,
+ 0x2e52c7,
+ 0x20cc83,
+ 0x372986,
+ 0x3ba948,
+ 0x29088a,
+ 0x213c09,
+ 0x2095c3,
+ 0x38c246,
+ 0x25f64a,
+ 0x29e587,
+ 0x2fec8a,
+ 0x313d4e,
+ 0x21f806,
+ 0x2a8587,
+ 0x20e006,
+ 0x207146,
+ 0x37de0b,
+ 0x20414a,
+ 0x317f0d,
+ 0x216287,
+ 0x33ce88,
+ 0x33ce89,
+ 0x33ce8f,
+ 0x2b838c,
+ 0x27b289,
+ 0x2e6a0e,
+ 0x3b098a,
+ 0x2ba246,
+ 0x2f4586,
+ 0x30b58c,
+ 0x30ce8c,
+ 0x30dc08,
+ 0x3439c7,
+ 0x2b8c45,
+ 0x351e04,
+ 0x33c90e,
+ 0x228d04,
+ 0x351747,
+ 0x26030a,
+ 0x362554,
+ 0x36dd8f,
+ 0x21e688,
+ 0x372848,
+ 0x35040d,
+ 0x35040e,
+ 0x376ec9,
+ 0x3a8ec8,
+ 0x3a8ecf,
+ 0x23204c,
+ 0x23204f,
+ 0x233007,
+ 0x236dca,
+ 0x2435cb,
+ 0x238508,
+ 0x239cc7,
+ 0x3690cd,
+ 0x250406,
+ 0x2d0a06,
+ 0x23c149,
+ 0x394648,
+ 0x242088,
+ 0x24208e,
+ 0x2b5007,
+ 0x243885,
+ 0x244bc5,
+ 0x2063c4,
+ 0x20aa86,
+ 0x22ad48,
+ 0x202203,
+ 0x2ca10e,
+ 0x369488,
+ 0x2a2fcb,
+ 0x200dc7,
+ 0x3a4045,
+ 0x22e206,
+ 0x2aa0c7,
+ 0x333d08,
+ 0x26cd09,
+ 0x292e45,
+ 0x284788,
+ 0x212c06,
+ 0x38ad4a,
+ 0x33c809,
+ 0x232409,
+ 0x23240b,
+ 0x38dc48,
+ 0x2ba9c9,
+ 0x210846,
+ 0x22eb8a,
+ 0x2dc80a,
+ 0x236fcc,
+ 0x3a6687,
+ 0x32c38a,
+ 0x26ea8b,
+ 0x26ea99,
+ 0x3b6a88,
+ 0x264b05,
+ 0x2c6086,
+ 0x211e49,
+ 0x390746,
+ 0x28550a,
+ 0x209686,
+ 0x202644,
+ 0x2c620d,
+ 0x202647,
+ 0x211149,
+ 0x246385,
+ 0x2464c8,
+ 0x246fc9,
+ 0x247784,
+ 0x248387,
+ 0x248388,
+ 0x248c87,
+ 0x261908,
+ 0x24d487,
+ 0x26c645,
+ 0x25488c,
+ 0x2550c9,
+ 0x2bc00a,
+ 0x3937c9,
+ 0x20fc89,
+ 0x275a0c,
+ 0x25774b,
+ 0x257ec8,
+ 0x259048,
+ 0x25c404,
+ 0x2810c8,
+ 0x283c89,
+ 0x3a8a87,
+ 0x216c46,
+ 0x2835c7,
+ 0x2dcac9,
+ 0x26e6cb,
+ 0x319407,
+ 0x200a07,
+ 0x22b587,
+ 0x20cf04,
+ 0x20cf05,
+ 0x29a545,
+ 0x341c0b,
+ 0x39c644,
+ 0x3b2988,
+ 0x26614a,
+ 0x212cc7,
+ 0x2f6707,
+ 0x28bed2,
+ 0x278446,
+ 0x22f706,
+ 0x33c24e,
+ 0x27aa06,
+ 0x292588,
+ 0x29374f,
+ 0x20d348,
+ 0x37f308,
+ 0x30eaca,
+ 0x30ead1,
+ 0x2a0e8e,
+ 0x24dd0a,
+ 0x24dd0c,
+ 0x21e307,
+ 0x3a90d0,
+ 0x200408,
+ 0x2a1085,
+ 0x2aa4ca,
+ 0x204b4c,
+ 0x29518d,
+ 0x2f7e46,
+ 0x2f7e47,
+ 0x2f7e4c,
+ 0x300e4c,
+ 0x3292cc,
+ 0x2873cb,
+ 0x284184,
+ 0x226384,
+ 0x346d89,
+ 0x3050c7,
+ 0x225e49,
+ 0x37e909,
+ 0x39f1c7,
+ 0x3a8846,
+ 0x3a8849,
+ 0x2ad1c3,
+ 0x21c74a,
+ 0x31a287,
+ 0x33eb8b,
+ 0x317d8a,
+ 0x248844,
+ 0x22ba46,
+ 0x27d749,
+ 0x202b84,
+ 0x3affca,
+ 0x348345,
+ 0x2bdd45,
+ 0x2bdd4d,
+ 0x2be08e,
+ 0x28cc05,
+ 0x323906,
+ 0x264687,
+ 0x3870ca,
+ 0x39b686,
+ 0x3616c4,
+ 0x36d747,
+ 0x2c3f0b,
+ 0x2e1947,
+ 0x33fa84,
+ 0x24bb86,
+ 0x24bb8d,
+ 0x21e1cc,
+ 0x2053c6,
+ 0x2f32ca,
+ 0x2e03c6,
+ 0x2ed0c8,
+ 0x377c47,
+ 0x23568a,
+ 0x23d6c6,
+ 0x216183,
+ 0x391586,
+ 0x3ba7c8,
+ 0x29ac8a,
+ 0x275807,
+ 0x275808,
+ 0x281684,
+ 0x24b687,
+ 0x279348,
+ 0x2bd748,
+ 0x27c0c8,
+ 0x38c94a,
+ 0x2da905,
+ 0x2cf0c7,
+ 0x24db53,
+ 0x31e806,
+ 0x266348,
+ 0x221a09,
+ 0x240c48,
+ 0x203d0b,
+ 0x2cb608,
+ 0x2a5f44,
+ 0x32ec06,
+ 0x30bac6,
+ 0x3027c9,
+ 0x2c3dc7,
+ 0x254988,
+ 0x28af06,
+ 0x226884,
+ 0x2cb8c5,
+ 0x2c55c8,
+ 0x2c5bca,
+ 0x2c5e88,
+ 0x2cbf86,
+ 0x29944a,
+ 0x2ac808,
+ 0x2cf788,
+ 0x2d18c8,
+ 0x2d1f06,
+ 0x2d3e06,
+ 0x38e18c,
+ 0x2d43d0,
+ 0x27d2c5,
+ 0x20d148,
+ 0x301950,
+ 0x20d150,
+ 0x38f60e,
+ 0x38de0e,
+ 0x38de14,
+ 0x32fe8f,
+ 0x330246,
+ 0x332d51,
+ 0x33d213,
+ 0x33d688,
+ 0x3b3445,
+ 0x241b48,
+ 0x386245,
+ 0x329a8c,
+ 0x291549,
+ 0x228b49,
+ 0x3201c7,
+ 0x236b89,
+ 0x380887,
+ 0x2f6146,
+ 0x3521c7,
+ 0x269c45,
+ 0x2120c3,
+ 0x2023c9,
+ 0x221cc9,
+ 0x376e43,
+ 0x27f384,
+ 0x32a20d,
+ 0x206bcf,
+ 0x2268c5,
+ 0x329986,
+ 0x211407,
+ 0x325d87,
+ 0x288786,
+ 0x28878b,
+ 0x2a2405,
+ 0x256786,
+ 0x2f6c07,
+ 0x24e489,
+ 0x3a7486,
+ 0x21d305,
+ 0x22854b,
+ 0x235946,
+ 0x249245,
+ 0x357988,
+ 0x306a88,
+ 0x2c8f0c,
+ 0x2c8f10,
+ 0x2d2409,
+ 0x2ffd07,
+ 0x32840b,
+ 0x2e3b86,
+ 0x2e518a,
+ 0x2e754b,
+ 0x2e794a,
+ 0x2e7bc6,
+ 0x2e8685,
+ 0x319fc6,
+ 0x36c808,
+ 0x32028a,
+ 0x35009c,
+ 0x2ec94c,
+ 0x2ecc48,
+ 0x264a85,
+ 0x34ea07,
+ 0x26bec6,
+ 0x274e05,
+ 0x21afc6,
+ 0x288948,
+ 0x2bc507,
+ 0x2904c8,
+ 0x2a868a,
+ 0x33130c,
+ 0x331589,
+ 0x38b847,
+ 0x2198c4,
+ 0x244c86,
+ 0x37ee8a,
+ 0x37ea05,
+ 0x209f8c,
+ 0x20e648,
+ 0x367388,
+ 0x21a00c,
+ 0x22550c,
+ 0x225a09,
+ 0x225c47,
+ 0x231d4c,
+ 0x23aa84,
+ 0x23c60a,
+ 0x35e6cc,
+ 0x26b28b,
+ 0x242b8b,
+ 0x2efec6,
+ 0x24a107,
+ 0x24c687,
+ 0x3a930f,
+ 0x2f8a51,
+ 0x2d8592,
+ 0x24c68d,
+ 0x24c68e,
+ 0x24c9ce,
+ 0x330048,
+ 0x330052,
+ 0x24fbc8,
+ 0x3b1187,
+ 0x24aeca,
+ 0x3681c8,
+ 0x27a9c5,
+ 0x3b57ca,
+ 0x21dd87,
+ 0x2e36c4,
+ 0x201543,
+ 0x2a57c5,
+ 0x30ed47,
+ 0x2f5007,
+ 0x29538e,
+ 0x3382cd,
+ 0x33af89,
+ 0x222705,
+ 0x35c3c3,
+ 0x3a78c6,
+ 0x36e745,
+ 0x2a3208,
+ 0x205b49,
+ 0x2983c5,
+ 0x3692cf,
+ 0x2d96c7,
+ 0x372285,
+ 0x20178a,
+ 0x2a36c6,
+ 0x2ed249,
+ 0x396ccc,
+ 0x2f51c9,
+ 0x3abdc6,
+ 0x265f4c,
+ 0x322d06,
+ 0x2f7588,
+ 0x2f7786,
+ 0x3b6c06,
+ 0x3b96c4,
+ 0x258243,
+ 0x2a1fca,
+ 0x327191,
+ 0x3a9c0a,
+ 0x27ee85,
+ 0x265047,
+ 0x252207,
+ 0x279444,
+ 0x27944b,
+ 0x3b7bc8,
+ 0x2b7bc6,
+ 0x362b85,
+ 0x38b044,
+ 0x255f09,
+ 0x31ad84,
+ 0x254f07,
+ 0x32f345,
+ 0x32f347,
+ 0x33c485,
+ 0x2a8183,
+ 0x3b1048,
+ 0x33b80a,
+ 0x203043,
+ 0x325f8a,
+ 0x203046,
+ 0x36904f,
+ 0x2b4f89,
+ 0x2ca090,
+ 0x2f1548,
+ 0x2ccc89,
+ 0x2971c7,
+ 0x24bb0f,
+ 0x336244,
+ 0x2d5f84,
+ 0x21d6c6,
+ 0x22f246,
+ 0x25708a,
+ 0x23cc46,
+ 0x2f58c7,
+ 0x300788,
+ 0x300987,
+ 0x301207,
+ 0x30370a,
+ 0x30534b,
+ 0x2f3dc5,
+ 0x2d81c8,
+ 0x21bb03,
+ 0x23800c,
+ 0x36f78f,
+ 0x2b8a4d,
+ 0x2a7147,
+ 0x33b0c9,
+ 0x22bcc7,
+ 0x24a2c8,
+ 0x36274c,
+ 0x2a5e48,
+ 0x250bc8,
+ 0x318ace,
+ 0x32d354,
+ 0x32d864,
+ 0x3475ca,
+ 0x36148b,
+ 0x380944,
+ 0x380949,
+ 0x27bbc8,
+ 0x245345,
+ 0x201d0a,
+ 0x3696c7,
+ 0x26f744,
+ 0x38d2c3,
+ 0x2a84c3,
+ 0x235ac4,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x244183,
+ 0x209703,
+ 0x2d43c6,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x201303,
+ 0x205702,
+ 0x38d2c3,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x235ac4,
+ 0x232403,
+ 0x2e9dc3,
+ 0x244183,
+ 0x2d43c6,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x205702,
+ 0x2bb143,
+ 0x2099c2,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x201ec2,
+ 0x219f02,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x202242,
+ 0x201fc2,
+ 0x3b1384,
+ 0x210444,
+ 0x227382,
+ 0x211cc4,
+ 0x200442,
+ 0x200983,
+ 0x201303,
+ 0x2efec6,
+ 0x212982,
+ 0x202dc2,
+ 0x222f02,
+ 0x44e0d343,
+ 0x4521e303,
+ 0x52d46,
+ 0x52d46,
+ 0x25ef44,
+ 0x204e83,
+ 0x142abca,
+ 0x12778c,
+ 0x102cc,
+ 0x7dd8d,
+ 0x129845,
+ 0x21347,
+ 0x18648,
+ 0x1b887,
+ 0x20348,
+ 0x19d4ca,
+ 0x45ed6a45,
+ 0x12b809,
+ 0xaf848,
+ 0x4a70a,
+ 0x8a64e,
+ 0x1440a4b,
+ 0x1320c4,
+ 0x77848,
+ 0x68bc8,
+ 0x38f47,
+ 0x12807,
+ 0x4efc9,
+ 0x2c07,
+ 0xd4ac8,
+ 0x1318c9,
+ 0x3adc5,
+ 0x124d4e,
+ 0xa8a0d,
+ 0x9688,
+ 0x4622a586,
+ 0x46c2a588,
+ 0x70cc8,
+ 0x117090,
+ 0x5f347,
+ 0x601c7,
+ 0x64547,
+ 0x69447,
+ 0xdb42,
+ 0x190bc7,
+ 0x430c,
+ 0x35fc7,
+ 0xa4246,
+ 0xa4909,
+ 0xa6388,
+ 0x17f42,
+ 0x1fc2,
+ 0xb8fcb,
+ 0x7f247,
+ 0x11809,
+ 0xbb9c9,
+ 0x17e248,
+ 0xafd42,
+ 0x113a49,
+ 0xcdf8a,
+ 0xc9e09,
+ 0xd6fc9,
+ 0xd7ac8,
+ 0xd8a47,
+ 0xda889,
+ 0xde345,
+ 0xde6d0,
+ 0x175b86,
+ 0x192345,
+ 0x5e98d,
+ 0xf986,
+ 0xe9187,
+ 0xed858,
+ 0x1b1a48,
+ 0xb4c8a,
+ 0x1c42,
+ 0x52f4d,
+ 0x27c2,
+ 0x5d306,
+ 0x8d108,
+ 0x86ec8,
+ 0x16d0c9,
+ 0x55b08,
+ 0x5fb4e,
+ 0x1a78c7,
+ 0x19d0d,
+ 0xf2d05,
+ 0x190948,
+ 0x194448,
+ 0xfacc6,
+ 0xc2,
+ 0x125c86,
+ 0x7b02,
+ 0x341,
+ 0x57a07,
+ 0xc8e83,
+ 0x466ee0c4,
+ 0x46a94443,
0x141,
- 0x15c06,
+ 0x10986,
0x141,
0x1,
- 0x15c06,
- 0x8b4c3,
- 0x14e4285,
- 0x24fe44,
- 0x2d0783,
- 0x251304,
- 0x2964c4,
- 0x204ac3,
- 0x222ac5,
- 0x21bd03,
- 0x2202c3,
- 0x370145,
- 0x24abc3,
- 0x466d0783,
- 0x231b83,
- 0x332ec3,
+ 0x10986,
+ 0xc8e83,
+ 0x1596bc5,
+ 0x2030c4,
+ 0x2a84c3,
+ 0x249944,
+ 0x3b1384,
+ 0x205503,
+ 0x2218c5,
+ 0x219503,
+ 0x23e743,
+ 0x373605,
+ 0x25ed03,
+ 0x47ea84c3,
+ 0x232403,
+ 0x2e9dc3,
0x200041,
- 0x20fbc3,
- 0x222044,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x213e83,
- 0x15f048,
- 0x204cc2,
- 0x368883,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x201d42,
- 0x2964c4,
- 0x204303,
- 0x20fbc3,
- 0x204ac3,
- 0x20abc3,
- 0x200383,
- 0x24abc3,
- 0x15f048,
- 0x371182,
- 0xd1c2,
- 0x1491b48,
- 0x10598e,
- 0x47608c42,
- 0x32f9c8,
- 0x233d86,
- 0x210186,
- 0x233707,
- 0x47a00902,
- 0x47f53508,
- 0x20ebca,
- 0x269708,
- 0x201442,
- 0x32f649,
- 0x3a2487,
- 0x218486,
- 0x295ec9,
- 0x247ec4,
- 0x2e4186,
- 0x2e1bc4,
- 0x26bdc4,
- 0x25bf49,
- 0x326286,
- 0x24df85,
- 0x291285,
- 0x390387,
+ 0x209703,
+ 0x210444,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x214843,
+ 0x16d208,
+ 0x205702,
+ 0x38d2c3,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x201fc2,
+ 0x3b1384,
+ 0x244183,
+ 0x209703,
+ 0x205503,
+ 0x204e83,
+ 0x200983,
+ 0x25ed03,
+ 0x16d208,
+ 0x36f502,
+ 0x99c2,
+ 0x1456108,
+ 0x100b4e,
+ 0x48e016c2,
+ 0x31a448,
+ 0x234386,
+ 0x209cc6,
+ 0x233d07,
+ 0x4920c202,
+ 0x49768ec8,
+ 0x20884a,
+ 0x25cc88,
+ 0x200242,
+ 0x31a0c9,
+ 0x2f3e07,
+ 0x216bc6,
+ 0x3b0d89,
+ 0x2cf204,
+ 0x20a6c6,
+ 0x2dbcc4,
+ 0x26ffc4,
+ 0x2544c9,
+ 0x326686,
+ 0x320945,
+ 0x22c445,
+ 0x384e07,
+ 0x2bfb47,
+ 0x28fa44,
+ 0x233f46,
+ 0x2fb005,
+ 0x2fde45,
+ 0x3963c5,
+ 0x3b3dc7,
+ 0x200c05,
+ 0x314b49,
+ 0x312945,
+ 0x333e44,
+ 0x39b5c7,
+ 0x31974e,
+ 0x32e5c9,
+ 0x33c109,
+ 0x3a64c6,
+ 0x23d408,
+ 0x26d98b,
+ 0x2aeecc,
+ 0x37f806,
+ 0x2dd887,
+ 0x20a305,
+ 0x37b5ca,
+ 0x22af49,
+ 0x20bf49,
+ 0x24ff86,
+ 0x2f69c5,
+ 0x27ce45,
+ 0x3490c9,
+ 0x39654b,
+ 0x273346,
+ 0x33a786,
+ 0x202504,
+ 0x28bb86,
+ 0x243908,
+ 0x3ba646,
+ 0x214386,
+ 0x207c08,
+ 0x20bb47,
+ 0x20bd09,
+ 0x20c585,
+ 0x16d208,
+ 0x212784,
+ 0x3ada04,
+ 0x283785,
+ 0x399a49,
+ 0x220f07,
+ 0x220f0b,
+ 0x22394a,
+ 0x227a45,
+ 0x49a08d42,
+ 0x33ea47,
+ 0x49e28908,
+ 0x2afb87,
+ 0x350e85,
+ 0x20c1ca,
+ 0x99c2,
+ 0x34dfcb,
+ 0x24d5ca,
+ 0x221bc6,
+ 0x282bc3,
+ 0x28e34d,
+ 0x3492cc,
+ 0x35084d,
+ 0x245c45,
+ 0x32ae05,
+ 0x202247,
+ 0x3aba49,
+ 0x208746,
+ 0x23cac5,
+ 0x2d29c8,
+ 0x28ba83,
+ 0x2dfac8,
+ 0x28ba88,
0x2c3747,
- 0x2911c4,
- 0x233946,
- 0x2ffb45,
- 0x367445,
- 0x302505,
- 0x392307,
- 0x26ae05,
- 0x315e49,
- 0x32d305,
- 0x307184,
- 0x38d347,
- 0x32ecce,
- 0x330a09,
- 0x358849,
- 0x3ac9c6,
- 0x2fe248,
- 0x2b520b,
- 0x2e3b0c,
- 0x2898c6,
- 0x2076c7,
- 0x37b305,
- 0x32d98a,
- 0x237a09,
- 0x3aa989,
- 0x257646,
- 0x2fb805,
- 0x2aabc5,
- 0x348f89,
- 0x30268b,
- 0x280f46,
- 0x338346,
- 0x20a904,
- 0x2908c6,
- 0x226a08,
- 0x3abc06,
- 0x20c5c6,
- 0x206188,
- 0x207f47,
- 0x208649,
- 0x209705,
- 0x15f048,
- 0x216e84,
- 0x33d5c4,
- 0x369f05,
- 0x204f49,
- 0x222347,
- 0x22234b,
- 0x223e4a,
- 0x228485,
- 0x4820a002,
- 0x238987,
- 0x48629248,
- 0x27be07,
- 0x2bf945,
- 0x3aac0a,
- 0xd1c2,
- 0x38740b,
- 0x25470a,
- 0x222dc6,
- 0x395e03,
- 0x29538d,
- 0x3582cc,
- 0x37f24d,
- 0x381085,
- 0x227dc5,
- 0x2601c7,
- 0x209c09,
- 0x20eac6,
- 0x383405,
- 0x2d8008,
- 0x2907c3,
- 0x2ec708,
- 0x2907c8,
- 0x2c6c47,
- 0x3b2448,
- 0x39b7c9,
- 0x2c9747,
- 0x238187,
- 0x302b88,
- 0x38ca44,
- 0x38ca47,
- 0x272648,
- 0x2024c6,
- 0x206fcf,
- 0x2118c7,
- 0x2e7a86,
- 0x23e2c5,
- 0x223783,
- 0x365a47,
- 0x36da03,
- 0x250446,
- 0x251c46,
- 0x252a06,
- 0x296e85,
- 0x26ea03,
- 0x388a48,
- 0x370c89,
- 0x37ffcb,
- 0x252b88,
- 0x254285,
- 0x256405,
- 0x48aabc02,
- 0x359a49,
- 0x296547,
- 0x25f185,
- 0x25be47,
- 0x25dd86,
- 0x363f05,
- 0x36fe0b,
- 0x2640c4,
- 0x2692c5,
- 0x269407,
- 0x27b786,
- 0x27bbc5,
- 0x288487,
- 0x288d47,
- 0x2d1784,
- 0x28e04a,
- 0x28e508,
- 0x2c2149,
- 0x3648c5,
- 0x2951c6,
- 0x226bca,
- 0x387646,
- 0x26f5c7,
- 0x2c1e0d,
- 0x2a1f09,
- 0x3597c5,
- 0x339dc7,
- 0x368388,
- 0x26a888,
- 0x314d07,
- 0x20b246,
- 0x217807,
- 0x221143,
- 0x33c004,
- 0x3607c5,
- 0x38dcc7,
- 0x391d09,
- 0x22a8c8,
- 0x33fac5,
- 0x242844,
- 0x2f5bc5,
- 0x38174d,
- 0x203742,
- 0x386ac6,
- 0x377a06,
- 0x2c8bca,
- 0x37e686,
- 0x38b5c5,
- 0x368fc5,
- 0x368fc7,
- 0x3a010c,
- 0x279b0a,
- 0x290586,
- 0x225085,
- 0x290706,
- 0x290a47,
- 0x292846,
- 0x296d8c,
- 0x296009,
- 0x48e16087,
- 0x299745,
- 0x299746,
- 0x299d08,
- 0x236785,
- 0x2a8b45,
- 0x2a9548,
- 0x2a974a,
- 0x49258142,
- 0x4960c2c2,
- 0x2e8f85,
- 0x28b9c3,
- 0x22b108,
- 0x241d03,
- 0x2a99c4,
- 0x2f350b,
- 0x34ef48,
- 0x305148,
- 0x49b67ec9,
- 0x2af389,
- 0x2afac6,
- 0x2b0a88,
- 0x2b0c89,
- 0x2b1786,
- 0x2b1905,
- 0x372a86,
- 0x2b1e49,
- 0x319d87,
- 0x25c446,
- 0x233147,
- 0x20e947,
- 0x362e04,
- 0x49f453c9,
- 0x2cd008,
- 0x353408,
- 0x383d07,
- 0x2c8686,
- 0x235389,
- 0x210147,
- 0x34970a,
- 0x330d48,
- 0x349407,
- 0x3b1546,
- 0x2e834a,
- 0x2733c8,
- 0x30de45,
- 0x36dac5,
- 0x2f9807,
- 0x371d49,
- 0x3097cb,
- 0x31e0c8,
- 0x32d389,
- 0x253487,
- 0x2bad4c,
- 0x2bb74c,
- 0x2bba4a,
- 0x2bbccc,
- 0x2c5c08,
- 0x2c5e08,
- 0x2c6004,
- 0x2c63c9,
- 0x2c6609,
- 0x2c684a,
- 0x2c6ac9,
- 0x2c6e07,
- 0x3a448c,
- 0x24b946,
- 0x35d588,
- 0x387706,
- 0x330c06,
- 0x3596c7,
- 0x238ec8,
- 0x2618cb,
- 0x303207,
- 0x359c49,
- 0x251489,
- 0x25bbc7,
- 0x2e1e04,
- 0x3643c7,
- 0x2e1246,
- 0x214046,
- 0x2eb045,
- 0x2c7408,
- 0x2976c4,
- 0x2976c6,
- 0x2799cb,
- 0x212cc9,
- 0x209e06,
- 0x20c709,
- 0x392486,
- 0x3aae08,
- 0x214183,
- 0x2fb985,
- 0x215a09,
- 0x224085,
- 0x2f9644,
- 0x27acc6,
- 0x2ed005,
- 0x2f7346,
- 0x309ec7,
- 0x328dc6,
- 0x3a174b,
- 0x22c447,
- 0x234886,
- 0x3742c6,
- 0x390446,
- 0x291189,
- 0x240aca,
- 0x2b8ec5,
- 0x21898d,
- 0x2a9846,
- 0x2babc6,
- 0x2ded86,
- 0x2f31c5,
- 0x2e4d87,
- 0x29fa87,
- 0x22bd4e,
- 0x20fbc3,
- 0x2c8649,
- 0x263709,
- 0x32dd87,
- 0x2804c7,
- 0x2a2ec5,
- 0x343f05,
- 0x4a23734f,
- 0x2d10c7,
- 0x2d1288,
- 0x2d25c4,
- 0x2d2e86,
- 0x4a64db02,
- 0x2d7346,
- 0x201686,
- 0x2638ce,
- 0x2ec54a,
- 0x28b6c6,
- 0x22d88a,
- 0x209a09,
- 0x323d05,
- 0x393948,
- 0x3aef46,
- 0x359508,
- 0x2392c8,
- 0x34434b,
- 0x233805,
- 0x26ae88,
- 0x2062cc,
- 0x2bf807,
- 0x252546,
- 0x281fc8,
- 0x2253c8,
- 0x4aa09282,
- 0x25604b,
- 0x37b489,
- 0x2cf2c9,
- 0x2f02c7,
- 0x3b3648,
- 0x4ae289c8,
- 0x20e64b,
- 0x37dd09,
- 0x33f58d,
- 0x27d648,
- 0x290188,
- 0x4b201882,
- 0x3b2f44,
- 0x4b60dc42,
- 0x2f9486,
- 0x4ba038c2,
- 0x2448ca,
- 0x210546,
- 0x22d208,
- 0x289e88,
- 0x2e4086,
- 0x2eb5c6,
- 0x2f7106,
- 0x2f1b45,
- 0x23c804,
- 0x4be1de04,
- 0x20ae86,
- 0x29a787,
- 0x4c2f7d07,
- 0x2dc60b,
- 0x32f089,
- 0x227e0a,
- 0x263144,
- 0x369108,
- 0x25c20d,
- 0x2f1509,
- 0x2f1748,
- 0x2f2009,
- 0x2f39c4,
- 0x20ce44,
- 0x283cc5,
- 0x317b0b,
- 0x34eec6,
- 0x33c645,
- 0x21fb89,
- 0x233a08,
- 0x263844,
- 0x32db09,
- 0x208f45,
- 0x2c3788,
- 0x238847,
- 0x358c48,
- 0x284e86,
- 0x22b987,
- 0x2984c9,
- 0x311a89,
- 0x372545,
- 0x295645,
- 0x4c626a82,
- 0x306f44,
- 0x30ce05,
- 0x2c1846,
- 0x327285,
- 0x2b4707,
- 0x20af85,
- 0x27b7c4,
- 0x3aca86,
- 0x383487,
- 0x232106,
- 0x21e105,
- 0x202608,
- 0x233f85,
- 0x205d07,
- 0x20bc49,
- 0x212e0a,
- 0x2494c7,
- 0x2494cc,
- 0x24df46,
- 0x2e9ac9,
- 0x230505,
- 0x2366c8,
- 0x210c03,
- 0x210c05,
- 0x2f7b45,
- 0x26e707,
- 0x4ca27202,
- 0x227a07,
- 0x2e5206,
- 0x345306,
- 0x2e62c6,
- 0x225306,
- 0x2091c8,
- 0x35b805,
- 0x2e7b47,
- 0x2e7b4d,
- 0x21b083,
- 0x21f305,
- 0x21b087,
- 0x26b308,
- 0x21ac45,
- 0x2281c8,
- 0x2ab9c6,
- 0x32b247,
- 0x2c7bc5,
- 0x233886,
- 0x2cfac5,
- 0x22dfca,
- 0x2efec6,
- 0x25dbc7,
- 0x2bc605,
- 0x2f44c7,
- 0x2f8904,
- 0x2f95c6,
- 0x3624c5,
- 0x32608b,
- 0x2e10c9,
- 0x23d74a,
- 0x3725c8,
- 0x3007c8,
- 0x300f0c,
- 0x306b47,
- 0x308c48,
- 0x30aa88,
- 0x30dac5,
- 0x338b4a,
- 0x33aa09,
- 0x4ce00202,
- 0x200206,
- 0x20d684,
- 0x2ef889,
- 0x275d49,
- 0x27b1c7,
- 0x2fa547,
- 0x2b7c09,
- 0x331308,
- 0x33130f,
- 0x2dfa86,
- 0x2db10b,
- 0x361545,
- 0x361547,
- 0x374c89,
- 0x2171c6,
- 0x32da87,
- 0x2dde85,
- 0x22f544,
- 0x26e186,
- 0x211984,
- 0x2e6c47,
- 0x34c5c8,
- 0x4d2fb708,
- 0x2fbe85,
- 0x2fbfc7,
- 0x245709,
- 0x208444,
- 0x208448,
- 0x4d7190c8,
- 0x23cdc4,
- 0x230c88,
- 0x3396c4,
- 0x220389,
- 0x333105,
- 0x4da05bc2,
- 0x2dfac5,
- 0x2e6845,
- 0x271b88,
- 0x232847,
- 0x4de03382,
- 0x30cbc5,
- 0x2d4e86,
- 0x27a786,
- 0x306f08,
- 0x318308,
- 0x327246,
- 0x32e246,
- 0x249009,
- 0x345246,
- 0x21708b,
- 0x2a12c5,
- 0x204686,
- 0x382588,
- 0x3152c6,
- 0x298e46,
- 0x21b94a,
- 0x22f9ca,
- 0x2e8245,
- 0x35b8c7,
- 0x2f0cc6,
- 0x4e206602,
- 0x21b1c7,
- 0x2a9085,
- 0x226b44,
- 0x226b45,
- 0x263046,
- 0x27a447,
- 0x20d405,
- 0x22fb44,
- 0x365008,
- 0x298f05,
- 0x33c8c7,
- 0x39fa85,
- 0x22df05,
- 0x256b44,
- 0x28fbc9,
- 0x2ff988,
- 0x2ecec6,
- 0x2de9c6,
- 0x2b9d46,
- 0x4e700448,
- 0x300647,
- 0x3009cd,
- 0x30120c,
- 0x301809,
- 0x301a49,
- 0x4eb546c2,
- 0x3a5503,
- 0x20b303,
- 0x2e1305,
- 0x38ddca,
- 0x327106,
- 0x307905,
- 0x30a084,
- 0x30a08b,
- 0x31bdcc,
- 0x31c5cc,
- 0x31c8d5,
+ 0x309708,
+ 0x3a7209,
+ 0x2cc447,
+ 0x33e247,
+ 0x396a48,
+ 0x251f44,
+ 0x251f47,
+ 0x273748,
+ 0x3a3ac6,
+ 0x205f4f,
+ 0x211a07,
+ 0x2e5446,
+ 0x225d85,
+ 0x223083,
+ 0x371847,
+ 0x36c043,
+ 0x248e46,
+ 0x24aa86,
+ 0x24b286,
+ 0x290c05,
+ 0x261903,
+ 0x388208,
+ 0x36f009,
+ 0x38224b,
+ 0x24b408,
+ 0x24d145,
+ 0x24f605,
+ 0x4a248902,
+ 0x352289,
+ 0x3b1407,
+ 0x256805,
+ 0x2543c7,
+ 0x2559c6,
+ 0x365a45,
+ 0x36e58b,
+ 0x257ec4,
+ 0x25c845,
+ 0x25c987,
+ 0x272cc6,
+ 0x273105,
+ 0x2812c7,
+ 0x281a07,
+ 0x2cd884,
+ 0x289c0a,
+ 0x28a0c8,
+ 0x3b8209,
+ 0x241e85,
+ 0x207886,
+ 0x243aca,
+ 0x22c346,
+ 0x261e07,
+ 0x3b7ecd,
+ 0x29c809,
+ 0x38d185,
+ 0x314187,
+ 0x332288,
+ 0x33d848,
+ 0x3b3107,
+ 0x379d86,
+ 0x215dc7,
+ 0x249f43,
+ 0x341c04,
+ 0x363485,
+ 0x392707,
+ 0x395dc9,
+ 0x22be48,
+ 0x344c45,
+ 0x23cd84,
+ 0x246245,
+ 0x24b80d,
+ 0x200f82,
+ 0x373746,
+ 0x25d246,
+ 0x2c578a,
+ 0x376546,
+ 0x37edc5,
+ 0x33df85,
+ 0x33df87,
+ 0x38ab8c,
+ 0x270b4a,
+ 0x28b846,
+ 0x2b9645,
+ 0x28b9c6,
+ 0x28bd07,
+ 0x28e186,
+ 0x290b0c,
+ 0x3b0ec9,
+ 0x4a610e07,
+ 0x293b05,
+ 0x293b06,
+ 0x293ec8,
+ 0x23b705,
+ 0x2a2c85,
+ 0x2a3848,
+ 0x2a3a4a,
+ 0x4aa4ecc2,
+ 0x4ae0ee02,
+ 0x2e6705,
+ 0x284f83,
+ 0x3adf08,
+ 0x204043,
+ 0x2a3cc4,
+ 0x2ed38b,
+ 0x26dd48,
+ 0x2e4d48,
+ 0x4b349909,
+ 0x2a7dc9,
+ 0x2a8906,
+ 0x2a9d48,
+ 0x2a9f49,
+ 0x2aab46,
+ 0x2aacc5,
+ 0x3843c6,
+ 0x2ab5c9,
+ 0x331f47,
+ 0x23ea86,
+ 0x233747,
+ 0x2085c7,
+ 0x32c8c4,
+ 0x4b7b1d49,
+ 0x2cab88,
+ 0x368dc8,
+ 0x383447,
+ 0x2c5246,
+ 0x226ac9,
+ 0x209c87,
+ 0x32e90a,
+ 0x38c588,
+ 0x3af5c7,
+ 0x3b9786,
+ 0x24f38a,
+ 0x262708,
+ 0x2dccc5,
+ 0x226645,
+ 0x2ee487,
+ 0x2f7349,
+ 0x36510b,
+ 0x315008,
+ 0x3129c9,
+ 0x24bfc7,
+ 0x2b550c,
+ 0x2b5c4c,
+ 0x2b5f4a,
+ 0x2b61cc,
+ 0x2c2708,
+ 0x2c2908,
+ 0x2c2b04,
+ 0x2c2ec9,
+ 0x2c3109,
+ 0x2c334a,
+ 0x2c35c9,
+ 0x2c3907,
+ 0x3af00c,
+ 0x241146,
+ 0x34acc8,
+ 0x22c406,
+ 0x32e7c6,
+ 0x38d087,
+ 0x3b3288,
+ 0x39034b,
+ 0x2afa47,
+ 0x352489,
+ 0x3445c9,
+ 0x249ac7,
+ 0x278a04,
+ 0x265187,
+ 0x2db346,
+ 0x214a06,
+ 0x2f3485,
+ 0x2a5888,
+ 0x291444,
+ 0x291446,
+ 0x270a0b,
+ 0x21ca49,
+ 0x214b46,
+ 0x21c489,
+ 0x3b3f46,
+ 0x254688,
+ 0x223b83,
+ 0x2f6b45,
+ 0x22edc9,
+ 0x261145,
+ 0x2f9684,
+ 0x272206,
+ 0x231545,
+ 0x228f86,
+ 0x3056c7,
+ 0x26e986,
+ 0x3a304b,
+ 0x22ea87,
+ 0x3379c6,
+ 0x346f06,
+ 0x384ec6,
+ 0x28fa09,
+ 0x2ef14a,
+ 0x2b3505,
+ 0x2170cd,
+ 0x2a3b46,
+ 0x235546,
+ 0x2b4e86,
+ 0x2ed045,
+ 0x2de9c7,
+ 0x2e14c7,
+ 0x3581ce,
+ 0x209703,
+ 0x2c5209,
+ 0x391dc9,
+ 0x37b9c7,
+ 0x358f07,
+ 0x29d645,
+ 0x27ec45,
+ 0x4ba2a88f,
+ 0x2ccec7,
+ 0x2cd088,
+ 0x2cd484,
+ 0x2cde46,
+ 0x4be44c42,
+ 0x2d2186,
+ 0x2d43c6,
+ 0x391f8e,
+ 0x2df90a,
+ 0x357b06,
+ 0x285eca,
+ 0x203549,
+ 0x324105,
+ 0x398008,
+ 0x3b5606,
+ 0x38cec8,
+ 0x26f088,
+ 0x28eb8b,
+ 0x233e05,
+ 0x200c88,
+ 0x207d4c,
+ 0x2bd507,
+ 0x24ae06,
+ 0x2e28c8,
+ 0x20a948,
+ 0x4c208442,
+ 0x20a48b,
+ 0x282549,
+ 0x329f09,
+ 0x3bb287,
+ 0x20f7c8,
+ 0x4c61bf48,
+ 0x3511cb,
+ 0x37e0c9,
+ 0x234fcd,
+ 0x2750c8,
+ 0x224a48,
+ 0x4ca03ec2,
+ 0x20e3c4,
+ 0x4ce1a2c2,
+ 0x2f4ec6,
+ 0x4d2004c2,
+ 0x3813ca,
+ 0x21c346,
+ 0x285908,
+ 0x284488,
+ 0x2af446,
+ 0x22d8c6,
+ 0x2f12c6,
+ 0x2a3185,
+ 0x238c04,
+ 0x4d61e144,
+ 0x205146,
+ 0x272707,
+ 0x4dae8bc7,
+ 0x35490b,
+ 0x319b09,
+ 0x32ae4a,
+ 0x391804,
+ 0x33e0c8,
+ 0x23e84d,
+ 0x2eb709,
+ 0x2eb948,
+ 0x2ebfc9,
+ 0x2ed844,
+ 0x243484,
+ 0x27c885,
+ 0x317b4b,
+ 0x26dcc6,
+ 0x3424c5,
+ 0x250149,
+ 0x234008,
+ 0x2047c4,
+ 0x37b749,
+ 0x208105,
+ 0x2bfb88,
+ 0x33e907,
+ 0x33c508,
+ 0x27d946,
+ 0x35e387,
+ 0x292349,
+ 0x2286c9,
+ 0x2492c5,
+ 0x334ec5,
+ 0x4de2d902,
+ 0x333c04,
+ 0x2049c5,
+ 0x32c146,
+ 0x318385,
+ 0x2b1ac7,
+ 0x205245,
+ 0x272d04,
+ 0x3a6586,
+ 0x23cb47,
+ 0x232986,
+ 0x2dca05,
+ 0x203188,
+ 0x234585,
+ 0x2062c7,
+ 0x20f1c9,
+ 0x21cb8a,
+ 0x2e1b87,
+ 0x2e1b8c,
+ 0x320906,
+ 0x343cc9,
+ 0x23b385,
+ 0x23b648,
+ 0x210803,
+ 0x210805,
+ 0x2e8a05,
+ 0x261607,
+ 0x4e20c002,
+ 0x22d0c7,
+ 0x2e4f06,
+ 0x342786,
+ 0x2e7d06,
+ 0x20a886,
+ 0x208388,
+ 0x241c85,
+ 0x2e5507,
+ 0x2e550d,
+ 0x201543,
+ 0x21ec05,
+ 0x201547,
+ 0x22d408,
+ 0x201105,
+ 0x218c88,
+ 0x36c0c6,
+ 0x32b9c7,
+ 0x2c4785,
+ 0x233e86,
+ 0x26f5c5,
+ 0x21390a,
+ 0x2f2e06,
+ 0x377ac7,
+ 0x2ca505,
+ 0x3612c7,
+ 0x36d6c4,
+ 0x2f9606,
+ 0x2fb3c5,
+ 0x32648b,
+ 0x2db1c9,
+ 0x2bb24a,
+ 0x249348,
+ 0x301d08,
+ 0x304a4c,
+ 0x306287,
+ 0x3073c8,
+ 0x310a48,
+ 0x31e945,
+ 0x34020a,
+ 0x35c3c9,
+ 0x4e600802,
+ 0x200806,
+ 0x219d04,
+ 0x2ea849,
+ 0x220b49,
+ 0x269287,
+ 0x294947,
+ 0x37e789,
+ 0x38cb48,
+ 0x38cb4f,
+ 0x315d06,
+ 0x2d670b,
+ 0x36e8c5,
+ 0x36e8c7,
+ 0x385889,
+ 0x212ac6,
+ 0x37b6c7,
+ 0x2d8905,
+ 0x2303c4,
+ 0x261006,
+ 0x211ac4,
+ 0x2ce4c7,
+ 0x307048,
+ 0x4eaf68c8,
+ 0x2f7085,
+ 0x2f71c7,
+ 0x236549,
+ 0x23e284,
+ 0x23e288,
+ 0x4ee2b888,
+ 0x279444,
+ 0x231388,
+ 0x32fdc4,
+ 0x3ab849,
+ 0x2173c5,
+ 0x4f20b0c2,
+ 0x315d45,
+ 0x2e4345,
+ 0x251288,
+ 0x232e47,
+ 0x4f601442,
+ 0x204785,
+ 0x2cf606,
+ 0x24b106,
+ 0x333bc8,
+ 0x302108,
+ 0x318346,
+ 0x327f06,
+ 0x2e2e49,
+ 0x3426c6,
+ 0x21298b,
+ 0x296305,
+ 0x368106,
+ 0x377088,
+ 0x250506,
+ 0x292cc6,
+ 0x21914a,
+ 0x23084a,
+ 0x245005,
+ 0x241d47,
+ 0x308786,
+ 0x4fa01682,
+ 0x201687,
+ 0x238705,
+ 0x243a44,
+ 0x243a45,
+ 0x391706,
+ 0x26a447,
+ 0x219a85,
+ 0x220c04,
+ 0x2c7e88,
+ 0x292d85,
+ 0x333a47,
+ 0x3a1645,
+ 0x213845,
+ 0x256e04,
+ 0x287609,
+ 0x2fae48,
+ 0x2e0286,
+ 0x2d9d06,
+ 0x2b6e46,
+ 0x4fefbc88,
+ 0x2fbe87,
+ 0x2fc0cd,
+ 0x2fcb4c,
+ 0x2fd149,
+ 0x2fd389,
+ 0x5035b2c2,
+ 0x3a8603,
+ 0x207943,
+ 0x2db405,
+ 0x39280a,
+ 0x327dc6,
+ 0x302385,
+ 0x305884,
+ 0x30588b,
+ 0x31b70c,
+ 0x31c14c,
+ 0x31c455,
0x31d74d,
- 0x31f44f,
- 0x31f812,
- 0x31fc8f,
- 0x320052,
- 0x3204d3,
- 0x32098d,
- 0x320f4d,
- 0x3212ce,
- 0x322a8e,
- 0x3232cc,
- 0x32368c,
- 0x323acb,
- 0x323e4e,
- 0x324f92,
- 0x326ecc,
- 0x327610,
- 0x3335d2,
- 0x3347cc,
- 0x334e8d,
- 0x3351cc,
- 0x337611,
- 0x3384cd,
- 0x33ac4d,
- 0x33b24a,
- 0x33b4cc,
- 0x33bdcc,
- 0x33c34c,
- 0x33cbcc,
- 0x33fc53,
- 0x340450,
- 0x340850,
- 0x340e4d,
- 0x34144c,
- 0x342209,
- 0x342f0d,
- 0x343253,
- 0x344911,
- 0x344d53,
- 0x34560f,
- 0x3459cc,
- 0x345ccf,
- 0x34608d,
- 0x34668f,
- 0x346a50,
- 0x3474ce,
- 0x34ac8e,
- 0x34b590,
- 0x34ca8d,
- 0x34d40e,
- 0x34d78c,
- 0x34e753,
- 0x351e0e,
- 0x352390,
- 0x352791,
- 0x352bcf,
- 0x352f93,
- 0x35424d,
- 0x35458f,
- 0x35494e,
- 0x354fd0,
- 0x3553c9,
- 0x356390,
- 0x356acf,
- 0x35714f,
- 0x357512,
- 0x359e8e,
- 0x35a74d,
- 0x35cc4d,
- 0x35cf8d,
- 0x35f68d,
- 0x35f9cd,
- 0x35fd10,
- 0x36010b,
- 0x36058c,
- 0x36090c,
- 0x360c0c,
- 0x360f0e,
- 0x372c10,
- 0x374452,
- 0x3748cb,
- 0x374ece,
- 0x37524e,
- 0x375ace,
- 0x37604b,
- 0x4ef76396,
- 0x37724d,
- 0x378354,
- 0x378e0d,
- 0x37ae55,
- 0x37c04d,
- 0x37c9cf,
- 0x37d20f,
- 0x38028f,
- 0x38064e,
- 0x380acd,
- 0x382f11,
- 0x385ecc,
- 0x3861cc,
- 0x3864cb,
- 0x386c4c,
- 0x38824f,
- 0x388612,
- 0x388fcd,
- 0x389f8c,
- 0x38a40c,
- 0x38a70d,
- 0x38aa4f,
- 0x38ae0e,
- 0x38da8c,
- 0x38e04d,
- 0x38e38b,
- 0x38ee8c,
- 0x38f40d,
- 0x38f74e,
- 0x38fac9,
- 0x390c53,
- 0x39118d,
- 0x3914cd,
- 0x391acc,
- 0x391f4e,
- 0x39290f,
- 0x392ccc,
- 0x392fcd,
- 0x39330f,
- 0x3936cc,
- 0x3943cc,
- 0x39484c,
- 0x394b4c,
- 0x39520d,
- 0x395552,
- 0x396c0c,
- 0x396f0c,
- 0x397211,
- 0x39764f,
- 0x397a0f,
- 0x397dd3,
- 0x398a8e,
- 0x398e0f,
- 0x3991cc,
- 0x4f39950e,
- 0x39988f,
- 0x399c56,
- 0x39b312,
- 0x39d64c,
- 0x39e14f,
- 0x39e7cd,
- 0x39eb0f,
- 0x39eecc,
- 0x39f1cd,
- 0x39f50d,
- 0x3a0c4e,
- 0x3a2b8c,
- 0x3a2e8c,
- 0x3a3190,
- 0x3a4991,
- 0x3a4dcb,
- 0x3a510c,
- 0x3a540e,
- 0x3a7051,
- 0x3a748e,
- 0x3a780d,
- 0x3aed0b,
- 0x3afdcf,
- 0x3b09d4,
- 0x2630c2,
- 0x2630c2,
- 0x202583,
- 0x2630c2,
- 0x202583,
- 0x2630c2,
- 0x20ae82,
- 0x372ac5,
- 0x3a6d4c,
- 0x2630c2,
- 0x2630c2,
- 0x20ae82,
- 0x2630c2,
- 0x29a385,
- 0x212e05,
- 0x2630c2,
- 0x2630c2,
- 0x211cc2,
- 0x29a385,
- 0x31e789,
- 0x34460c,
- 0x2630c2,
- 0x2630c2,
- 0x2630c2,
- 0x2630c2,
- 0x372ac5,
- 0x2630c2,
- 0x2630c2,
- 0x2630c2,
- 0x2630c2,
- 0x211cc2,
- 0x31e789,
- 0x2630c2,
- 0x2630c2,
- 0x2630c2,
- 0x212e05,
- 0x2630c2,
- 0x212e05,
- 0x34460c,
- 0x3a6d4c,
- 0x368883,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x204ac3,
- 0x200383,
- 0x1f08,
- 0x15444,
- 0xc1348,
- 0x204cc2,
- 0x5020d1c2,
- 0x243403,
- 0x24c944,
- 0x202743,
- 0x38e8c4,
- 0x22e886,
- 0x213843,
- 0x31aa84,
- 0x288845,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x25084a,
- 0x241f46,
- 0x3755cc,
- 0x15f048,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x22d603,
- 0x201686,
- 0x204ac3,
- 0x200383,
- 0x21aa03,
- 0xaa288,
- 0x3942,
- 0x513856c5,
- 0x2ac47,
- 0xd7a88,
- 0xc0ce,
- 0x8c792,
- 0x16780b,
- 0x516db445,
- 0x51adb44c,
- 0xf207,
- 0x13ecc7,
- 0x1698ca,
- 0x3efd0,
- 0x1acd05,
- 0x16e1cb,
- 0x1672c8,
- 0x13edc7,
- 0x2f64b,
- 0x11dd09,
- 0x150f47,
- 0x1b3c47,
- 0x81187,
- 0x20586,
- 0x94b88,
- 0x52028b86,
- 0xafbcd,
- 0x169290,
- 0x52401742,
- 0xfb48,
- 0x71f47,
- 0x7f149,
- 0x59b46,
- 0x99f08,
- 0x74842,
- 0xa4f4a,
- 0x2d587,
- 0x3b9c7,
- 0xaa689,
- 0xad708,
- 0x15ae05,
- 0x194e8e,
- 0x14d4e,
- 0x26f4f,
- 0x2ccc9,
- 0x4c809,
- 0x77e8b,
- 0x878cf,
- 0x8fdcc,
- 0xadd8b,
- 0xc4d08,
- 0xdc507,
- 0x162908,
- 0xfe04b,
- 0x12a54c,
- 0x141acc,
- 0x147f4c,
- 0x14b0cd,
- 0x17de88,
- 0x42602,
- 0x104389,
- 0x18528b,
- 0xc8886,
- 0x116f8b,
- 0xdd5ca,
- 0xde185,
- 0xe4a90,
- 0x1294c6,
- 0x63c85,
- 0xe6448,
- 0xee547,
- 0xee807,
- 0x5e987,
- 0xf92ca,
- 0xd790a,
- 0x177ac6,
- 0x97ccd,
- 0x1ae208,
- 0x56608,
- 0x56a89,
- 0xb9905,
- 0x19de4c,
- 0x14b2cb,
- 0x171c84,
- 0xff749,
- 0x8146,
- 0x16c2,
- 0x125886,
- 0x10d947,
- 0x6c82,
- 0xcb605,
- 0x29b04,
- 0x701,
- 0x2bc43,
- 0x51fadbc6,
- 0x9a283,
- 0x8a42,
- 0x2d584,
- 0x1442,
- 0x4ae04,
- 0x1342,
- 0x2f82,
- 0x3682,
- 0x1124c2,
- 0xe542,
- 0xdb442,
- 0x2ac2,
- 0x1c402,
- 0x26982,
- 0x4d02,
- 0x3b02,
- 0x34682,
- 0x31b83,
- 0x7d02,
- 0x1c2,
- 0x41c2,
- 0xda42,
- 0x642,
- 0xdc2,
- 0x18d82,
- 0x1a02,
- 0x2282,
- 0x1d42,
- 0x4303,
- 0xb02,
- 0x2f02,
- 0xb5e02,
- 0x1b02,
- 0x5d82,
- 0x32c2,
- 0x73c2,
- 0x17c2,
- 0x1f02,
- 0x173102,
- 0x73fc2,
- 0x5e402,
- 0x4ac3,
- 0x2c2,
- 0x9282,
- 0x1002,
- 0x14602,
- 0x1724c5,
- 0x6ec2,
- 0x1202,
- 0x41703,
- 0x682,
- 0xd42,
- 0x1702,
- 0xe5c2,
- 0x1ac2,
- 0x3382,
- 0x6902,
- 0x16c2,
- 0x73c07,
- 0x213dc3,
- 0x204cc2,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x201d43,
- 0x22d603,
- 0x204ac3,
- 0x20abc3,
- 0x200383,
- 0x29a2c3,
- 0x1a5c3,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x20fbc3,
- 0x204ac3,
- 0x20abc3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x200041,
- 0x20fbc3,
- 0x204ac3,
- 0x2104c3,
- 0x200383,
- 0x368883,
- 0x2d0783,
- 0x231b83,
- 0x20fb43,
- 0x2135c3,
- 0x2300c3,
- 0x287703,
- 0x210503,
- 0x234743,
- 0x332ec3,
- 0x2964c4,
- 0x204ac3,
- 0x200383,
- 0x24abc3,
- 0x200604,
- 0x250c83,
- 0x5283,
- 0x3abd03,
- 0x329b88,
- 0x2e8384,
- 0x2c264a,
- 0x224906,
- 0x10f9c4,
- 0x38c2c7,
- 0x21eeca,
- 0x2df949,
- 0x3a3b07,
- 0x3a7dca,
- 0x368883,
- 0x2e900b,
- 0x303349,
- 0x2b9e45,
- 0x2d7187,
- 0xd1c2,
- 0x2d0783,
- 0x204d07,
- 0x248d45,
- 0x2e1cc9,
- 0x231b83,
- 0x233606,
- 0x2c56c3,
- 0xe1183,
- 0x109686,
- 0x60546,
- 0x137c7,
- 0x217546,
- 0x222645,
- 0x2cf187,
- 0x2da587,
- 0x54b32ec3,
- 0x334a07,
- 0x3642c3,
- 0x3a2385,
- 0x2964c4,
- 0x32e3c8,
- 0x2751cc,
- 0x3a5745,
- 0x2a2086,
- 0x204bc7,
- 0x37ef47,
- 0x25b8c7,
- 0x31f248,
- 0x307ecf,
- 0x2dfb85,
- 0x243507,
- 0x2394c7,
- 0x2a9b0a,
- 0x2d7e49,
- 0x30bc85,
- 0x32194a,
- 0x1b06,
- 0x2c5745,
- 0x376284,
- 0x289dc6,
- 0x2f8cc7,
- 0x242507,
- 0x38cbc8,
- 0x214185,
- 0x248c46,
- 0x20c545,
- 0x387845,
- 0x212c04,
- 0x2e3f87,
- 0x20900a,
- 0x234d48,
- 0x356946,
- 0x2d603,
- 0x2e0405,
- 0x26c686,
- 0x3a46c6,
- 0x263b86,
- 0x20fbc3,
- 0x389247,
- 0x239445,
- 0x204ac3,
- 0x2dd88d,
- 0x20abc3,
- 0x38ccc8,
- 0x39a5c4,
- 0x27ba85,
- 0x2a9a06,
- 0x2362c6,
- 0x204587,
- 0x2ae707,
- 0x270b05,
- 0x200383,
- 0x27f2c7,
- 0x329709,
- 0x22b689,
- 0x2f590a,
- 0x24cd82,
- 0x3a2344,
- 0x2e76c4,
- 0x261787,
- 0x2278c8,
- 0x2ef309,
- 0x21f1c9,
- 0x2f0487,
- 0x303806,
- 0xf22c6,
- 0x2f39c4,
- 0x2f3fca,
- 0x2f6a08,
- 0x2f6fc9,
- 0x2bfe86,
- 0x2b6ec5,
- 0x234c08,
- 0x2c9c4a,
- 0x22c6c3,
- 0x200786,
- 0x2f0587,
- 0x217f85,
- 0x39a485,
- 0x2717c3,
- 0x258a04,
- 0x36da85,
- 0x288e47,
- 0x2ffac5,
- 0x2ed686,
- 0xfff05,
- 0x264a03,
- 0x28b789,
- 0x27b84c,
- 0x2a7e0c,
- 0x2d3bc8,
- 0x3ade87,
- 0x2fc8c8,
- 0x2fcc0a,
- 0x2fd84b,
- 0x303488,
- 0x33f408,
- 0x2363c6,
- 0x262685,
- 0x200f4a,
- 0x219545,
- 0x205bc2,
- 0x2c7a87,
- 0x2a32c6,
- 0x355ec5,
- 0x38e989,
- 0x26b785,
- 0x285ec5,
- 0x3a1f49,
- 0x257cc6,
- 0x3b1088,
- 0x23e0c3,
- 0x3b3306,
- 0x27ac06,
- 0x30ba85,
- 0x30ba89,
- 0x2bc289,
- 0x24d0c7,
- 0x10b904,
- 0x30b907,
- 0x21f0c9,
- 0x23c905,
- 0x4bbc8,
- 0x3b3205,
- 0x339505,
- 0x376c89,
- 0x205ac2,
- 0x2e95c4,
- 0x20d782,
- 0x200b02,
- 0x2ce985,
- 0x30f748,
- 0x2b9845,
- 0x2c6fc3,
- 0x2c6fc5,
- 0x2d7543,
- 0x210882,
- 0x2e30c4,
- 0x351903,
- 0x204c82,
- 0x35bb44,
- 0x2e85c3,
- 0x200e82,
- 0x25e903,
- 0x291704,
- 0x2e7083,
- 0x246f04,
- 0x202602,
- 0x21a903,
- 0x215b43,
- 0x206342,
- 0x33c282,
- 0x2bc0c9,
- 0x202d82,
- 0x28d304,
- 0x201782,
- 0x234a84,
- 0x3037c4,
- 0x2bcc44,
- 0x2016c2,
- 0x241a02,
- 0x220883,
- 0x225f83,
- 0x387944,
- 0x269e44,
- 0x2bc484,
- 0x2ce884,
- 0x30b143,
- 0x34f743,
- 0x201a84,
- 0x30d784,
- 0x30e786,
- 0x2e7782,
- 0x20d1c2,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x204cc2,
- 0x368883,
- 0x2d0783,
- 0x231b83,
- 0x2001c3,
- 0x332ec3,
- 0x2964c4,
- 0x2bc384,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x21aa03,
- 0x2f4684,
- 0x32f983,
- 0x2bf3c3,
- 0x345184,
- 0x3b3006,
- 0x211503,
- 0x13ecc7,
- 0x234fc3,
- 0x23a943,
- 0x2b6703,
- 0x265383,
- 0x22d603,
- 0x2db6c5,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2ed143,
- 0x2ab343,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204303,
- 0x204ac3,
- 0x23ee04,
- 0x200383,
- 0x26a104,
- 0x2c2d45,
- 0x13ecc7,
- 0x20d1c2,
- 0x2000c2,
- 0x208a42,
- 0x202082,
- 0x200382,
- 0x2d0783,
- 0x23a184,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x213e83,
- 0x24ae04,
- 0x15f048,
- 0x2d0783,
- 0x20abc3,
- 0x1a5c3,
- 0x24fe44,
- 0x15f048,
- 0x2d0783,
- 0x251304,
- 0x2964c4,
- 0x20abc3,
- 0x201882,
- 0x200383,
- 0x2202c3,
- 0x58a04,
- 0x370145,
- 0x205bc2,
- 0x30d8c3,
- 0x204cc2,
- 0x15f048,
- 0x20d1c2,
- 0x231b83,
- 0x332ec3,
- 0x201d42,
- 0x200383,
- 0x204cc2,
- 0x15f048,
- 0x231b83,
- 0x332ec3,
- 0x204303,
- 0x20fbc3,
- 0x30b544,
- 0x204cc2,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x2da904,
- 0x332ec3,
- 0x204303,
- 0x20fbc3,
- 0x204ac3,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x22d603,
- 0x204ac3,
- 0x200383,
- 0x26a103,
- 0x213e83,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x1a5c3,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x22d603,
- 0x204ac3,
- 0x200383,
- 0x217082,
- 0x200141,
- 0x204cc2,
- 0x200001,
- 0x31f542,
- 0x15f048,
- 0x21d105,
- 0x200701,
- 0xd0783,
- 0x200101,
- 0x2000c1,
- 0x201e41,
- 0x29da82,
- 0x36da04,
- 0x372a43,
- 0x200181,
- 0x200941,
- 0x200041,
- 0x200081,
- 0x2ed7c7,
- 0x2eeccf,
- 0x2fc146,
- 0x201481,
- 0x289786,
- 0x200c01,
- 0x2002c1,
- 0x33168e,
- 0x200381,
- 0x200383,
- 0x200e81,
- 0x279e45,
- 0x210582,
- 0x2716c5,
- 0x2003c1,
- 0x200201,
- 0x200241,
- 0x205bc2,
- 0x200a01,
- 0x201a81,
- 0x2005c1,
- 0x2007c1,
- 0x200cc1,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x21bd03,
- 0x2d0783,
- 0x332ec3,
- 0x91d48,
- 0x20fbc3,
- 0x204ac3,
- 0x48803,
- 0x200383,
- 0x14ebc48,
- 0x15f048,
- 0x4dcc4,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x204ac3,
- 0x200383,
- 0x205283,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x2da904,
- 0x200383,
- 0x293ac5,
- 0x343984,
- 0x2d0783,
- 0x204ac3,
- 0x200383,
- 0x16b18a,
- 0x20d1c2,
- 0x2d0783,
- 0x22f489,
- 0x231b83,
- 0x2d2389,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x2f37c8,
- 0x226647,
- 0x370145,
- 0x3a7f87,
- 0x26b0cb,
- 0x215cc8,
- 0x32eac9,
- 0x228087,
- 0x200108,
- 0x36f906,
- 0x2344c7,
- 0x29c108,
- 0x2ab806,
- 0x31d407,
- 0x2aa449,
- 0x2ba749,
- 0x2c2ac6,
- 0x2c38c5,
- 0x2cce08,
- 0x2b4783,
- 0x2d7c88,
- 0x231d87,
- 0x206583,
- 0x31d287,
- 0x217905,
- 0x2eeb08,
- 0x359105,
- 0x2cea43,
- 0x23c289,
- 0x2b0e87,
- 0x35d504,
- 0x2ff244,
- 0x307ccb,
- 0x308288,
- 0x309587,
- 0x2d0783,
- 0x231b83,
- 0x2135c3,
- 0x200383,
- 0x236ec3,
- 0x332ec3,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x77fcb,
- 0x204cc2,
- 0x20d1c2,
- 0x200383,
- 0x15f048,
- 0x204cc2,
- 0x20d1c2,
- 0x208a42,
- 0x201d42,
- 0x203cc2,
- 0x204ac3,
- 0x200382,
- 0x204cc2,
- 0x368883,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x208a42,
- 0x332ec3,
- 0x204303,
- 0x20fbc3,
- 0x213184,
- 0x204ac3,
- 0x2183c3,
- 0x200383,
- 0x30b544,
- 0x24abc3,
- 0x332ec3,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x20abc3,
- 0x200383,
- 0x39db07,
- 0x2d0783,
- 0x26e5c7,
- 0x362a86,
- 0x215ac3,
- 0x2041c3,
- 0x332ec3,
- 0x209e43,
- 0x2964c4,
- 0x38b704,
- 0x30dbc6,
+ 0x320a8f,
+ 0x320e52,
+ 0x3212cf,
+ 0x321692,
+ 0x321b13,
+ 0x321fcd,
+ 0x32258d,
+ 0x32290e,
+ 0x322e8e,
+ 0x3236cc,
+ 0x323a8c,
+ 0x323ecb,
+ 0x32424e,
+ 0x325392,
+ 0x327b8c,
+ 0x328790,
+ 0x335212,
+ 0x33640c,
+ 0x336acd,
+ 0x336e0c,
+ 0x339a51,
+ 0x33a90d,
+ 0x34084d,
+ 0x340e4a,
+ 0x3410cc,
+ 0x3419cc,
+ 0x3421cc,
+ 0x34290c,
+ 0x344dd3,
+ 0x345450,
+ 0x345850,
+ 0x34610d,
+ 0x34670c,
+ 0x347309,
+ 0x34890d,
+ 0x348c53,
+ 0x34a311,
+ 0x34a753,
+ 0x34b24f,
+ 0x34b60c,
+ 0x34b90f,
+ 0x34bccd,
+ 0x34c2cf,
+ 0x34c690,
+ 0x34d10e,
+ 0x3539ce,
+ 0x353f50,
+ 0x35518d,
+ 0x355b0e,
+ 0x355e8c,
+ 0x356e93,
+ 0x35934e,
+ 0x3599d0,
+ 0x359dd1,
+ 0x35a20f,
+ 0x35a5d3,
+ 0x35ae4d,
+ 0x35b18f,
+ 0x35b54e,
+ 0x35bc10,
+ 0x35c009,
+ 0x35cd90,
+ 0x35d38f,
+ 0x35da0f,
+ 0x35ddd2,
+ 0x35efce,
+ 0x35fc4d,
+ 0x36070d,
+ 0x360a4d,
+ 0x36184d,
+ 0x361b8d,
+ 0x361ed0,
+ 0x3622cb,
+ 0x36324c,
+ 0x3635cc,
+ 0x363bcc,
+ 0x363ece,
+ 0x371a10,
+ 0x372dd2,
+ 0x37324b,
+ 0x3738ce,
+ 0x373c4e,
+ 0x3744ce,
+ 0x37494b,
+ 0x50774f56,
+ 0x37624d,
+ 0x3766d4,
+ 0x377e0d,
+ 0x37b115,
+ 0x37c40d,
+ 0x37cd8f,
+ 0x37d5cf,
+ 0x38250f,
+ 0x3828ce,
+ 0x382e4d,
+ 0x383f91,
+ 0x38674c,
+ 0x386a4c,
+ 0x386d4b,
+ 0x38764c,
+ 0x387a0f,
+ 0x387dd2,
+ 0x38878d,
+ 0x38974c,
+ 0x389bcc,
+ 0x389ecd,
+ 0x38a20f,
+ 0x38a5ce,
+ 0x3924cc,
+ 0x392a8d,
+ 0x392dcb,
+ 0x39358c,
+ 0x393b0d,
+ 0x393e4e,
+ 0x3941c9,
+ 0x394d13,
+ 0x39524d,
+ 0x39558d,
+ 0x395b8c,
+ 0x39600e,
+ 0x396fcf,
+ 0x39738c,
+ 0x39768d,
+ 0x3979cf,
+ 0x397d8c,
+ 0x39848c,
+ 0x39890c,
+ 0x398c0c,
+ 0x3992cd,
+ 0x399612,
+ 0x399c8c,
+ 0x399f8c,
+ 0x39a291,
+ 0x39a6cf,
+ 0x39aa8f,
+ 0x39ae53,
+ 0x39bcce,
+ 0x39c04f,
+ 0x39c40c,
+ 0x50b9c74e,
+ 0x39cacf,
+ 0x39ce96,
+ 0x39dc12,
+ 0x39f38c,
+ 0x39fd0f,
+ 0x3a038d,
+ 0x3a06cf,
+ 0x3a0a8c,
+ 0x3a0d8d,
+ 0x3a10cd,
+ 0x3a254e,
+ 0x3a4b8c,
+ 0x3a4e8c,
+ 0x3a5190,
+ 0x3a7a91,
+ 0x3a7ecb,
+ 0x3a820c,
+ 0x3a850e,
+ 0x3aa811,
+ 0x3aac4e,
+ 0x3aafcd,
+ 0x3b53cb,
+ 0x3b5e8f,
+ 0x3b6d94,
+ 0x228782,
+ 0x228782,
+ 0x200c83,
+ 0x228782,
+ 0x200c83,
+ 0x228782,
+ 0x205142,
+ 0x384405,
+ 0x3aa50c,
+ 0x228782,
+ 0x228782,
+ 0x205142,
+ 0x228782,
+ 0x294545,
+ 0x21cb85,
+ 0x228782,
+ 0x228782,
+ 0x20b382,
+ 0x294545,
+ 0x31f3c9,
+ 0x34a00c,
+ 0x228782,
+ 0x228782,
+ 0x228782,
+ 0x228782,
+ 0x384405,
+ 0x228782,
+ 0x228782,
+ 0x228782,
+ 0x228782,
+ 0x20b382,
+ 0x31f3c9,
+ 0x228782,
+ 0x228782,
+ 0x228782,
+ 0x21cb85,
+ 0x228782,
+ 0x21cb85,
+ 0x34a00c,
+ 0x3aa50c,
+ 0x38d2c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x205503,
+ 0x200983,
+ 0x2708,
+ 0x5fc84,
+ 0xe0e08,
+ 0x205702,
+ 0x51a099c2,
+ 0x23dbc3,
+ 0x24f2c4,
+ 0x2032c3,
+ 0x393304,
+ 0x22f706,
+ 0x20e883,
+ 0x3328c4,
+ 0x286bc5,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x255cca,
+ 0x2efec6,
+ 0x373fcc,
+ 0x16d208,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x227f83,
+ 0x2d43c6,
+ 0x205503,
+ 0x200983,
0x201303,
- 0x204ac3,
- 0x200383,
- 0x293ac5,
- 0x318244,
- 0x369dc3,
- 0x37ed83,
- 0x2c7a87,
- 0x2387c5,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x203782,
- 0x3ae343,
- 0x2c2d43,
- 0x368883,
- 0x5fed0783,
- 0x209c02,
- 0x231b83,
- 0x202743,
- 0x332ec3,
- 0x2964c4,
- 0x23a0c3,
- 0x2dfb83,
- 0x20fbc3,
- 0x213184,
- 0x6020c002,
- 0x204ac3,
- 0x200383,
- 0x209103,
- 0x229b03,
- 0x217082,
- 0x24abc3,
- 0x15f048,
- 0x332ec3,
- 0x1a5c3,
- 0x2957c4,
- 0x368883,
- 0x20d1c2,
- 0x2d0783,
- 0x23a184,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x204303,
- 0x2cee84,
- 0x222044,
- 0x201686,
- 0x213184,
- 0x204ac3,
- 0x200383,
- 0x21aa03,
- 0x2a32c6,
- 0x3ddcb,
- 0x28b86,
- 0x4aa0a,
- 0x10adca,
- 0x15f048,
- 0x20c504,
- 0x2d0783,
- 0x368844,
- 0x231b83,
- 0x256bc4,
- 0x332ec3,
- 0x262fc3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x32e84b,
- 0x39f84a,
- 0x3b478c,
- 0x204cc2,
- 0x20d1c2,
- 0x208a42,
- 0x2b0405,
- 0x2964c4,
- 0x201f02,
- 0x20fbc3,
- 0x222044,
- 0x202082,
- 0x200382,
- 0x20c4c2,
- 0x217082,
- 0x168883,
+ 0xa4508,
+ 0x129845,
+ 0x14902,
+ 0x52f86185,
+ 0x21347,
+ 0xc93c8,
+ 0xec0e,
+ 0x88192,
+ 0xfe20b,
+ 0x532d6a45,
+ 0x536d6a4c,
+ 0xb007,
+ 0x16fc07,
+ 0x1b254a,
+ 0x3a6d0,
+ 0x149c05,
+ 0xd95cb,
+ 0x68bc8,
+ 0x38f47,
+ 0x304cb,
+ 0x4efc9,
+ 0x11dd07,
+ 0x2c07,
+ 0x73587,
+ 0x1c106,
+ 0xd4ac8,
+ 0x53c1cdc6,
+ 0xa8a0d,
+ 0x1b1f10,
+ 0x5402bb82,
+ 0x9688,
+ 0x4a450,
+ 0x14434c,
+ 0x5474e88d,
+ 0x655c7,
+ 0x78749,
+ 0x52e06,
+ 0x940c8,
+ 0x67e42,
+ 0x9f54a,
+ 0x27f07,
+ 0x35fc7,
+ 0xa4909,
+ 0xa6388,
+ 0xb9b45,
+ 0xec50e,
+ 0xb54e,
+ 0xdecf,
+ 0x11809,
+ 0xbb9c9,
+ 0x43e4b,
+ 0x7664f,
+ 0x8780c,
+ 0x9ef4b,
+ 0xbbf48,
+ 0x154807,
+ 0xcdc48,
+ 0xfb80b,
+ 0xf568c,
+ 0xf640c,
+ 0xf908c,
+ 0xfe68d,
+ 0x17e248,
+ 0xeab02,
+ 0x113a49,
+ 0x185d4b,
+ 0xc5446,
+ 0x116fcb,
+ 0xd804a,
+ 0xd8c05,
+ 0xde6d0,
+ 0x111806,
+ 0x192345,
+ 0xe3f48,
+ 0xe9187,
+ 0xe9447,
+ 0xff487,
+ 0xf4d0a,
+ 0xc924a,
+ 0x5d306,
+ 0x91a0d,
+ 0x86ec8,
+ 0x55b08,
+ 0x56d49,
+ 0xb3c45,
+ 0xf484c,
+ 0xfe88b,
+ 0x165044,
+ 0xfaa89,
+ 0xfacc6,
+ 0x1af7c6,
+ 0x2dc2,
+ 0x125c86,
+ 0x107247,
+ 0x7b02,
+ 0xc83c5,
+ 0x29544,
+ 0x1ec1,
+ 0x4c983,
+ 0x53a85146,
+ 0x94443,
0xd882,
- 0x2b2409,
- 0x259f88,
- 0x332d49,
- 0x234309,
- 0x23b18a,
- 0x24550a,
- 0x20a182,
- 0x21c402,
- 0xd1c2,
- 0x2d0783,
- 0x220802,
- 0x2436c6,
- 0x356fc2,
- 0x20a542,
- 0x21ad8e,
- 0x21a94e,
- 0x281a47,
- 0x204a47,
- 0x221202,
- 0x231b83,
- 0x332ec3,
- 0x20b502,
- 0x201d42,
- 0x4143,
- 0x24058f,
- 0x26b142,
- 0x362cc7,
- 0x2fa1c7,
- 0x39d487,
- 0x31e28c,
- 0x364d0c,
- 0x202444,
- 0x283b0a,
- 0x21a882,
- 0x201b02,
- 0x2bc744,
- 0x22b1c2,
- 0x2c5c02,
- 0x364f44,
- 0x2184c2,
- 0x205d82,
- 0x5d83,
- 0x2ab887,
- 0x33d885,
- 0x2073c2,
- 0x240504,
- 0x373102,
- 0x2df088,
- 0x204ac3,
- 0x203808,
- 0x203ac2,
- 0x232d85,
- 0x203ac6,
- 0x200383,
- 0x206ec2,
- 0x2ef547,
- 0x10582,
- 0x350845,
- 0x31d185,
- 0x207c82,
- 0x236b82,
- 0x3a860a,
- 0x27098a,
- 0x212bc2,
- 0x353f84,
- 0x2018c2,
- 0x3a2208,
- 0x219682,
- 0x2a2588,
- 0x304987,
- 0x304c89,
- 0x2037c2,
- 0x309e45,
- 0x247e85,
- 0x21424b,
- 0x2ca84c,
- 0x22c208,
- 0x3186c8,
- 0x2e7782,
- 0x204642,
- 0x204cc2,
- 0x15f048,
- 0x20d1c2,
- 0x2d0783,
- 0x208a42,
- 0x202082,
- 0x200382,
- 0x200383,
- 0x20c4c2,
- 0x204cc2,
- 0x6260d1c2,
- 0x62b32ec3,
- 0x205d83,
- 0x201f02,
- 0x204ac3,
- 0x3a8fc3,
- 0x200383,
- 0x2ec383,
- 0x273d06,
- 0x1613e83,
- 0x15f048,
- 0x63c85,
- 0xae2cd,
- 0xaafca,
- 0x6ebc7,
- 0x63201b82,
- 0x63601442,
- 0x63a00f82,
- 0x63e02e02,
- 0x642125c2,
- 0x6460e542,
- 0x13ecc7,
- 0x64a0d1c2,
- 0x64e0e482,
- 0x6520fe42,
- 0x65603b02,
- 0x21a943,
- 0x102c4,
- 0x220a43,
- 0x65a14002,
- 0x65e023c2,
- 0x51847,
- 0x66214502,
- 0x66600b82,
- 0x66a00542,
- 0x66e0a3c2,
- 0x67202282,
- 0x67601d42,
- 0xbe445,
- 0x221443,
- 0x3b3bc4,
- 0x67a2b1c2,
- 0x67e42682,
- 0x68202682,
- 0x7e5cb,
- 0x68600c02,
- 0x68e513c2,
- 0x69201f02,
- 0x69603cc2,
- 0x69a0bcc2,
- 0x69e05f02,
- 0x6a20b602,
- 0x6a673fc2,
- 0x6aa0c002,
- 0x6ae04a02,
- 0x6b202082,
- 0x6b603702,
- 0x6ba12982,
- 0x6be31302,
- 0x94fc4,
- 0x358183,
- 0x6c2126c2,
- 0x6c61a582,
- 0x6ca098c2,
- 0x6ce00982,
- 0x6d200382,
- 0x6d604c82,
- 0x78147,
- 0x6da054c2,
- 0x6de05502,
- 0x6e20c4c2,
- 0x6e609f42,
- 0x19de4c,
- 0x6ea22e82,
- 0x6ee79242,
- 0x6f200a02,
- 0x6f606602,
- 0x6fa019c2,
- 0x6fe3b302,
- 0x70206d02,
- 0x70613882,
- 0x70a7af82,
- 0x70e43e02,
+ 0x27f04,
+ 0x242,
+ 0x5ef44,
+ 0x3dc2,
+ 0x8142,
+ 0x2502,
+ 0x10f242,
+ 0x1ec2,
+ 0xd6a42,
+ 0x4142,
+ 0x1b102,
+ 0x2cd82,
+ 0x5742,
+ 0xdc2,
+ 0xf882,
+ 0x32403,
+ 0x5f02,
+ 0x7c2,
+ 0x18342,
+ 0xfc82,
+ 0x5e82,
+ 0x1ae02,
+ 0x17f42,
+ 0x15c2,
+ 0x29c2,
+ 0x1fc2,
+ 0x44183,
+ 0x3942,
+ 0x6502,
+ 0xafd42,
+ 0xbe02,
+ 0x282,
+ 0x4bc2,
+ 0x1f42,
+ 0xa8542,
+ 0x2342,
+ 0x152bc2,
+ 0x675c2,
+ 0x2c82,
+ 0x5503,
+ 0x8c2,
+ 0x8442,
+ 0x33c2,
+ 0xb482,
+ 0x49245,
+ 0xba02,
+ 0x2d4c2,
+ 0x3c083,
+ 0x482,
+ 0x1c42,
+ 0x27c2,
+ 0x3902,
+ 0x1102,
+ 0x1442,
+ 0xc2,
+ 0x2dc2,
+ 0x9885,
+ 0x75c47,
+ 0x212503,
+ 0x205702,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x20ad83,
+ 0x227f83,
+ 0x205503,
+ 0x204e83,
+ 0x200983,
+ 0x294483,
+ 0x169c3,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x209703,
+ 0x205503,
+ 0x204e83,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x200041,
+ 0x209703,
+ 0x205503,
+ 0x21c2c3,
+ 0x200983,
+ 0x38d2c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x209683,
+ 0x2163c3,
+ 0x277dc3,
+ 0x280b83,
+ 0x21c303,
+ 0x252c03,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x205503,
+ 0x200983,
+ 0x25ed03,
+ 0x352e84,
+ 0x231a03,
+ 0x30c3,
+ 0x228483,
+ 0x37a908,
+ 0x24f3c4,
+ 0x3b870a,
+ 0x2b8ec6,
+ 0x1b6a04,
+ 0x39b2c7,
+ 0x21e7ca,
+ 0x315bc9,
+ 0x3ab587,
+ 0x3b724a,
+ 0x38d2c3,
+ 0x2e678b,
+ 0x2b9fc9,
+ 0x2bd645,
+ 0x2d1fc7,
+ 0x99c2,
+ 0x2a84c3,
+ 0x205747,
+ 0x2e2b85,
+ 0x2dbdc9,
+ 0x232403,
+ 0x233c06,
+ 0x2c1a43,
+ 0xdb283,
+ 0x104e46,
+ 0x18ec46,
+ 0xe807,
+ 0x212e46,
+ 0x21b185,
+ 0x282407,
+ 0x2d5b87,
+ 0x56ae9dc3,
+ 0x336647,
+ 0x365e03,
+ 0x206a05,
+ 0x3b1384,
+ 0x220688,
+ 0x38644c,
+ 0x2ad745,
+ 0x29c986,
+ 0x205607,
+ 0x38b907,
+ 0x238347,
+ 0x245108,
+ 0x303b8f,
+ 0x315e05,
+ 0x23dcc7,
+ 0x26f287,
+ 0x2a3e0a,
+ 0x2d2809,
+ 0x304f85,
+ 0x30664a,
+ 0x82a06,
+ 0x2c1ac5,
+ 0x374b84,
+ 0x2843c6,
+ 0x2f1d47,
+ 0x2eaa07,
+ 0x3bb408,
+ 0x22dc85,
+ 0x2e2a86,
+ 0x214305,
+ 0x3adcc5,
+ 0x21c984,
+ 0x2af347,
+ 0x2081ca,
+ 0x334808,
+ 0x35ba86,
+ 0x27f83,
+ 0x2da905,
+ 0x25f906,
+ 0x3af246,
+ 0x392246,
+ 0x209703,
+ 0x388a07,
+ 0x26f205,
+ 0x205503,
+ 0x2d830d,
+ 0x204e83,
+ 0x3bb508,
+ 0x27f404,
+ 0x272fc5,
+ 0x2a3d06,
+ 0x234d46,
+ 0x368007,
+ 0x2a6ec7,
+ 0x267345,
+ 0x200983,
+ 0x21fbc7,
+ 0x2788c9,
+ 0x311a49,
+ 0x22708a,
+ 0x243002,
+ 0x2069c4,
+ 0x2e5084,
+ 0x390207,
+ 0x22cf88,
+ 0x2ea2c9,
+ 0x21eac9,
+ 0x2eaf47,
+ 0x2ba486,
+ 0xec286,
+ 0x2ed844,
+ 0x2ede4a,
+ 0x2f0d48,
+ 0x2f1189,
+ 0x2bdbc6,
+ 0x2b1445,
+ 0x3346c8,
+ 0x2c5f8a,
+ 0x22ed03,
+ 0x353006,
+ 0x2eb047,
+ 0x223ec5,
+ 0x3a5e05,
+ 0x264b83,
+ 0x250cc4,
+ 0x226605,
+ 0x281b07,
+ 0x2faf85,
+ 0x2ee346,
+ 0xfc605,
+ 0x247d83,
+ 0x357bc9,
+ 0x272d8c,
+ 0x29344c,
+ 0x2ced08,
+ 0x293087,
+ 0x2f7908,
+ 0x2f7c4a,
+ 0x2f888b,
+ 0x2ba108,
+ 0x234e48,
+ 0x239586,
+ 0x390d45,
+ 0x38da4a,
+ 0x3a6205,
+ 0x20b0c2,
+ 0x2c4647,
+ 0x25fe86,
+ 0x35c8c5,
+ 0x370809,
+ 0x2f39c5,
+ 0x27e985,
+ 0x2ddf09,
+ 0x351846,
+ 0x237e88,
+ 0x33f383,
+ 0x20f486,
+ 0x272146,
+ 0x306445,
+ 0x306449,
+ 0x2b6789,
+ 0x279ac7,
+ 0x109104,
+ 0x309107,
+ 0x21e9c9,
+ 0x238d05,
+ 0x413c8,
+ 0x3b2e85,
+ 0x330e85,
+ 0x380509,
+ 0x201702,
+ 0x25e544,
+ 0x201e82,
+ 0x203942,
+ 0x31ecc5,
+ 0x3b6788,
+ 0x2b3b85,
+ 0x2c3ac3,
+ 0x2c3ac5,
+ 0x2d2383,
+ 0x20f442,
+ 0x377804,
+ 0x2ac783,
+ 0x2056c2,
+ 0x379884,
+ 0x2e5d43,
+ 0x2082c2,
+ 0x2b3c03,
+ 0x28d084,
+ 0x2e4c83,
+ 0x248684,
+ 0x203082,
+ 0x218943,
+ 0x22ef03,
+ 0x200d02,
+ 0x361782,
+ 0x2b65c9,
+ 0x207842,
+ 0x288d04,
+ 0x203cc2,
+ 0x334544,
+ 0x2ba444,
+ 0x2b74c4,
+ 0x202dc2,
+ 0x2391c2,
+ 0x225bc3,
+ 0x2f8403,
+ 0x23d904,
+ 0x281c84,
+ 0x2eb1c4,
+ 0x2f0f04,
+ 0x30a483,
+ 0x26e543,
+ 0x282984,
+ 0x30a2c4,
+ 0x30aac6,
+ 0x22a282,
+ 0x2099c2,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x205702,
+ 0x38d2c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2007c3,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x2b6884,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x201303,
+ 0x2ee644,
+ 0x31a403,
+ 0x2bd0c3,
+ 0x34ab84,
+ 0x3b2c86,
+ 0x202f03,
+ 0x16fc07,
+ 0x222403,
+ 0x2459c3,
+ 0x2b0543,
+ 0x206a43,
+ 0x227f83,
+ 0x2d6cc5,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x282c43,
+ 0x2a5143,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x244183,
+ 0x205503,
+ 0x23a504,
+ 0x200983,
+ 0x26bec4,
+ 0x2bf145,
+ 0x16fc07,
+ 0x2099c2,
+ 0x2006c2,
0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x75c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x68a3a0c3,
- 0x2075c3,
- 0x2db744,
- 0x259e86,
- 0x2f74c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x20d882,
- 0x20d882,
- 0x23a0c3,
- 0x2075c3,
- 0x716d0783,
- 0x231b83,
- 0x329e83,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x15f048,
- 0x20d1c2,
- 0x2d0783,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x24fe44,
- 0x20d1c2,
- 0x2d0783,
- 0x3303c3,
- 0x231b83,
- 0x251304,
- 0x2135c3,
- 0x332ec3,
- 0x2964c4,
- 0x204303,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x2202c3,
- 0x370145,
- 0x2b2703,
- 0x24abc3,
- 0x20d1c2,
- 0x2d0783,
- 0x23a0c3,
- 0x204ac3,
- 0x200383,
- 0x204cc2,
- 0x368883,
- 0x15f048,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x22e886,
- 0x2964c4,
- 0x204303,
- 0x213184,
- 0x204ac3,
- 0x200383,
+ 0x200c82,
+ 0x200442,
+ 0x2a84c3,
+ 0x235ac4,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x214843,
+ 0x25ef44,
+ 0x16d208,
+ 0x2a84c3,
+ 0x204e83,
+ 0x169c3,
+ 0x2030c4,
+ 0x16d208,
+ 0x2a84c3,
+ 0x249944,
+ 0x3b1384,
+ 0x204e83,
+ 0x203ec2,
+ 0x200983,
+ 0x23e743,
+ 0x50cc4,
+ 0x373605,
+ 0x20b0c2,
+ 0x30a403,
+ 0x205702,
+ 0x16d208,
+ 0x2099c2,
+ 0x232403,
+ 0x2e9dc3,
+ 0x201fc2,
+ 0x200983,
+ 0x205702,
+ 0x1b7407,
+ 0x12e3c9,
+ 0x6f83,
+ 0x16d208,
+ 0x18ebc3,
+ 0x5a31fd87,
+ 0xa84c3,
+ 0x708,
+ 0x232403,
+ 0x2e9dc3,
+ 0x1ae886,
+ 0x244183,
+ 0x8f2c8,
+ 0xc0e08,
+ 0x41a46,
+ 0x209703,
+ 0xca988,
+ 0xb1b43,
+ 0xdf145,
+ 0x32607,
+ 0x8003,
+ 0x174c0a,
+ 0x11ed83,
+ 0x308d44,
+ 0x10398b,
+ 0x103f48,
+ 0x8d742,
+ 0x205702,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2d5f04,
+ 0x2e9dc3,
+ 0x244183,
+ 0x209703,
+ 0x205503,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x227f83,
+ 0x205503,
+ 0x200983,
0x21aa03,
- 0x2d0783,
- 0x231b83,
- 0x204ac3,
- 0x200383,
- 0x2d0783,
- 0x28b86,
- 0x231b83,
- 0x332ec3,
- 0xe1946,
- 0x204ac3,
- 0x200383,
- 0x315cc8,
- 0x318509,
- 0x327a09,
- 0x332548,
- 0x37d888,
- 0x37d889,
- 0x9da85,
- 0x204cc2,
- 0x238605,
- 0x205d43,
- 0x7420d1c2,
- 0x231b83,
- 0x332ec3,
- 0x33e387,
- 0x265383,
- 0x20fbc3,
- 0x204ac3,
- 0x2104c3,
- 0x212483,
- 0x20abc3,
- 0x200383,
- 0x241f46,
- 0x205bc2,
- 0x24abc3,
- 0x15f048,
- 0x204cc2,
- 0x368883,
- 0x20d1c2,
- 0x2d0783,
- 0x231b83,
- 0x332ec3,
- 0x2964c4,
- 0x20fbc3,
- 0x204ac3,
- 0x200383,
- 0x213e83,
- 0x153ca46,
+ 0x214843,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x169c3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x227f83,
+ 0x205503,
+ 0x200983,
+ 0x212982,
+ 0x200141,
+ 0x205702,
+ 0x200001,
+ 0x320b82,
+ 0x16d208,
+ 0x21d445,
+ 0x201ec1,
+ 0xa84c3,
+ 0x200701,
+ 0x200301,
+ 0x200081,
+ 0x298602,
+ 0x36c044,
+ 0x384383,
+ 0x200181,
+ 0x200401,
+ 0x200041,
+ 0x200101,
+ 0x2e9907,
+ 0x2eab8f,
+ 0x340446,
+ 0x200281,
+ 0x37f6c6,
+ 0x200e81,
+ 0x2008c1,
+ 0x332a0e,
+ 0x200441,
+ 0x200983,
+ 0x201301,
+ 0x270e85,
+ 0x20f942,
+ 0x264a85,
+ 0x200341,
+ 0x200801,
+ 0x2002c1,
+ 0x20b0c2,
+ 0x2000c1,
+ 0x200201,
+ 0x200bc1,
+ 0x2005c1,
+ 0x201cc1,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x219503,
+ 0x2a84c3,
+ 0x2e9dc3,
+ 0x8d688,
+ 0x209703,
+ 0x205503,
+ 0x20803,
+ 0x200983,
+ 0x14e7e88,
+ 0x16d208,
+ 0x44e04,
+ 0x14e7e8a,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x205503,
+ 0x200983,
+ 0x2030c3,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2d5f04,
+ 0x200983,
+ 0x27a305,
+ 0x33b804,
+ 0x2a84c3,
+ 0x205503,
+ 0x200983,
+ 0x225ca,
+ 0xd5284,
+ 0x10c9c6,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x230309,
+ 0x232403,
+ 0x3034c9,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x2ed648,
+ 0x22ca47,
+ 0x373605,
+ 0x18ed88,
+ 0x1b7407,
+ 0x2d20a,
+ 0xecb,
+ 0x4ab87,
+ 0x3d2c8,
+ 0x1b1b8a,
+ 0x10a48,
+ 0x12e3c9,
+ 0x264c7,
+ 0x3be87,
+ 0x152b08,
+ 0x708,
+ 0x3df8f,
+ 0x11d85,
+ 0xa07,
+ 0x1ae886,
+ 0x137607,
+ 0x3d586,
+ 0x8f2c8,
+ 0xa5606,
+ 0x151647,
+ 0x19c9,
+ 0x1aa1c7,
+ 0xa46c9,
+ 0xb4a09,
+ 0xbeec6,
+ 0xc0e08,
+ 0xbfcc5,
+ 0x4eb4a,
+ 0xca988,
+ 0xb1b43,
+ 0xd2648,
+ 0x32607,
+ 0x6d505,
+ 0x69c50,
+ 0x8003,
+ 0x1aa047,
+ 0x15ec5,
+ 0xe9748,
+ 0x13ce05,
+ 0x11ed83,
+ 0x6fd48,
+ 0xcd46,
+ 0x42849,
+ 0xaa147,
+ 0x6fa0b,
+ 0x14ac44,
+ 0xfa544,
+ 0x10398b,
+ 0x103f48,
+ 0x104d47,
+ 0x129845,
+ 0x2a84c3,
+ 0x232403,
+ 0x2163c3,
+ 0x200983,
+ 0x22a403,
+ 0x2e9dc3,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x43f8b,
+ 0x205702,
+ 0x2099c2,
+ 0x200983,
+ 0x16d208,
+ 0x205702,
+ 0x2099c2,
+ 0x20d882,
+ 0x201fc2,
+ 0x203d02,
+ 0x205503,
+ 0x200442,
+ 0x205702,
+ 0x38d2c3,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x20d882,
+ 0x2e9dc3,
+ 0x244183,
+ 0x209703,
+ 0x211cc4,
+ 0x205503,
+ 0x216b03,
+ 0x200983,
+ 0x308d44,
+ 0x25ed03,
+ 0x2e9dc3,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x204e83,
+ 0x200983,
+ 0x39f847,
+ 0x2a84c3,
+ 0x2614c7,
+ 0x2c7ac6,
+ 0x219203,
+ 0x218343,
+ 0x2e9dc3,
+ 0x2143c3,
+ 0x3b1384,
+ 0x37ef04,
+ 0x31ea46,
+ 0x20d143,
+ 0x205503,
+ 0x200983,
+ 0x27a305,
+ 0x318284,
+ 0x3b2a43,
+ 0x38b743,
+ 0x2c4647,
+ 0x33e885,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x28e87,
+ 0x205942,
+ 0x287003,
+ 0x2bf143,
+ 0x38d2c3,
+ 0x626a84c3,
+ 0x202242,
+ 0x232403,
+ 0x2032c3,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x353903,
+ 0x315e03,
+ 0x209703,
+ 0x211cc4,
+ 0x62a04642,
+ 0x205503,
+ 0x200983,
+ 0x2082c3,
+ 0x229543,
+ 0x212982,
+ 0x25ed03,
+ 0x16d208,
+ 0x2e9dc3,
+ 0x169c3,
+ 0x26f744,
+ 0x38d2c3,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x235ac4,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x244183,
+ 0x282104,
+ 0x210444,
+ 0x2d43c6,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x201303,
+ 0x25fe86,
+ 0x13f08b,
+ 0x1cdc6,
+ 0x5eb4a,
+ 0x107e4a,
+ 0x16d208,
+ 0x2142c4,
+ 0x63ea84c3,
+ 0x38d284,
+ 0x232403,
+ 0x256e84,
+ 0x2e9dc3,
+ 0x391683,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x56243,
+ 0x32f78b,
+ 0x3a140a,
+ 0x3b9bcc,
+ 0xda688,
+ 0x205702,
+ 0x2099c2,
+ 0x20d882,
+ 0x2a9305,
+ 0x3b1384,
+ 0x202342,
+ 0x209703,
+ 0x210444,
+ 0x200c82,
+ 0x200442,
+ 0x209842,
+ 0x212982,
+ 0x18d2c3,
+ 0x19f02,
+ 0x2a1cc9,
+ 0x25d548,
+ 0x309a89,
+ 0x337449,
+ 0x23490a,
+ 0x23634a,
+ 0x20cc02,
+ 0x21b102,
+ 0x99c2,
+ 0x2a84c3,
+ 0x204682,
+ 0x23de86,
+ 0x35d882,
+ 0x201242,
+ 0x20124e,
+ 0x21898e,
+ 0x27b107,
+ 0x205487,
+ 0x275d02,
+ 0x232403,
+ 0x2e9dc3,
+ 0x200042,
+ 0x201fc2,
+ 0x4a5c3,
+ 0x2eec0f,
+ 0x200f42,
+ 0x32c787,
+ 0x2c7d07,
+ 0x2d3907,
+ 0x2ad24c,
+ 0x3151cc,
+ 0x3a3a44,
+ 0x27c6ca,
+ 0x2188c2,
+ 0x20be02,
+ 0x2b6fc4,
+ 0x2226c2,
+ 0x2c2702,
+ 0x315404,
+ 0x20cec2,
+ 0x200282,
+ 0x6343,
+ 0x2a5687,
+ 0x2352c5,
+ 0x201f42,
+ 0x2eeb84,
+ 0x352bc2,
+ 0x2da248,
+ 0x205503,
+ 0x3b0208,
+ 0x200d42,
+ 0x233385,
+ 0x3b04c6,
+ 0x200983,
+ 0x20ba02,
+ 0x2ea507,
+ 0xf942,
+ 0x26b005,
+ 0x3a9f45,
+ 0x201642,
+ 0x242b02,
+ 0x3b7a8a,
+ 0x2671ca,
+ 0x202c42,
+ 0x2e4744,
+ 0x2002c2,
+ 0x206888,
+ 0x201c82,
+ 0x30a848,
+ 0x2feb47,
+ 0x2ff649,
+ 0x26b082,
+ 0x305645,
+ 0x33bc85,
+ 0x22dd4b,
+ 0x2c6c4c,
+ 0x22e848,
+ 0x3188c8,
+ 0x22a282,
+ 0x35f782,
+ 0x205702,
+ 0x16d208,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x20d882,
+ 0x200c82,
+ 0x200442,
+ 0x200983,
+ 0x209842,
+ 0x205702,
+ 0x652099c2,
+ 0x656e9dc3,
+ 0x206343,
+ 0x202342,
+ 0x205503,
+ 0x375cc3,
+ 0x200983,
+ 0x2e87c3,
+ 0x275d46,
+ 0x1614843,
+ 0x16d208,
+ 0x192345,
+ 0xa6a8d,
+ 0xa4dca,
+ 0x65c87,
+ 0x65e011c2,
+ 0x66200242,
+ 0x66600ec2,
+ 0x66a00c02,
+ 0x66e0de02,
+ 0x67201ec2,
+ 0x16fc07,
+ 0x676099c2,
+ 0x67a301c2,
+ 0x67e09982,
+ 0x68200dc2,
+ 0x218983,
+ 0x9e04,
+ 0x225d83,
+ 0x686149c2,
+ 0x68a00182,
+ 0x49f47,
+ 0x68e03002,
+ 0x69202e42,
+ 0x69600b42,
+ 0x69a02bc2,
+ 0x69e029c2,
+ 0x6a201fc2,
+ 0xb3985,
+ 0x234543,
+ 0x202b84,
+ 0x6a6226c2,
+ 0x6aa03a82,
+ 0x6ae03202,
+ 0x16c90b,
+ 0x6b200e82,
+ 0x6ba49a02,
+ 0x6be02342,
+ 0x6c203d02,
+ 0x6c60f242,
+ 0x6ca0ec42,
+ 0x6ce0e602,
+ 0x6d2675c2,
+ 0x6d604642,
+ 0x6da01b42,
+ 0x6de00c82,
+ 0x6e2042c2,
+ 0x6e61c702,
+ 0x6ea00e42,
+ 0x7f1c4,
+ 0x350703,
+ 0x6ee33082,
+ 0x6f216982,
+ 0x6f603402,
+ 0x6fa089c2,
+ 0x6fe00442,
+ 0x702056c2,
+ 0x44107,
+ 0x70601302,
+ 0x70a07302,
+ 0x70e09842,
+ 0x71218942,
+ 0xf484c,
+ 0x71621c82,
+ 0x71a3ab02,
+ 0x71e11602,
+ 0x72201682,
+ 0x72601f82,
+ 0x72a34a82,
+ 0x72e00202,
+ 0x7320e8c2,
+ 0x736724c2,
+ 0x73a56642,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0xa203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x6b753903,
+ 0x20a203,
+ 0x2d6d44,
+ 0x25d446,
+ 0x2f1743,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x219f02,
+ 0x219f02,
+ 0x353903,
+ 0x20a203,
+ 0x742a84c3,
+ 0x232403,
+ 0x37ac03,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x16d208,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x205503,
+ 0x200983,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x2030c4,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x2028c3,
+ 0x232403,
+ 0x249944,
+ 0x2163c3,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x244183,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x23e743,
+ 0x373605,
+ 0x2a1fc3,
+ 0x25ed03,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x353903,
+ 0x205503,
+ 0x200983,
+ 0x205702,
+ 0x38d2c3,
+ 0x16d208,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x22f706,
+ 0x3b1384,
+ 0x244183,
+ 0x211cc4,
+ 0x205503,
+ 0x200983,
+ 0x201303,
+ 0x2a84c3,
+ 0x232403,
+ 0x205503,
+ 0x200983,
+ 0x14bb147,
+ 0x2a84c3,
+ 0x1cdc6,
+ 0x232403,
+ 0x2e9dc3,
+ 0xdba46,
+ 0x205503,
+ 0x200983,
+ 0x3149c8,
+ 0x318709,
+ 0x328b89,
+ 0x333808,
+ 0x37dc48,
+ 0x37dc49,
+ 0x24318d,
+ 0x2ee80f,
+ 0x251490,
+ 0x34848d,
+ 0x3638cc,
+ 0x37f98b,
+ 0x98605,
+ 0x205702,
+ 0x33e6c5,
+ 0x200243,
+ 0x772099c2,
+ 0x232403,
+ 0x2e9dc3,
+ 0x343ec7,
+ 0x206a43,
+ 0x209703,
+ 0x205503,
+ 0x21c2c3,
+ 0x20dcc3,
+ 0x204e83,
+ 0x200983,
+ 0x2efec6,
+ 0x20b0c2,
+ 0x25ed03,
+ 0x16d208,
+ 0x205702,
+ 0x38d2c3,
+ 0x2099c2,
+ 0x2a84c3,
+ 0x232403,
+ 0x2e9dc3,
+ 0x3b1384,
+ 0x209703,
+ 0x205503,
+ 0x200983,
+ 0x214843,
+ 0x14f53c6,
+ 0x205702,
+ 0x2099c2,
+ 0x2e9dc3,
+ 0x209703,
+ 0x200983,
}
// children is the list of nodes' children, the parent's wildcard bit and the
@@ -8623,442 +8770,409 @@ var children = [...]uint32{
0x40000000,
0x50000000,
0x60000000,
- 0x1860612,
- 0x1864618,
- 0x1884619,
- 0x19e0621,
+ 0x184c60d,
+ 0x1850613,
+ 0x1870614,
+ 0x19cc61c,
+ 0x19e0673,
0x19f4678,
- 0x1a0867d,
- 0x1a18682,
- 0x1a34686,
- 0x1a3868d,
- 0x1a5068e,
- 0x1a74694,
- 0x1a7869d,
- 0x1a9069e,
- 0x1a946a4,
- 0x1a986a5,
- 0x1ac06a6,
- 0x1ac46b0,
- 0x21acc6b1,
- 0x1b146b3,
- 0x1b186c5,
- 0x1b386c6,
- 0x1b4c6ce,
- 0x1b506d3,
- 0x1b806d4,
- 0x1b9c6e0,
- 0x1bc46e7,
- 0x1bd06f1,
- 0x1bd46f4,
- 0x1c686f5,
- 0x1c7c71a,
- 0x1c9071f,
- 0x1cc0724,
- 0x1cd0730,
- 0x1ce4734,
- 0x1d08739,
- 0x1e20742,
- 0x1e24788,
- 0x1e90789,
- 0x1ea47a4,
- 0x1eb87a9,
- 0x1ec07ae,
- 0x1ed07b0,
- 0x1ed47b4,
- 0x1eec7b5,
- 0x1f347bb,
- 0x1f4c7cd,
- 0x1f507d3,
+ 0x1a0467d,
+ 0x1a20681,
+ 0x1a24688,
+ 0x1a3c689,
+ 0x1a6468f,
+ 0x1a68699,
+ 0x1a8069a,
+ 0x1a846a0,
+ 0x1a886a1,
+ 0x1ab06a2,
+ 0x1ab46ac,
+ 0x21abc6ad,
+ 0x1b046af,
+ 0x1b086c1,
+ 0x1b286c2,
+ 0x1b3c6ca,
+ 0x1b406cf,
+ 0x1b706d0,
+ 0x1b8c6dc,
+ 0x1bb46e3,
+ 0x1bc06ed,
+ 0x1bc46f0,
+ 0x1c5c6f1,
+ 0x1c70717,
+ 0x1c8471c,
+ 0x1cb4721,
+ 0x1cc472d,
+ 0x1cd8731,
+ 0x1cfc736,
+ 0x1e3473f,
+ 0x1e3878d,
+ 0x1ea478e,
+ 0x1f107a9,
+ 0x1f247c4,
+ 0x1f387c9,
+ 0x1f407ce,
+ 0x1f507d0,
0x1f547d4,
- 0x1f5c7d5,
- 0x1f987d7,
- 0x61f9c7e6,
- 0x1fb07e7,
- 0x1fbc7ec,
- 0x1fc07ef,
- 0x1fd07f0,
- 0x20807f4,
- 0x2084820,
- 0x22090821,
- 0x22098824,
- 0x20cc826,
- 0x20d0833,
- 0x2514834,
- 0x225ac945,
- 0x225b096b,
- 0x225b496c,
- 0x225c096d,
- 0x225c4970,
- 0x225d0971,
- 0x225d4974,
- 0x225d8975,
- 0x225dc976,
- 0x225e0977,
- 0x225e4978,
- 0x225f0979,
- 0x225f497c,
- 0x2260097d,
- 0x22604980,
- 0x22608981,
- 0x2260c982,
- 0x22610983,
- 0x22614984,
- 0x2618985,
- 0x2261c986,
- 0x22628987,
- 0x2262c98a,
- 0x263498b,
- 0x2264498d,
- 0x22648991,
- 0x2654992,
- 0x22658995,
- 0x265c996,
+ 0x1f6c7d5,
+ 0x1fb87db,
+ 0x1fd47ee,
+ 0x1fd87f5,
+ 0x1fdc7f6,
+ 0x1fe87f7,
+ 0x20247fa,
+ 0x62028809,
+ 0x203c80a,
+ 0x205080f,
+ 0x2054814,
+ 0x2064815,
+ 0x2114819,
+ 0x2118845,
+ 0x22124846,
+ 0x2212c849,
+ 0x216484b,
+ 0x2168859,
+ 0x25b885a,
+ 0x2265896e,
+ 0x2265c996,
0x22660997,
- 0x267c998,
- 0x269499f,
- 0x26989a5,
- 0x26a89a6,
- 0x26b09aa,
- 0x26e49ac,
- 0x26e89b9,
- 0x26f89ba,
- 0x27909be,
- 0x227949e4,
- 0x279c9e5,
- 0x27a09e7,
- 0x27b89e8,
- 0x27cc9ee,
- 0x27f49f3,
- 0x28149fd,
- 0x2844a05,
- 0x286ca11,
+ 0x2266c998,
+ 0x2267099b,
+ 0x2267c99c,
+ 0x2268099f,
+ 0x226849a0,
+ 0x226889a1,
+ 0x2268c9a2,
+ 0x226909a3,
+ 0x2269c9a4,
+ 0x226a09a7,
+ 0x226ac9a8,
+ 0x226b09ab,
+ 0x226b49ac,
+ 0x226b89ad,
+ 0x226c49ae,
+ 0x226c89b1,
+ 0x226cc9b2,
+ 0x226d09b3,
+ 0x26d49b4,
+ 0x226d89b5,
+ 0x226e49b6,
+ 0x226e89b9,
+ 0x26f09ba,
+ 0x227089bc,
+ 0x2270c9c2,
+ 0x27189c3,
+ 0x2271c9c6,
+ 0x27209c7,
+ 0x227249c8,
+ 0x27409c9,
+ 0x27589d0,
+ 0x275c9d6,
+ 0x276c9d7,
+ 0x27749db,
+ 0x27a89dd,
+ 0x27ac9ea,
+ 0x27bc9eb,
+ 0x28609ef,
+ 0x22864a18,
+ 0x286ca19,
0x2870a1b,
- 0x2894a1c,
- 0x2898a25,
- 0x28aca26,
- 0x28b0a2b,
- 0x28b4a2c,
- 0x28d4a2d,
- 0x28eca35,
- 0x28f0a3b,
- 0x228f4a3c,
- 0x28f8a3d,
- 0x2908a3e,
- 0x290ca42,
- 0x2984a43,
- 0x29a0a61,
- 0x29aca68,
- 0x29c0a6b,
- 0x29d8a70,
- 0x29eca76,
- 0x2a04a7b,
- 0x2a1ca81,
- 0x2a34a87,
- 0x2a50a8d,
- 0x2a68a94,
- 0x2ac8a9a,
+ 0x2888a1c,
+ 0x289ca22,
+ 0x28c4a27,
+ 0x28e4a31,
+ 0x2914a39,
+ 0x293ca45,
+ 0x2940a4f,
+ 0x2964a50,
+ 0x2968a59,
+ 0x297ca5a,
+ 0x2980a5f,
+ 0x2984a60,
+ 0x29a4a61,
+ 0x29c0a69,
+ 0x29c4a70,
+ 0x229c8a71,
+ 0x29cca72,
+ 0x29d0a73,
+ 0x29e0a74,
+ 0x29e4a78,
+ 0x2a5ca79,
+ 0x2a78a97,
+ 0x2a88a9e,
+ 0x2a9caa2,
+ 0x2ab4aa7,
+ 0x2ac8aad,
0x2ae0ab2,
0x2ae4ab8,
- 0x2af8ab9,
- 0x2b3cabe,
- 0x2bbcacf,
- 0x2be8aef,
- 0x2becafa,
- 0x2bf4afb,
- 0x2c14afd,
- 0x2c18b05,
- 0x2c38b06,
- 0x2c40b0e,
- 0x2c78b10,
- 0x2cb8b1e,
- 0x2cbcb2e,
- 0x2d0cb2f,
- 0x2d10b43,
- 0x22d14b44,
- 0x2d2cb45,
- 0x2d50b4b,
- 0x2d70b54,
- 0x3334b5c,
- 0x3340ccd,
- 0x3360cd0,
- 0x351ccd8,
- 0x35ecd47,
- 0x365cd7b,
- 0x36b4d97,
- 0x379cdad,
- 0x37f4de7,
- 0x3830dfd,
- 0x392ce0c,
- 0x39f8e4b,
- 0x3a90e7e,
- 0x3b20ea4,
- 0x3b84ec8,
- 0x3dbcee1,
- 0x3e74f6f,
- 0x3f40f9d,
- 0x3f8cfd0,
- 0x4014fe3,
- 0x4051005,
- 0x40a1014,
- 0x4119028,
- 0x6411d046,
- 0x64121047,
- 0x64125048,
- 0x41a1049,
- 0x41fd068,
- 0x427907f,
- 0x42f109e,
- 0x43710bc,
- 0x43dd0dc,
- 0x45090f7,
- 0x4561142,
- 0x64565158,
- 0x45fd159,
- 0x468517f,
- 0x46d11a1,
- 0x47391b4,
- 0x47e11ce,
- 0x48a91f8,
- 0x491122a,
- 0x4a25244,
- 0x64a29289,
- 0x64a2d28a,
- 0x4a8928b,
- 0x4ae52a2,
- 0x4b752b9,
- 0x4bf12dd,
- 0x4c352fc,
- 0x4d1930d,
- 0x4d4d346,
- 0x4dad353,
- 0x4e2136b,
- 0x4ea9388,
- 0x4ee93aa,
- 0x4f593ba,
- 0x64f5d3d6,
- 0x64f613d7,
- 0x24f653d8,
- 0x4f7d3d9,
- 0x4f993df,
- 0x4fdd3e6,
- 0x4fed3f7,
- 0x50053fb,
- 0x507d401,
- 0x508541f,
- 0x5099421,
- 0x50b1426,
- 0x50d942c,
- 0x50dd436,
- 0x50e5437,
- 0x50f9439,
- 0x511543e,
- 0x5119445,
- 0x5121446,
- 0x515d448,
- 0x5171457,
+ 0x2afcab9,
+ 0x2b14abf,
+ 0x2b30ac5,
+ 0x2b48acc,
+ 0x2ba8ad2,
+ 0x2bc0aea,
+ 0x2bc4af0,
+ 0x2bd8af1,
+ 0x2c1caf6,
+ 0x2c9cb07,
+ 0x2cc8b27,
+ 0x2cccb32,
+ 0x2cd4b33,
+ 0x2cf4b35,
+ 0x2cf8b3d,
+ 0x2d18b3e,
+ 0x2d20b46,
+ 0x2d5cb48,
+ 0x2d9cb57,
+ 0x2da0b67,
+ 0x2e00b68,
+ 0x2e04b80,
+ 0x22e08b81,
+ 0x2e20b82,
+ 0x2e44b88,
+ 0x2e64b91,
+ 0x3428b99,
+ 0x3434d0a,
+ 0x3454d0d,
+ 0x3610d15,
+ 0x36e0d84,
+ 0x3750db8,
+ 0x37a8dd4,
+ 0x3890dea,
+ 0x38e8e24,
+ 0x3924e3a,
+ 0x3a20e49,
+ 0x3aece88,
+ 0x3b84ebb,
+ 0x3c14ee1,
+ 0x3c78f05,
+ 0x3eb0f1e,
+ 0x3f68fac,
+ 0x4034fda,
+ 0x408100d,
+ 0x4109020,
+ 0x4145042,
+ 0x4195051,
+ 0x420d065,
+ 0x64211083,
+ 0x64215084,
+ 0x64219085,
+ 0x4295086,
+ 0x42f10a5,
+ 0x436d0bc,
+ 0x43e50db,
+ 0x44650f9,
+ 0x44d1119,
+ 0x45fd134,
+ 0x465517f,
+ 0x64659195,
+ 0x46f1196,
+ 0x47791bc,
+ 0x47c51de,
+ 0x482d1f1,
+ 0x48d520b,
+ 0x499d235,
+ 0x4a05267,
+ 0x4b19281,
+ 0x64b1d2c6,
+ 0x64b212c7,
+ 0x4b7d2c8,
+ 0x4bd92df,
+ 0x4c692f6,
+ 0x4ce531a,
+ 0x4d29339,
+ 0x4e0d34a,
+ 0x4e41383,
+ 0x4ea1390,
+ 0x4f153a8,
+ 0x4f9d3c5,
+ 0x4fdd3e7,
+ 0x504d3f7,
+ 0x65051413,
+ 0x65055414,
+ 0x25059415,
+ 0x5071416,
+ 0x508d41c,
+ 0x50d1423,
+ 0x50e1434,
+ 0x50f9438,
+ 0x517143e,
0x517945c,
- 0x518145e,
- 0x5185460,
- 0x51a9461,
- 0x51cd46a,
- 0x51e5473,
- 0x51e9479,
- 0x51f147a,
- 0x51f547c,
- 0x524d47d,
- 0x5271493,
- 0x529149c,
- 0x52ad4a4,
- 0x52bd4ab,
- 0x52d14af,
- 0x52d54b4,
- 0x52dd4b5,
- 0x52f14b7,
- 0x53014bc,
- 0x53054c0,
- 0x53214c1,
- 0x5bb14c8,
- 0x5be96ec,
- 0x5c156fa,
- 0x5c2d705,
- 0x5c4d70b,
- 0x5c6d713,
- 0x5cb171b,
- 0x5cb972c,
- 0x25cbd72e,
- 0x25cc172f,
- 0x5cc5730,
- 0x5e01731,
- 0x25e05780,
- 0x25e11781,
- 0x25e19784,
- 0x25e25786,
- 0x5e29789,
- 0x5e2d78a,
- 0x5e5578b,
- 0x5e7d795,
- 0x5e8179f,
- 0x5eb97a0,
- 0x5ecd7ae,
- 0x6a257b3,
- 0x6a29a89,
- 0x6a2da8a,
- 0x26a31a8b,
- 0x6a35a8c,
- 0x26a39a8d,
- 0x6a3da8e,
- 0x26a49a8f,
- 0x6a4da92,
- 0x6a51a93,
- 0x26a55a94,
- 0x6a59a95,
- 0x26a61a96,
- 0x6a65a98,
- 0x6a69a99,
- 0x26a79a9a,
- 0x6a7da9e,
- 0x6a81a9f,
- 0x6a85aa0,
- 0x6a89aa1,
- 0x26a8daa2,
- 0x6a91aa3,
- 0x6a95aa4,
- 0x6a99aa5,
- 0x6a9daa6,
- 0x26aa5aa7,
- 0x6aa9aa9,
- 0x6aadaaa,
- 0x6ab1aab,
- 0x26ab5aac,
- 0x6ab9aad,
- 0x26ac1aae,
- 0x26ac5ab0,
- 0x6ae1ab1,
- 0x6aedab8,
- 0x6b2dabb,
- 0x6b31acb,
- 0x6b55acc,
+ 0x518d45e,
+ 0x51a5463,
+ 0x51cd469,
+ 0x51d1473,
+ 0x51d9474,
+ 0x51ed476,
+ 0x520947b,
+ 0x520d482,
+ 0x5215483,
+ 0x5251485,
+ 0x5265494,
+ 0x526d499,
+ 0x527549b,
+ 0x527949d,
+ 0x529d49e,
+ 0x52c14a7,
+ 0x52d94b0,
+ 0x52dd4b6,
+ 0x52e54b7,
+ 0x52e94b9,
+ 0x534d4ba,
+ 0x53514d3,
+ 0x53754d4,
+ 0x53954dd,
+ 0x53b14e5,
+ 0x53c14ec,
+ 0x53d54f0,
+ 0x53d94f5,
+ 0x53e14f6,
+ 0x53f54f8,
+ 0x54054fd,
+ 0x5409501,
+ 0x5425502,
+ 0x5cb5509,
+ 0x5ced72d,
+ 0x5d1973b,
+ 0x5d31746,
+ 0x5d5174c,
+ 0x5d71754,
+ 0x5db575c,
+ 0x5dbd76d,
+ 0x25dc176f,
+ 0x25dc5770,
+ 0x5dcd771,
+ 0x5f29773,
+ 0x25f2d7ca,
+ 0x25f3d7cb,
+ 0x25f457cf,
+ 0x25f517d1,
+ 0x5f557d4,
+ 0x5f597d5,
+ 0x5f817d6,
+ 0x5fa97e0,
+ 0x5fad7ea,
+ 0x5fe57eb,
+ 0x5ff97f9,
+ 0x6b517fe,
+ 0x6b55ad4,
0x6b59ad5,
- 0x6cc1ad6,
- 0x26cc5b30,
- 0x26ccdb31,
- 0x26cd1b33,
- 0x26cd5b34,
- 0x6cddb35,
- 0x6db9b37,
- 0x6dbdb6e,
- 0x6de9b6f,
- 0x6dedb7a,
- 0x6e0db7b,
- 0x6e19b83,
- 0x6e39b86,
- 0x6e71b8e,
- 0x7109b9c,
- 0x71c5c42,
- 0x71d9c71,
- 0x720dc76,
- 0x723dc83,
- 0x7259c8f,
- 0x727dc96,
- 0x7299c9f,
- 0x72b5ca6,
- 0x72d9cad,
- 0x72e9cb6,
- 0x72edcba,
- 0x7321cbb,
- 0x733dcc8,
- 0x7359ccf,
- 0x737dcd6,
- 0x739dcdf,
- 0x73b1ce7,
- 0x73c5cec,
- 0x73c9cf1,
- 0x73e9cf2,
- 0x748dcfa,
- 0x74a9d23,
- 0x74c9d2a,
- 0x74cdd32,
- 0x74d1d33,
- 0x74d5d34,
- 0x74e9d35,
- 0x7509d3a,
- 0x7515d42,
- 0x7519d45,
- 0x7549d46,
- 0x75c9d52,
- 0x75ddd72,
- 0x75e1d77,
- 0x75f9d78,
- 0x75fdd7e,
- 0x7609d7f,
- 0x760dd82,
- 0x7629d83,
- 0x7665d8a,
- 0x7669d99,
- 0x7689d9a,
- 0x76d9da2,
- 0x76f1db6,
- 0x7745dbc,
- 0x7749dd1,
- 0x774ddd2,
- 0x7751dd3,
- 0x7795dd4,
- 0x77a5de5,
- 0x77ddde9,
- 0x780ddf7,
- 0x7955e03,
- 0x7979e55,
- 0x79a5e5e,
- 0x79b1e69,
- 0x79b9e6c,
- 0x7ac9e6e,
- 0x7ad5eb2,
- 0x7ae1eb5,
- 0x7aedeb8,
- 0x7af9ebb,
- 0x7b05ebe,
- 0x7b11ec1,
- 0x7b1dec4,
- 0x7b29ec7,
- 0x7b35eca,
- 0x7b41ecd,
- 0x7b4ded0,
- 0x7b59ed3,
- 0x7b65ed6,
- 0x7b6ded9,
- 0x7b79edb,
- 0x7b85ede,
- 0x7b91ee1,
- 0x7b9dee4,
- 0x7ba9ee7,
+ 0x26b5dad6,
+ 0x6b61ad7,
+ 0x26b65ad8,
+ 0x6b69ad9,
+ 0x26b75ada,
+ 0x6b79add,
+ 0x6b7dade,
+ 0x26b81adf,
+ 0x6b85ae0,
+ 0x26b8dae1,
+ 0x6b91ae3,
+ 0x6b95ae4,
+ 0x26ba5ae5,
+ 0x6ba9ae9,
+ 0x6badaea,
+ 0x6bb1aeb,
+ 0x6bb5aec,
+ 0x26bb9aed,
+ 0x6bbdaee,
+ 0x6bc1aef,
+ 0x6bc5af0,
+ 0x6bc9af1,
+ 0x26bd1af2,
+ 0x6bd5af4,
+ 0x6bd9af5,
+ 0x6bddaf6,
+ 0x26be1af7,
+ 0x6be5af8,
+ 0x26bedaf9,
+ 0x26bf1afb,
+ 0x6c0dafc,
+ 0x6c19b03,
+ 0x6c59b06,
+ 0x6c5db16,
+ 0x6c81b17,
+ 0x6c85b20,
+ 0x6c89b21,
+ 0x6e01b22,
+ 0x26e05b80,
+ 0x26e0db81,
+ 0x26e11b83,
+ 0x26e15b84,
+ 0x6e1db85,
+ 0x6ef9b87,
+ 0x26efdbbe,
+ 0x6f01bbf,
+ 0x6f2dbc0,
+ 0x6f31bcb,
+ 0x6f51bcc,
+ 0x6f5dbd4,
+ 0x6f7dbd7,
+ 0x6fb5bdf,
+ 0x724dbed,
+ 0x7309c93,
+ 0x731dcc2,
+ 0x7351cc7,
+ 0x7381cd4,
+ 0x739dce0,
+ 0x73c1ce7,
+ 0x73ddcf0,
+ 0x73f9cf7,
+ 0x741dcfe,
+ 0x742dd07,
+ 0x7431d0b,
+ 0x7465d0c,
+ 0x7481d19,
+ 0x74edd20,
+ 0x274f1d3b,
+ 0x7515d3c,
+ 0x7535d45,
+ 0x7549d4d,
+ 0x755dd52,
+ 0x7561d57,
+ 0x7581d58,
+ 0x7625d60,
+ 0x7641d89,
+ 0x7661d90,
+ 0x7665d98,
+ 0x766dd99,
+ 0x7671d9b,
+ 0x7685d9c,
+ 0x76a5da1,
+ 0x76b1da9,
+ 0x76bddac,
+ 0x76eddaf,
+ 0x77bddbb,
+ 0x77c1def,
+ 0x77d5df0,
+ 0x77d9df5,
+ 0x77f1df6,
+ 0x77f5dfc,
+ 0x7801dfd,
+ 0x7805e00,
+ 0x7821e01,
+ 0x785de08,
+ 0x7861e17,
+ 0x7881e18,
+ 0x78d1e20,
+ 0x78ede34,
+ 0x7941e3b,
+ 0x7945e50,
+ 0x7949e51,
+ 0x794de52,
+ 0x7991e53,
+ 0x79a1e64,
+ 0x79dde68,
+ 0x79e1e77,
+ 0x7a11e78,
+ 0x7b59e84,
+ 0x7b7ded6,
+ 0x7ba9edf,
0x7bb5eea,
- 0x7bc1eed,
- 0x7bcdef0,
- 0x7bd9ef3,
- 0x7be5ef6,
- 0x7bf1ef9,
- 0x7bfdefc,
- 0x7c09eff,
- 0x7c15f02,
- 0x7c21f05,
- 0x7c2df08,
- 0x7c39f0b,
- 0x7c41f0e,
- 0x7c4df10,
- 0x7c59f13,
- 0x7c65f16,
- 0x7c71f19,
- 0x7c7df1c,
- 0x7c89f1f,
- 0x7c95f22,
- 0x7ca1f25,
- 0x7cadf28,
- 0x7cb9f2b,
- 0x7cc5f2e,
- 0x7cd1f31,
- 0x7cddf34,
- 0x7ce5f37,
+ 0x7bbdeed,
+ 0x7ccdeef,
+ 0x7cd9f33,
+ 0x7ce5f36,
0x7cf1f39,
0x7cfdf3c,
0x7d09f3f,
@@ -9067,27 +9181,73 @@ var children = [...]uint32{
0x7d2df48,
0x7d39f4b,
0x7d45f4e,
- 0x7d49f51,
- 0x7d55f52,
- 0x7d6df55,
- 0x7d71f5b,
- 0x7d81f5c,
- 0x7d99f60,
- 0x7dddf66,
- 0x7df1f77,
- 0x7e25f7c,
- 0x7e35f89,
- 0x7e51f8d,
- 0x7e69f94,
- 0x7e6df9a,
- 0x27eb1f9b,
- 0x7eb5fac,
- 0x7ee1fad,
- 0x7ee5fb8,
+ 0x7d51f51,
+ 0x7d5df54,
+ 0x7d69f57,
+ 0x7d71f5a,
+ 0x7d7df5c,
+ 0x7d89f5f,
+ 0x7d95f62,
+ 0x7da1f65,
+ 0x7dadf68,
+ 0x7db9f6b,
+ 0x7dc5f6e,
+ 0x7dd1f71,
+ 0x7dddf74,
+ 0x7de9f77,
+ 0x7df5f7a,
+ 0x7e01f7d,
+ 0x7e0df80,
+ 0x7e19f83,
+ 0x7e25f86,
+ 0x7e31f89,
+ 0x7e3df8c,
+ 0x7e45f8f,
+ 0x7e51f91,
+ 0x7e5df94,
+ 0x7e69f97,
+ 0x7e75f9a,
+ 0x7e81f9d,
+ 0x7e8dfa0,
+ 0x7e99fa3,
+ 0x7ea5fa6,
+ 0x7eb1fa9,
+ 0x7ebdfac,
+ 0x7ec9faf,
+ 0x7ed5fb2,
+ 0x7ee1fb5,
+ 0x7ee9fb8,
+ 0x7ef5fba,
+ 0x7f01fbd,
+ 0x7f0dfc0,
+ 0x7f19fc3,
+ 0x7f25fc6,
+ 0x7f31fc9,
+ 0x7f3dfcc,
+ 0x7f49fcf,
+ 0x7f4dfd2,
+ 0x7f59fd3,
+ 0x7f71fd6,
+ 0x7f75fdc,
+ 0x7f85fdd,
+ 0x7f9dfe1,
+ 0x7fe1fe7,
+ 0x7ff5ff8,
+ 0x8029ffd,
+ 0x803a00a,
+ 0x805a00e,
+ 0x8072016,
+ 0x808a01c,
+ 0x808e022,
+ 0x280d2023,
+ 0x80d6034,
+ 0x8102035,
+ 0x8106040,
+ 0x811a041,
}
-// max children 466 (capacity 511)
-// max text offset 28023 (capacity 32767)
+// max children 479 (capacity 511)
+// max text offset 28411 (capacity 32767)
// max text length 36 (capacity 63)
-// max hi 8121 (capacity 16383)
-// max lo 8120 (capacity 16383)
+// max hi 8262 (capacity 16383)
+// max lo 8257 (capacity 16383)
diff --git a/vendor/golang.org/x/net/publicsuffix/table_test.go b/vendor/golang.org/x/net/publicsuffix/table_test.go
index f60c80e79..416512cb9 100644
--- a/vendor/golang.org/x/net/publicsuffix/table_test.go
+++ b/vendor/golang.org/x/net/publicsuffix/table_test.go
@@ -148,6 +148,7 @@ var rules = [...]string{
"gov.ar",
"int.ar",
"mil.ar",
+ "musica.ar",
"net.ar",
"org.ar",
"tur.ar",
@@ -317,6 +318,7 @@ var rules = [...]string{
"art.br",
"ato.br",
"b.br",
+ "belem.br",
"bio.br",
"blog.br",
"bmd.br",
@@ -325,6 +327,8 @@ var rules = [...]string{
"cnt.br",
"com.br",
"coop.br",
+ "cri.br",
+ "def.br",
"ecn.br",
"eco.br",
"edu.br",
@@ -335,6 +339,7 @@ var rules = [...]string{
"eti.br",
"far.br",
"flog.br",
+ "floripa.br",
"fm.br",
"fnd.br",
"fot.br",
@@ -342,9 +347,37 @@ var rules = [...]string{
"g12.br",
"ggf.br",
"gov.br",
+ "ac.gov.br",
+ "al.gov.br",
+ "am.gov.br",
+ "ap.gov.br",
+ "ba.gov.br",
+ "ce.gov.br",
+ "df.gov.br",
+ "es.gov.br",
+ "go.gov.br",
+ "ma.gov.br",
+ "mg.gov.br",
+ "ms.gov.br",
+ "mt.gov.br",
+ "pa.gov.br",
+ "pb.gov.br",
+ "pe.gov.br",
+ "pi.gov.br",
+ "pr.gov.br",
+ "rj.gov.br",
+ "rn.gov.br",
+ "ro.gov.br",
+ "rr.gov.br",
+ "rs.gov.br",
+ "sc.gov.br",
+ "se.gov.br",
+ "sp.gov.br",
+ "to.gov.br",
"imb.br",
"ind.br",
"inf.br",
+ "jampa.br",
"jor.br",
"jus.br",
"leg.br",
@@ -360,6 +393,7 @@ var rules = [...]string{
"ntr.br",
"odo.br",
"org.br",
+ "poa.br",
"ppg.br",
"pro.br",
"psc.br",
@@ -367,6 +401,7 @@ var rules = [...]string{
"qsl.br",
"radio.br",
"rec.br",
+ "recife.br",
"slg.br",
"srv.br",
"taxi.br",
@@ -376,6 +411,7 @@ var rules = [...]string{
"tur.br",
"tv.br",
"vet.br",
+ "vix.br",
"vlog.br",
"wiki.br",
"zlg.br",
@@ -3943,6 +3979,7 @@ var rules = [...]string{
"name",
"nc",
"asso.nc",
+ "nom.nc",
"ne",
"net",
"nf",
@@ -5262,38 +5299,6 @@ var rules = [...]string{
"saotome.st",
"store.st",
"su",
- "adygeya.su",
- "arkhangelsk.su",
- "balashov.su",
- "bashkiria.su",
- "bryansk.su",
- "dagestan.su",
- "grozny.su",
- "ivanovo.su",
- "kalmykia.su",
- "kaluga.su",
- "karelia.su",
- "khakassia.su",
- "krasnodar.su",
- "kurgan.su",
- "lenug.su",
- "mordovia.su",
- "msk.su",
- "murmansk.su",
- "nalchik.su",
- "nov.su",
- "obninsk.su",
- "penza.su",
- "pokrovsk.su",
- "sochi.su",
- "spb.su",
- "togliatti.su",
- "troitsk.su",
- "tula.su",
- "tuva.su",
- "vladikavkaz.su",
- "vladimir.su",
- "vologda.su",
"sv",
"com.sv",
"edu.sv",
@@ -5900,6 +5905,12 @@ var rules = [...]string{
"xn--ogbpf8fl",
"xn--mgbtf8fl",
"xn--o3cw4h",
+ "xn--12c1fe0br.xn--o3cw4h",
+ "xn--12co0c3b4eva.xn--o3cw4h",
+ "xn--h3cuzk1di.xn--o3cw4h",
+ "xn--o3cyx2a.xn--o3cw4h",
+ "xn--m3ch0j3a.xn--o3cw4h",
+ "xn--12cfi8ixb8l.xn--o3cw4h",
"xn--pgbs0dh",
"xn--kpry57d",
"xn--kprw13d",
@@ -5937,7 +5948,12 @@ var rules = [...]string{
"net.zm",
"org.zm",
"sch.zm",
- "*.zw",
+ "zw",
+ "ac.zw",
+ "co.zw",
+ "gov.zw",
+ "mil.zw",
+ "org.zw",
"aaa",
"aarp",
"abarth",
@@ -6248,7 +6264,6 @@ var rules = [...]string{
"durban",
"dvag",
"dvr",
- "dwg",
"earth",
"eat",
"eco",
@@ -6438,7 +6453,6 @@ var rules = [...]string{
"icu",
"ieee",
"ifm",
- "iinet",
"ikano",
"imamat",
"imdb",
@@ -6628,7 +6642,6 @@ var rules = [...]string{
"mtpc",
"mtr",
"mutual",
- "mutuelle",
"nab",
"nadex",
"nagoya",
@@ -6686,7 +6699,6 @@ var rules = [...]string{
"oracle",
"orange",
"organic",
- "orientexpress",
"origins",
"osaka",
"otsuka",
@@ -6795,6 +6807,7 @@ var rules = [...]string{
"rogers",
"room",
"rsvp",
+ "rugby",
"ruhr",
"run",
"rwe",
@@ -6937,7 +6950,6 @@ var rules = [...]string{
"thd",
"theater",
"theatre",
- "theguardian",
"tiaa",
"tickets",
"tienda",
@@ -7062,7 +7074,6 @@ var rules = [...]string{
"xn--42c2d9a",
"xn--45q11c",
"xn--4gbrim",
- "xn--4gq48lf9j",
"xn--55qw42g",
"xn--55qx5d",
"xn--5su34j936bgsg",
@@ -7165,6 +7176,9 @@ var rules = [...]string{
"zippo",
"zone",
"zuerich",
+ "cc.ua",
+ "inf.ua",
+ "ltd.ua",
"beep.pl",
"*.compute.estate",
"*.alces.network",
@@ -7178,7 +7192,7 @@ var rules = [...]string{
"*.elasticbeanstalk.com",
"*.elb.amazonaws.com",
"*.elb.amazonaws.com.cn",
- "*.s3.amazonaws.com",
+ "s3.amazonaws.com",
"s3-ap-northeast-1.amazonaws.com",
"s3-ap-northeast-2.amazonaws.com",
"s3-ap-south-1.amazonaws.com",
@@ -7187,6 +7201,7 @@ var rules = [...]string{
"s3-ca-central-1.amazonaws.com",
"s3-eu-central-1.amazonaws.com",
"s3-eu-west-1.amazonaws.com",
+ "s3-eu-west-2.amazonaws.com",
"s3-external-1.amazonaws.com",
"s3-fips-us-gov-west-1.amazonaws.com",
"s3-sa-east-1.amazonaws.com",
@@ -7199,6 +7214,7 @@ var rules = [...]string{
"s3.cn-north-1.amazonaws.com.cn",
"s3.ca-central-1.amazonaws.com",
"s3.eu-central-1.amazonaws.com",
+ "s3.eu-west-2.amazonaws.com",
"s3.us-east-2.amazonaws.com",
"s3.dualstack.ap-northeast-1.amazonaws.com",
"s3.dualstack.ap-northeast-2.amazonaws.com",
@@ -7208,6 +7224,7 @@ var rules = [...]string{
"s3.dualstack.ca-central-1.amazonaws.com",
"s3.dualstack.eu-central-1.amazonaws.com",
"s3.dualstack.eu-west-1.amazonaws.com",
+ "s3.dualstack.eu-west-2.amazonaws.com",
"s3.dualstack.sa-east-1.amazonaws.com",
"s3.dualstack.us-east-1.amazonaws.com",
"s3.dualstack.us-east-2.amazonaws.com",
@@ -7223,6 +7240,7 @@ var rules = [...]string{
"s3-website.ap-south-1.amazonaws.com",
"s3-website.ca-central-1.amazonaws.com",
"s3-website.eu-central-1.amazonaws.com",
+ "s3-website.eu-west-2.amazonaws.com",
"s3-website.us-east-2.amazonaws.com",
"t3l3p0rt.net",
"tele.amune.org",
@@ -7234,10 +7252,18 @@ var rules = [...]string{
"sweetpepper.org",
"myasustor.com",
"myfritz.net",
+ "*.awdev.ca",
+ "*.advisor.ws",
"backplaneapp.io",
"betainabox.com",
"bnr.la",
"boxfuse.io",
+ "square7.ch",
+ "bplaced.com",
+ "bplaced.de",
+ "square7.de",
+ "bplaced.net",
+ "square7.net",
"browsersafetymark.io",
"mycd.eu",
"ae.org",
@@ -7277,6 +7303,7 @@ var rules = [...]string{
"certmgr.org",
"xenapponazure.com",
"virtueeldomein.nl",
+ "c66.me",
"cloudcontrolled.com",
"cloudcontrolapp.com",
"co.ca",
@@ -7299,7 +7326,6 @@ var rules = [...]string{
"cloudns.us",
"co.nl",
"co.no",
- "*.platform.sh",
"dyn.cosidns.de",
"dynamisches-dns.de",
"dnsupdater.de",
@@ -7315,6 +7341,7 @@ var rules = [...]string{
"cyon.link",
"cyon.site",
"daplie.me",
+ "localhost.daplie.me",
"biz.dk",
"co.dk",
"firm.dk",
@@ -7617,6 +7644,8 @@ var rules = [...]string{
"dyn.home-webserver.de",
"myhome-server.de",
"ddnss.org",
+ "definima.net",
+ "definima.io",
"dynv6.net",
"e4.cz",
"enonic.io",
@@ -7679,18 +7708,102 @@ var rules = [...]string{
"us.eu.org",
"eu-1.evennode.com",
"eu-2.evennode.com",
+ "eu-3.evennode.com",
"us-1.evennode.com",
"us-2.evennode.com",
+ "us-3.evennode.com",
+ "twmail.cc",
+ "twmail.net",
+ "twmail.org",
+ "mymailer.com.tw",
+ "url.tw",
"apps.fbsbx.com",
+ "ru.net",
+ "adygeya.ru",
+ "bashkiria.ru",
+ "bir.ru",
+ "cbg.ru",
+ "com.ru",
+ "dagestan.ru",
+ "grozny.ru",
+ "kalmykia.ru",
+ "kustanai.ru",
+ "marine.ru",
+ "mordovia.ru",
+ "msk.ru",
+ "mytis.ru",
+ "nalchik.ru",
+ "nov.ru",
+ "pyatigorsk.ru",
+ "spb.ru",
+ "vladikavkaz.ru",
+ "vladimir.ru",
+ "abkhazia.su",
+ "adygeya.su",
+ "aktyubinsk.su",
+ "arkhangelsk.su",
+ "armenia.su",
+ "ashgabad.su",
+ "azerbaijan.su",
+ "balashov.su",
+ "bashkiria.su",
+ "bryansk.su",
+ "bukhara.su",
+ "chimkent.su",
+ "dagestan.su",
+ "east-kazakhstan.su",
+ "exnet.su",
+ "georgia.su",
+ "grozny.su",
+ "ivanovo.su",
+ "jambyl.su",
+ "kalmykia.su",
+ "kaluga.su",
+ "karacol.su",
+ "karaganda.su",
+ "karelia.su",
+ "khakassia.su",
+ "krasnodar.su",
+ "kurgan.su",
+ "kustanai.su",
+ "lenug.su",
+ "mangyshlak.su",
+ "mordovia.su",
+ "msk.su",
+ "murmansk.su",
+ "nalchik.su",
+ "navoi.su",
+ "north-kazakhstan.su",
+ "nov.su",
+ "obninsk.su",
+ "penza.su",
+ "pokrovsk.su",
+ "sochi.su",
+ "spb.su",
+ "tashkent.su",
+ "termez.su",
+ "togliatti.su",
+ "troitsk.su",
+ "tselinograd.su",
+ "tula.su",
+ "tuva.su",
+ "vladikavkaz.su",
+ "vladimir.su",
+ "vologda.su",
+ "fastlylb.net",
+ "map.fastlylb.net",
+ "freetls.fastly.net",
"map.fastly.net",
"a.prod.fastly.net",
"global.prod.fastly.net",
"a.ssl.fastly.net",
"b.ssl.fastly.net",
"global.ssl.fastly.net",
- "fastlylb.net",
- "map.fastlylb.net",
"fhapp.xyz",
+ "fedorainfracloud.org",
+ "fedorapeople.org",
+ "cloud.fedoraproject.org",
+ "filegear.me",
"firebaseapp.com",
"flynnhub.com",
"freebox-os.com",
@@ -7795,6 +7908,7 @@ var rules = [...]string{
"blogspot.ug",
"blogspot.vn",
"cloudfunctions.net",
+ "cloud.goog",
"codespot.com",
"googleapis.com",
"googlecode.com",
@@ -7807,6 +7921,7 @@ var rules = [...]string{
"hepforge.org",
"herokuapp.com",
"herokussl.com",
+ "moonscale.net",
"iki.fi",
"biz.at",
"info.at",
@@ -7837,6 +7952,7 @@ var rules = [...]string{
"se.leg.br",
"sp.leg.br",
"to.leg.br",
+ "ipifony.net",
"*.triton.zone",
"*.cns.joyent.com",
"js.org",
@@ -7844,7 +7960,16 @@ var rules = [...]string{
"knightpoint.systems",
"co.krd",
"edu.krd",
+ "barsy.bg",
+ "barsyonline.com",
+ "barsy.de",
+ "barsy.eu",
+ "barsy.in",
+ "barsy.net",
+ "barsy.online",
+ "barsy.support",
"*.magentosite.cloud",
+ "hb.cldmail.ru",
"meteorapp.com",
"eu.meteorapp.com",
"co.pl",
@@ -7942,7 +8067,10 @@ var rules = [...]string{
"sytes.net",
"webhop.me",
"zapto.org",
+ "nodum.co",
+ "nodum.io",
"nyc.mn",
+ "cya.gg",
"nid.io",
"opencraft.hosting",
"operaunite.com",
@@ -7961,6 +8089,8 @@ var rules = [...]string{
"gotpantheon.com",
"mypep.link",
"on-web.fr",
+ "*.platform.sh",
+ "*.platformsh.site",
"xen.prgmr.com",
"priv.at",
"protonet.io",
@@ -7969,6 +8099,9 @@ var rules = [...]string{
"dev-myqnapcloud.com",
"alpha-myqnapcloud.com",
"myqnapcloud.com",
+ "*.quipelements.com",
+ "vapor.cloud",
+ "vaporcloud.io",
"rackmaze.com",
"rackmaze.net",
"rhcloud.com",
@@ -7989,6 +8122,7 @@ var rules = [...]string{
"my-firewall.org",
"myfirewall.org",
"spdns.org",
+ "*.sensiosite.cloud",
"biz.ua",
"co.ua",
"pp.ua",
@@ -8009,6 +8143,7 @@ var rules = [...]string{
"*.stolos.io",
"spacekit.io",
"stackspace.space",
+ "storj.farm",
"diskstation.me",
"dscloud.biz",
"dscloud.me",
@@ -8022,6 +8157,7 @@ var rules = [...]string{
"i234.me",
"myds.me",
"synology.me",
+ "vpnplus.to",
"taifun-dns.de",
"gda.pl",
"gdansk.pl",
@@ -8047,14 +8183,18 @@ var rules = [...]string{
"syno-ds.de",
"synology-diskstation.de",
"synology-ds.de",
+ "uber.space",
"hk.com",
"hk.org",
"ltd.hk",
"inc.hk",
"lib.de.us",
"router.management",
+ "wedeploy.io",
+ "wedeploy.me",
"remotewd.com",
"wmflabs.org",
+ "xs4all.space",
"yolasite.com",
"ybo.faith",
"yombo.me",
@@ -8066,9 +8206,6 @@ var rules = [...]string{
"za.net",
"za.org",
"now.sh",
- "cc.ua",
- "inf.ua",
- "ltd.ua",
}
var nodeLabels = [...]string{
@@ -8449,7 +8586,6 @@ var nodeLabels = [...]string{
"durban",
"dvag",
"dvr",
- "dwg",
"dz",
"earth",
"eat",
@@ -8682,7 +8818,6 @@ var nodeLabels = [...]string{
"ie",
"ieee",
"ifm",
- "iinet",
"ikano",
"il",
"im",
@@ -8929,7 +9064,6 @@ var nodeLabels = [...]string{
"mu",
"museum",
"mutual",
- "mutuelle",
"mv",
"mw",
"mx",
@@ -9009,7 +9143,6 @@ var nodeLabels = [...]string{
"orange",
"org",
"organic",
- "orientexpress",
"origins",
"osaka",
"otsuka",
@@ -9139,6 +9272,7 @@ var nodeLabels = [...]string{
"rs",
"rsvp",
"ru",
+ "rugby",
"ruhr",
"run",
"rw",
@@ -9309,7 +9443,6 @@ var nodeLabels = [...]string{
"thd",
"theater",
"theatre",
- "theguardian",
"tiaa",
"tickets",
"tienda",
@@ -9463,7 +9596,6 @@ var nodeLabels = [...]string{
"xn--45brj9c",
"xn--45q11c",
"xn--4gbrim",
- "xn--4gq48lf9j",
"xn--54b7fta0cc",
"xn--55qw42g",
"xn--55qx5d",
@@ -9762,6 +9894,7 @@ var nodeLabels = [...]string{
"gov",
"int",
"mil",
+ "musica",
"net",
"org",
"tur",
@@ -9865,6 +9998,7 @@ var nodeLabels = [...]string{
"9",
"a",
"b",
+ "barsy",
"blogspot",
"c",
"d",
@@ -9938,6 +10072,7 @@ var nodeLabels = [...]string{
"art",
"ato",
"b",
+ "belem",
"bio",
"blog",
"bmd",
@@ -9946,6 +10081,8 @@ var nodeLabels = [...]string{
"cnt",
"com",
"coop",
+ "cri",
+ "def",
"ecn",
"eco",
"edu",
@@ -9956,6 +10093,7 @@ var nodeLabels = [...]string{
"eti",
"far",
"flog",
+ "floripa",
"fm",
"fnd",
"fot",
@@ -9966,6 +10104,7 @@ var nodeLabels = [...]string{
"imb",
"ind",
"inf",
+ "jampa",
"jor",
"jus",
"leg",
@@ -9981,6 +10120,7 @@ var nodeLabels = [...]string{
"ntr",
"odo",
"org",
+ "poa",
"ppg",
"pro",
"psc",
@@ -9988,6 +10128,7 @@ var nodeLabels = [...]string{
"qsl",
"radio",
"rec",
+ "recife",
"slg",
"srv",
"taxi",
@@ -9997,6 +10138,7 @@ var nodeLabels = [...]string{
"tur",
"tv",
"vet",
+ "vix",
"vlog",
"wiki",
"zlg",
@@ -10028,6 +10170,33 @@ var nodeLabels = [...]string{
"se",
"sp",
"to",
+ "ac",
+ "al",
+ "am",
+ "ap",
+ "ba",
+ "ce",
+ "df",
+ "es",
+ "go",
+ "ma",
+ "mg",
+ "ms",
+ "mt",
+ "pa",
+ "pb",
+ "pe",
+ "pi",
+ "pr",
+ "rj",
+ "rn",
+ "ro",
+ "rr",
+ "rs",
+ "sc",
+ "se",
+ "sp",
+ "to",
"com",
"edu",
"gov",
@@ -10052,6 +10221,7 @@ var nodeLabels = [...]string{
"org",
"za",
"ab",
+ "awdev",
"bc",
"blogspot",
"co",
@@ -10075,10 +10245,12 @@ var nodeLabels = [...]string{
"game-server",
"myphotos",
"scrapping",
+ "twmail",
"gov",
"blogspot",
"blogspot",
"gotdns",
+ "square7",
"ac",
"asso",
"co",
@@ -10102,7 +10274,9 @@ var nodeLabels = [...]string{
"mil",
"magentosite",
"myfusion",
+ "sensiosite",
"statics",
+ "vapor",
"cloudns",
"co",
"com",
@@ -10167,6 +10341,7 @@ var nodeLabels = [...]string{
"int",
"mil",
"net",
+ "nodum",
"nom",
"org",
"rec",
@@ -10183,12 +10358,14 @@ var nodeLabels = [...]string{
"applinzi",
"appspot",
"ar",
+ "barsyonline",
"betainabox",
"blogdns",
"blogspot",
"blogsyte",
"bloxcms",
"bounty-full",
+ "bplaced",
"br",
"cechire",
"ciscofreak",
@@ -10401,6 +10578,7 @@ var nodeLabels = [...]string{
"qa2",
"qc",
"quicksytes",
+ "quipelements",
"rackmaze",
"remotewd",
"rhcloud",
@@ -10456,6 +10634,7 @@ var nodeLabels = [...]string{
"elb",
"eu-central-1",
"eu-west-1",
+ "eu-west-2",
"s3",
"s3-ap-northeast-1",
"s3-ap-northeast-2",
@@ -10465,6 +10644,7 @@ var nodeLabels = [...]string{
"s3-ca-central-1",
"s3-eu-central-1",
"s3-eu-west-1",
+ "s3-eu-west-2",
"s3-external-1",
"s3-fips-us-gov-west-1",
"s3-sa-east-1",
@@ -10509,6 +10689,10 @@ var nodeLabels = [...]string{
"s3",
"dualstack",
"s3",
+ "s3-website",
+ "s3",
+ "dualstack",
+ "s3",
"dualstack",
"s3",
"dualstack",
@@ -10519,8 +10703,10 @@ var nodeLabels = [...]string{
"beta",
"eu-1",
"eu-2",
+ "eu-3",
"us-1",
"us-2",
+ "us-3",
"apps",
"api",
"ext",
@@ -10566,7 +10752,9 @@ var nodeLabels = [...]string{
"co",
"e4",
"realm",
+ "barsy",
"blogspot",
+ "bplaced",
"com",
"cosidns",
"dd-dns",
@@ -10599,6 +10787,7 @@ var nodeLabels = [...]string{
"my-wan",
"myhome-server",
"spdns",
+ "square7",
"syno-ds",
"synology-diskstation",
"synology-ds",
@@ -10685,6 +10874,7 @@ var nodeLabels = [...]string{
"name",
"net",
"org",
+ "barsy",
"cloudns",
"diskstation",
"mycd",
@@ -10694,6 +10884,7 @@ var nodeLabels = [...]string{
"party",
"user",
"ybo",
+ "storj",
"aland",
"blogspot",
"dy",
@@ -10737,6 +10928,7 @@ var nodeLabels = [...]string{
"org",
"pvt",
"co",
+ "cya",
"net",
"org",
"com",
@@ -10761,6 +10953,7 @@ var nodeLabels = [...]string{
"gov",
"net",
"org",
+ "cloud",
"asso",
"com",
"edu",
@@ -10905,6 +11098,7 @@ var nodeLabels = [...]string{
"ltd",
"plc",
"ac",
+ "barsy",
"blogspot",
"cloudns",
"co",
@@ -10940,6 +11134,7 @@ var nodeLabels = [...]string{
"browsersafetymark",
"com",
"dedyn",
+ "definima",
"drud",
"enonic",
"github",
@@ -10949,12 +11144,15 @@ var nodeLabels = [...]string{
"lair",
"ngrok",
"nid",
+ "nodum",
"pantheonsite",
"protonet",
"sandcats",
"shiftedit",
"spacekit",
"stolos",
+ "vaporcloud",
+ "wedeploy",
"customer",
"apps",
"com",
@@ -13319,6 +13517,7 @@ var nodeLabels = [...]string{
"blogspot",
"ac",
"brasilia",
+ "c66",
"co",
"daplie",
"ddns",
@@ -13326,6 +13525,7 @@ var nodeLabels = [...]string{
"dnsfor",
"dscloud",
"edu",
+ "filegear",
"gov",
"hopto",
"i234",
@@ -13338,7 +13538,9 @@ var nodeLabels = [...]string{
"priv",
"synology",
"webhop",
+ "wedeploy",
"yombo",
+ "localhost",
"co",
"com",
"edu",
@@ -14009,12 +14211,15 @@ var nodeLabels = [...]string{
"forgot",
"forgot",
"asso",
+ "nom",
"alwaysdata",
"at-band-camp",
"azure-mobile",
"azurewebsites",
+ "barsy",
"blogdns",
"bounceme",
+ "bplaced",
"broke-it",
"buyshouses",
"cdn77",
@@ -14024,6 +14229,7 @@ var nodeLabels = [...]string{
"cloudfunctions",
"cryptonomic",
"ddns",
+ "definima",
"dnsalias",
"dnsdojo",
"does-it",
@@ -14053,12 +14259,14 @@ var nodeLabels = [...]string{
"hu",
"in",
"in-the-band",
+ "ipifony",
"is-a-chef",
"is-a-geek",
"isa-geek",
"jp",
"kicks-ass",
"knx-server",
+ "moonscale",
"mydissent",
"myeffect",
"myfritz",
@@ -14073,6 +14281,7 @@ var nodeLabels = [...]string{
"privatizehealthinsurance",
"rackmaze",
"redirectme",
+ "ru",
"scrapper-site",
"se",
"selfip",
@@ -14081,14 +14290,17 @@ var nodeLabels = [...]string{
"serveblog",
"serveftp",
"serveminecraft",
+ "square7",
"static-access",
"sytes",
"t3l3p0rt",
"thruhere",
+ "twmail",
"uk",
"webhop",
"za",
"r",
+ "freetls",
"map",
"prod",
"ssl",
@@ -14942,6 +15154,7 @@ var nodeLabels = [...]string{
"org",
"pro",
"homelink",
+ "barsy",
"ae",
"amune",
"blogdns",
@@ -14971,6 +15184,9 @@ var nodeLabels = [...]string{
"endoftheinternet",
"eu",
"familyds",
+ "fedorainfracloud",
+ "fedorapeople",
+ "fedoraproject",
"from-me",
"game-host",
"gotdns",
@@ -15026,6 +15242,7 @@ var nodeLabels = [...]string{
"sweetpepper",
"tunk",
"tuxfamily",
+ "twmail",
"ufcfan",
"us",
"webhop",
@@ -15094,6 +15311,7 @@ var nodeLabels = [...]string{
"tr",
"uk",
"us",
+ "cloud",
"nerdpol",
"abo",
"ac",
@@ -15448,12 +15666,33 @@ var nodeLabels = [...]string{
"in",
"org",
"ac",
+ "adygeya",
+ "bashkiria",
+ "bir",
"blogspot",
+ "cbg",
+ "cldmail",
+ "com",
+ "dagestan",
"edu",
"gov",
+ "grozny",
"int",
+ "kalmykia",
+ "kustanai",
+ "marine",
"mil",
+ "mordovia",
+ "msk",
+ "mytis",
+ "nalchik",
+ "nov",
+ "pyatigorsk",
+ "spb",
"test",
+ "vladikavkaz",
+ "vladimir",
+ "hb",
"ac",
"co",
"com",
@@ -15548,6 +15787,7 @@ var nodeLabels = [...]string{
"platform",
"blogspot",
"cyon",
+ "platformsh",
"blogspot",
"com",
"edu",
@@ -15566,6 +15806,8 @@ var nodeLabels = [...]string{
"net",
"org",
"stackspace",
+ "uber",
+ "xs4all",
"co",
"com",
"consulado",
@@ -15578,38 +15820,59 @@ var nodeLabels = [...]string{
"principe",
"saotome",
"store",
+ "abkhazia",
"adygeya",
+ "aktyubinsk",
"arkhangelsk",
+ "armenia",
+ "ashgabad",
+ "azerbaijan",
"balashov",
"bashkiria",
"bryansk",
+ "bukhara",
+ "chimkent",
"dagestan",
+ "east-kazakhstan",
+ "exnet",
+ "georgia",
"grozny",
"ivanovo",
+ "jambyl",
"kalmykia",
"kaluga",
+ "karacol",
+ "karaganda",
"karelia",
"khakassia",
"krasnodar",
"kurgan",
+ "kustanai",
"lenug",
+ "mangyshlak",
"mordovia",
"msk",
"murmansk",
"nalchik",
+ "navoi",
+ "north-kazakhstan",
"nov",
"obninsk",
"penza",
"pokrovsk",
"sochi",
"spb",
+ "tashkent",
+ "termez",
"togliatti",
"troitsk",
+ "tselinograd",
"tula",
"tuva",
"vladikavkaz",
"vladimir",
"vologda",
+ "barsy",
"com",
"edu",
"gob",
@@ -15684,6 +15947,7 @@ var nodeLabels = [...]string{
"mil",
"net",
"org",
+ "vpnplus",
"av",
"bbs",
"bel",
@@ -15740,9 +16004,11 @@ var nodeLabels = [...]string{
"mil",
"net",
"org",
+ "url",
"xn--czrw28b",
"xn--uc0atv",
"xn--zf0ao64a",
+ "mymailer",
"ac",
"co",
"go",
@@ -16149,6 +16415,7 @@ var nodeLabels = [...]string{
"edu",
"net",
"org",
+ "advisor",
"com",
"dyndns",
"edu",
@@ -16162,6 +16429,12 @@ var nodeLabels = [...]string{
"xn--d1at",
"xn--o1ac",
"xn--o1ach",
+ "xn--12c1fe0br",
+ "xn--12cfi8ixb8l",
+ "xn--12co0c3b4eva",
+ "xn--h3cuzk1di",
+ "xn--m3ch0j3a",
+ "xn--o3cyx2a",
"fhapp",
"ac",
"agric",
@@ -16193,4 +16466,9 @@ var nodeLabels = [...]string{
"org",
"sch",
"triton",
+ "ac",
+ "co",
+ "gov",
+ "mil",
+ "org",
}
diff --git a/vendor/golang.org/x/net/route/defs_openbsd.go b/vendor/golang.org/x/net/route/defs_openbsd.go
index 0f66d3619..173bb5d51 100644
--- a/vendor/golang.org/x/net/route/defs_openbsd.go
+++ b/vendor/golang.org/x/net/route/defs_openbsd.go
@@ -69,6 +69,9 @@ const (
sysRTM_IFINFO = C.RTM_IFINFO
sysRTM_IFANNOUNCE = C.RTM_IFANNOUNCE
sysRTM_DESYNC = C.RTM_DESYNC
+ sysRTM_INVALIDATE = C.RTM_INVALIDATE
+ sysRTM_BFD = C.RTM_BFD
+ sysRTM_PROPOSAL = C.RTM_PROPOSAL
sysRTA_DST = C.RTA_DST
sysRTA_GATEWAY = C.RTA_GATEWAY
@@ -81,6 +84,10 @@ const (
sysRTA_SRC = C.RTA_SRC
sysRTA_SRCMASK = C.RTA_SRCMASK
sysRTA_LABEL = C.RTA_LABEL
+ sysRTA_BFD = C.RTA_BFD
+ sysRTA_DNS = C.RTA_DNS
+ sysRTA_STATIC = C.RTA_STATIC
+ sysRTA_SEARCH = C.RTA_SEARCH
sysRTAX_DST = C.RTAX_DST
sysRTAX_GATEWAY = C.RTAX_GATEWAY
@@ -93,6 +100,10 @@ const (
sysRTAX_SRC = C.RTAX_SRC
sysRTAX_SRCMASK = C.RTAX_SRCMASK
sysRTAX_LABEL = C.RTAX_LABEL
+ sysRTAX_BFD = C.RTAX_BFD
+ sysRTAX_DNS = C.RTAX_DNS
+ sysRTAX_STATIC = C.RTAX_STATIC
+ sysRTAX_SEARCH = C.RTAX_SEARCH
sysRTAX_MAX = C.RTAX_MAX
)
diff --git a/vendor/golang.org/x/net/route/message_darwin_test.go b/vendor/golang.org/x/net/route/message_darwin_test.go
index 3fdd12df5..316aa7507 100644
--- a/vendor/golang.org/x/net/route/message_darwin_test.go
+++ b/vendor/golang.org/x/net/route/message_darwin_test.go
@@ -7,21 +7,28 @@ package route
import "testing"
func TestFetchAndParseRIBOnDarwin(t *testing.T) {
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- for _, typ := range []RIBType{sysNET_RT_FLAGS, sysNET_RT_DUMP2, sysNET_RT_IFLIST2} {
- ms, err := fetchAndParseRIB(af, typ)
+ for _, typ := range []RIBType{sysNET_RT_FLAGS, sysNET_RT_DUMP2, sysNET_RT_IFLIST2} {
+ var lastErr error
+ var ms []Message
+ for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
+ rs, err := fetchAndParseRIB(af, typ)
if err != nil {
- t.Error(err)
+ lastErr = err
continue
}
- ss, err := msgs(ms).validate()
- if err != nil {
- t.Errorf("%v %d %v", addrFamily(af), typ, err)
- continue
- }
- for _, s := range ss {
- t.Log(s)
- }
+ ms = append(ms, rs...)
+ }
+ if len(ms) == 0 && lastErr != nil {
+ t.Error(typ, lastErr)
+ continue
+ }
+ ss, err := msgs(ms).validate()
+ if err != nil {
+ t.Error(typ, err)
+ continue
+ }
+ for _, s := range ss {
+ t.Log(s)
}
}
}
diff --git a/vendor/golang.org/x/net/route/message_freebsd_test.go b/vendor/golang.org/x/net/route/message_freebsd_test.go
index 785c273f6..db4b56752 100644
--- a/vendor/golang.org/x/net/route/message_freebsd_test.go
+++ b/vendor/golang.org/x/net/route/message_freebsd_test.go
@@ -6,26 +6,32 @@ package route
import (
"testing"
- "time"
"unsafe"
)
func TestFetchAndParseRIBOnFreeBSD(t *testing.T) {
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- for _, typ := range []RIBType{sysNET_RT_IFMALIST} {
- ms, err := fetchAndParseRIB(af, typ)
+ for _, typ := range []RIBType{sysNET_RT_IFMALIST} {
+ var lastErr error
+ var ms []Message
+ for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
+ rs, err := fetchAndParseRIB(af, typ)
if err != nil {
- t.Error(err)
+ lastErr = err
continue
}
- ss, err := msgs(ms).validate()
- if err != nil {
- t.Errorf("%v %d %v", addrFamily(af), typ, err)
- continue
- }
- for _, s := range ss {
- t.Log(s)
- }
+ ms = append(ms, rs...)
+ }
+ if len(ms) == 0 && lastErr != nil {
+ t.Error(typ, lastErr)
+ continue
+ }
+ ss, err := msgs(ms).validate()
+ if err != nil {
+ t.Error(typ, err)
+ continue
+ }
+ for _, s := range ss {
+ t.Log(s)
}
}
}
@@ -48,58 +54,38 @@ func TestFetchAndParseRIBOnFreeBSD10AndAbove(t *testing.T) {
{typ: sysNET_RT_IFLIST},
{typ: sysNET_RT_IFLISTL},
}
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
+ for i := range tests {
var lastErr error
- for i := 0; i < 3; i++ {
- for j := range tests {
- var err error
- if tests[j].b, err = FetchRIB(af, tests[j].typ, 0); err != nil {
- lastErr = err
- time.Sleep(10 * time.Millisecond)
- }
- }
- if lastErr == nil {
- break
- }
- }
- if lastErr != nil {
- t.Error(af, lastErr)
- continue
- }
- for i := range tests {
- var err error
- if tests[i].msgs, err = ParseRIB(tests[i].typ, tests[i].b); err != nil {
- lastErr = err
- t.Error(af, err)
- }
- }
- if lastErr != nil {
- continue
- }
- for i := range tests {
- var err error
- tests[i].ss, err = msgs(tests[i].msgs).validate()
+ for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
+ rs, err := fetchAndParseRIB(af, tests[i].typ)
if err != nil {
lastErr = err
- t.Error(af, err)
- }
- for _, s := range tests[i].ss {
- t.Log(s)
- }
- }
- if lastErr != nil {
- continue
- }
- for i := len(tests) - 1; i > 0; i-- {
- if len(tests[i].ss) != len(tests[i-1].ss) {
- t.Errorf("got %v; want %v", tests[i].ss, tests[i-1].ss)
continue
}
- for j, s1 := range tests[i].ss {
- s0 := tests[i-1].ss[j]
- if s1 != s0 {
- t.Errorf("got %s; want %s", s1, s0)
- }
+ tests[i].msgs = append(tests[i].msgs, rs...)
+ }
+ if len(tests[i].msgs) == 0 && lastErr != nil {
+ t.Error(tests[i].typ, lastErr)
+ continue
+ }
+ tests[i].ss, lastErr = msgs(tests[i].msgs).validate()
+ if lastErr != nil {
+ t.Error(tests[i].typ, lastErr)
+ continue
+ }
+ for _, s := range tests[i].ss {
+ t.Log(s)
+ }
+ }
+ for i := len(tests) - 1; i > 0; i-- {
+ if len(tests[i].ss) != len(tests[i-1].ss) {
+ t.Errorf("got %v; want %v", tests[i].ss, tests[i-1].ss)
+ continue
+ }
+ for j, s1 := range tests[i].ss {
+ s0 := tests[i-1].ss[j]
+ if s1 != s0 {
+ t.Errorf("got %s; want %s", s1, s0)
}
}
}
diff --git a/vendor/golang.org/x/net/route/message_test.go b/vendor/golang.org/x/net/route/message_test.go
index b3bc60c62..e848dabf4 100644
--- a/vendor/golang.org/x/net/route/message_test.go
+++ b/vendor/golang.org/x/net/route/message_test.go
@@ -14,21 +14,28 @@ import (
)
func TestFetchAndParseRIB(t *testing.T) {
- for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
- for _, typ := range []RIBType{sysNET_RT_DUMP, sysNET_RT_IFLIST} {
- ms, err := fetchAndParseRIB(af, typ)
+ for _, typ := range []RIBType{sysNET_RT_DUMP, sysNET_RT_IFLIST} {
+ var lastErr error
+ var ms []Message
+ for _, af := range []int{sysAF_UNSPEC, sysAF_INET, sysAF_INET6} {
+ rs, err := fetchAndParseRIB(af, typ)
if err != nil {
- t.Error(err)
+ lastErr = err
continue
}
- ss, err := msgs(ms).validate()
- if err != nil {
- t.Errorf("%v %d %v", addrFamily(af), typ, err)
- continue
- }
- for _, s := range ss {
- t.Log(s)
- }
+ ms = append(ms, rs...)
+ }
+ if len(ms) == 0 && lastErr != nil {
+ t.Error(typ, lastErr)
+ continue
+ }
+ ss, err := msgs(ms).validate()
+ if err != nil {
+ t.Error(typ, err)
+ continue
+ }
+ for _, s := range ss {
+ t.Log(typ, s)
}
}
}
@@ -145,8 +152,8 @@ func TestRouteMessage(t *testing.T) {
var ms []RouteMessage
for _, af := range []int{sysAF_INET, sysAF_INET6} {
- rs, err := fetchAndParseRIB(af, sysNET_RT_DUMP)
- if err != nil || len(rs) == 0 {
+ if _, err := fetchAndParseRIB(af, sysNET_RT_DUMP); err != nil {
+ t.Log(err)
continue
}
switch af {
@@ -228,6 +235,5 @@ func TestRouteMessage(t *testing.T) {
for _, s := range ss {
t.Log(s)
}
-
}
}
diff --git a/vendor/golang.org/x/net/route/route_test.go b/vendor/golang.org/x/net/route/route_test.go
index 63fd8c561..61bd17454 100644
--- a/vendor/golang.org/x/net/route/route_test.go
+++ b/vendor/golang.org/x/net/route/route_test.go
@@ -74,6 +74,10 @@ var addrAttrNames = [...]string{
"df:mpls1-n:tag-o:src", // mpls1 for dragonfly, tag for netbsd, src for openbsd
"df:mpls2-o:srcmask", // mpls2 for dragonfly, srcmask for openbsd
"df:mpls3-o:label", // mpls3 for dragonfly, label for openbsd
+ "o:bfd", // bfd for openbsd
+ "o:dns", // dns for openbsd
+ "o:static", // static for openbsd
+ "o:search", // search for openbsd
}
func (attrs addrAttrs) String() string {
diff --git a/vendor/golang.org/x/net/route/sys_darwin.go b/vendor/golang.org/x/net/route/sys_darwin.go
index e742c919d..d2daf5c05 100644
--- a/vendor/golang.org/x/net/route/sys_darwin.go
+++ b/vendor/golang.org/x/net/route/sys_darwin.go
@@ -13,7 +13,7 @@ func (typ RIBType) parseable() bool {
}
}
-// A RouteMetrics represents route metrics.
+// RouteMetrics represents route metrics.
type RouteMetrics struct {
PathMTU int // path maximum transmission unit
}
@@ -30,7 +30,7 @@ func (m *RouteMessage) Sys() []Sys {
}
}
-// A InterfaceMetrics represents interface metrics.
+// InterfaceMetrics represents interface metrics.
type InterfaceMetrics struct {
Type int // interface type
MTU int // maximum transmission unit
diff --git a/vendor/golang.org/x/net/route/sys_dragonfly.go b/vendor/golang.org/x/net/route/sys_dragonfly.go
index b175cb18c..0c14bc2b4 100644
--- a/vendor/golang.org/x/net/route/sys_dragonfly.go
+++ b/vendor/golang.org/x/net/route/sys_dragonfly.go
@@ -8,7 +8,7 @@ import "unsafe"
func (typ RIBType) parseable() bool { return true }
-// A RouteMetrics represents route metrics.
+// RouteMetrics represents route metrics.
type RouteMetrics struct {
PathMTU int // path maximum transmission unit
}
@@ -25,7 +25,7 @@ func (m *RouteMessage) Sys() []Sys {
}
}
-// A InterfaceMetrics represents interface metrics.
+// InterfaceMetrics represents interface metrics.
type InterfaceMetrics struct {
Type int // interface type
MTU int // maximum transmission unit
diff --git a/vendor/golang.org/x/net/route/sys_freebsd.go b/vendor/golang.org/x/net/route/sys_freebsd.go
index 010d4ae78..89ba1c4e2 100644
--- a/vendor/golang.org/x/net/route/sys_freebsd.go
+++ b/vendor/golang.org/x/net/route/sys_freebsd.go
@@ -11,7 +11,7 @@ import (
func (typ RIBType) parseable() bool { return true }
-// A RouteMetrics represents route metrics.
+// RouteMetrics represents route metrics.
type RouteMetrics struct {
PathMTU int // path maximum transmission unit
}
@@ -35,7 +35,7 @@ func (m *RouteMessage) Sys() []Sys {
}
}
-// A InterfaceMetrics represents interface metrics.
+// InterfaceMetrics represents interface metrics.
type InterfaceMetrics struct {
Type int // interface type
MTU int // maximum transmission unit
diff --git a/vendor/golang.org/x/net/route/sys_netbsd.go b/vendor/golang.org/x/net/route/sys_netbsd.go
index b4e330140..02f71d54b 100644
--- a/vendor/golang.org/x/net/route/sys_netbsd.go
+++ b/vendor/golang.org/x/net/route/sys_netbsd.go
@@ -6,7 +6,7 @@ package route
func (typ RIBType) parseable() bool { return true }
-// A RouteMetrics represents route metrics.
+// RouteMetrics represents route metrics.
type RouteMetrics struct {
PathMTU int // path maximum transmission unit
}
@@ -23,7 +23,7 @@ func (m *RouteMessage) Sys() []Sys {
}
}
-// A InterfaceMetrics represents interface metrics.
+// RouteMetrics represents route metrics.
type InterfaceMetrics struct {
Type int // interface type
MTU int // maximum transmission unit
diff --git a/vendor/golang.org/x/net/route/sys_openbsd.go b/vendor/golang.org/x/net/route/sys_openbsd.go
index 8798dc4ca..c5674e83d 100644
--- a/vendor/golang.org/x/net/route/sys_openbsd.go
+++ b/vendor/golang.org/x/net/route/sys_openbsd.go
@@ -15,7 +15,7 @@ func (typ RIBType) parseable() bool {
}
}
-// A RouteMetrics represents route metrics.
+// RouteMetrics represents route metrics.
type RouteMetrics struct {
PathMTU int // path maximum transmission unit
}
@@ -32,7 +32,7 @@ func (m *RouteMessage) Sys() []Sys {
}
}
-// A InterfaceMetrics represents interface metrics.
+// InterfaceMetrics represents interface metrics.
type InterfaceMetrics struct {
Type int // interface type
MTU int // maximum transmission unit
@@ -75,5 +75,6 @@ func probeRoutingStack() (int, map[int]*wireFormat) {
sysRTM_DELADDR: ifam,
sysRTM_IFINFO: ifm,
sysRTM_IFANNOUNCE: ifanm,
+ sysRTM_DESYNC: rtm,
}
}
diff --git a/vendor/golang.org/x/net/route/zsys_openbsd.go b/vendor/golang.org/x/net/route/zsys_openbsd.go
index f5a1ff967..db8c8efb4 100644
--- a/vendor/golang.org/x/net/route/zsys_openbsd.go
+++ b/vendor/golang.org/x/net/route/zsys_openbsd.go
@@ -54,6 +54,9 @@ const (
sysRTM_IFINFO = 0xe
sysRTM_IFANNOUNCE = 0xf
sysRTM_DESYNC = 0x10
+ sysRTM_INVALIDATE = 0x11
+ sysRTM_BFD = 0x12
+ sysRTM_PROPOSAL = 0x13
sysRTA_DST = 0x1
sysRTA_GATEWAY = 0x2
@@ -66,6 +69,10 @@ const (
sysRTA_SRC = 0x100
sysRTA_SRCMASK = 0x200
sysRTA_LABEL = 0x400
+ sysRTA_BFD = 0x800
+ sysRTA_DNS = 0x1000
+ sysRTA_STATIC = 0x2000
+ sysRTA_SEARCH = 0x4000
sysRTAX_DST = 0x0
sysRTAX_GATEWAY = 0x1
@@ -78,7 +85,11 @@ const (
sysRTAX_SRC = 0x8
sysRTAX_SRCMASK = 0x9
sysRTAX_LABEL = 0xa
- sysRTAX_MAX = 0xb
+ sysRTAX_BFD = 0xb
+ sysRTAX_DNS = 0xc
+ sysRTAX_STATIC = 0xd
+ sysRTAX_SEARCH = 0xe
+ sysRTAX_MAX = 0xf
)
const (
diff --git a/vendor/golang.org/x/net/trace/events.go b/vendor/golang.org/x/net/trace/events.go
index d8daec1a7..c646a6952 100644
--- a/vendor/golang.org/x/net/trace/events.go
+++ b/vendor/golang.org/x/net/trace/events.go
@@ -39,9 +39,9 @@ var buckets = []bucket{
}
// RenderEvents renders the HTML page typically served at /debug/events.
-// It does not do any auth checking; see AuthRequest for the default auth check
-// used by the handler registered on http.DefaultServeMux.
-// req may be nil.
+// It does not do any auth checking. The request may be nil.
+//
+// Most users will use the Events handler.
func RenderEvents(w http.ResponseWriter, req *http.Request, sensitive bool) {
now := time.Now()
data := &struct {
diff --git a/vendor/golang.org/x/net/trace/trace.go b/vendor/golang.org/x/net/trace/trace.go
index 1f250a2db..bb72a527e 100644
--- a/vendor/golang.org/x/net/trace/trace.go
+++ b/vendor/golang.org/x/net/trace/trace.go
@@ -64,7 +64,6 @@ package trace // import "golang.org/x/net/trace"
import (
"bytes"
- "context"
"fmt"
"html/template"
"io"
@@ -111,30 +110,46 @@ var AuthRequest = func(req *http.Request) (any, sensitive bool) {
}
func init() {
- http.HandleFunc("/debug/requests", func(w http.ResponseWriter, req *http.Request) {
- any, sensitive := AuthRequest(req)
- if !any {
- http.Error(w, "not allowed", http.StatusUnauthorized)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- Render(w, req, sensitive)
- })
- http.HandleFunc("/debug/events", func(w http.ResponseWriter, req *http.Request) {
- any, sensitive := AuthRequest(req)
- if !any {
- http.Error(w, "not allowed", http.StatusUnauthorized)
- return
- }
- w.Header().Set("Content-Type", "text/html; charset=utf-8")
- RenderEvents(w, req, sensitive)
- })
+ // TODO(jbd): Serve Traces from /debug/traces in the future?
+ // There is no requirement for a request to be present to have traces.
+ http.HandleFunc("/debug/requests", Traces)
+ http.HandleFunc("/debug/events", Events)
+}
+
+// Traces responds with traces from the program.
+// The package initialization registers it in http.DefaultServeMux
+// at /debug/requests.
+//
+// It performs authorization by running AuthRequest.
+func Traces(w http.ResponseWriter, req *http.Request) {
+ any, sensitive := AuthRequest(req)
+ if !any {
+ http.Error(w, "not allowed", http.StatusUnauthorized)
+ return
+ }
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
+ Render(w, req, sensitive)
+}
+
+// Events responds with a page of events collected by EventLogs.
+// The package initialization registers it in http.DefaultServeMux
+// at /debug/events.
+//
+// It performs authorization by running AuthRequest.
+func Events(w http.ResponseWriter, req *http.Request) {
+ any, sensitive := AuthRequest(req)
+ if !any {
+ http.Error(w, "not allowed", http.StatusUnauthorized)
+ return
+ }
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
+ RenderEvents(w, req, sensitive)
}
// Render renders the HTML page typically served at /debug/requests.
-// It does not do any auth checking; see AuthRequest for the default auth check
-// used by the handler registered on http.DefaultServeMux.
-// req may be nil.
+// It does not do any auth checking. The request may be nil.
+//
+// Most users will use the Traces handler.
func Render(w io.Writer, req *http.Request, sensitive bool) {
data := &struct {
Families []string
@@ -271,18 +286,6 @@ type contextKeyT string
var contextKey = contextKeyT("golang.org/x/net/trace.Trace")
-// NewContext returns a copy of the parent context
-// and associates it with a Trace.
-func NewContext(ctx context.Context, tr Trace) context.Context {
- return context.WithValue(ctx, contextKey, tr)
-}
-
-// FromContext returns the Trace bound to the context, if any.
-func FromContext(ctx context.Context) (tr Trace, ok bool) {
- tr, ok = ctx.Value(contextKey).(Trace)
- return
-}
-
// Trace represents an active request.
type Trace interface {
// LazyLog adds x to the event log. It will be evaluated each time the
diff --git a/vendor/golang.org/x/net/trace/trace_go16.go b/vendor/golang.org/x/net/trace/trace_go16.go
new file mode 100644
index 000000000..d60819118
--- /dev/null
+++ b/vendor/golang.org/x/net/trace/trace_go16.go
@@ -0,0 +1,21 @@
+// Copyright 2017 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 trace
+
+import "golang.org/x/net/context"
+
+// NewContext returns a copy of the parent context
+// and associates it with a Trace.
+func NewContext(ctx context.Context, tr Trace) context.Context {
+ return context.WithValue(ctx, contextKey, tr)
+}
+
+// FromContext returns the Trace bound to the context, if any.
+func FromContext(ctx context.Context) (tr Trace, ok bool) {
+ tr, ok = ctx.Value(contextKey).(Trace)
+ return
+}
diff --git a/vendor/golang.org/x/net/trace/trace_go17.go b/vendor/golang.org/x/net/trace/trace_go17.go
new file mode 100644
index 000000000..df6e1fba7
--- /dev/null
+++ b/vendor/golang.org/x/net/trace/trace_go17.go
@@ -0,0 +1,21 @@
+// Copyright 2017 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 trace
+
+import "context"
+
+// NewContext returns a copy of the parent context
+// and associates it with a Trace.
+func NewContext(ctx context.Context, tr Trace) context.Context {
+ return context.WithValue(ctx, contextKey, tr)
+}
+
+// FromContext returns the Trace bound to the context, if any.
+func FromContext(ctx context.Context) (tr Trace, ok bool) {
+ tr, ok = ctx.Value(contextKey).(Trace)
+ return
+}
diff --git a/vendor/golang.org/x/net/xsrftoken/xsrf.go b/vendor/golang.org/x/net/xsrftoken/xsrf.go
index 881bf199f..bc861e1f3 100644
--- a/vendor/golang.org/x/net/xsrftoken/xsrf.go
+++ b/vendor/golang.org/x/net/xsrftoken/xsrf.go
@@ -27,15 +27,18 @@ func clean(s string) string {
// Generate returns a URL-safe secure XSRF token that expires in 24 hours.
//
-// key is a secret key for your application.
-// userID is a unique identifier for the user.
-// actionID is the action the user is taking (e.g. POSTing to a particular path).
+// key is a secret key for your application; it must be non-empty.
+// userID is an optional unique identifier for the user.
+// actionID is an optional action the user is taking (e.g. POSTing to a particular path).
func Generate(key, userID, actionID string) string {
return generateTokenAtTime(key, userID, actionID, time.Now())
}
// generateTokenAtTime is like Generate, but returns a token that expires 24 hours from now.
func generateTokenAtTime(key, userID, actionID string, now time.Time) string {
+ if len(key) == 0 {
+ panic("zero length xsrf secret key")
+ }
// Round time up and convert to milliseconds.
milliTime := (now.UnixNano() + 1e6 - 1) / 1e6
@@ -57,6 +60,9 @@ func Valid(token, key, userID, actionID string) bool {
// validTokenAtTime reports whether a token is valid at the given time.
func validTokenAtTime(token, key, userID, actionID string, now time.Time) bool {
+ if len(key) == 0 {
+ panic("zero length xsrf secret key")
+ }
// Extract the issue time of the token.
sep := strings.LastIndex(token, ":")
if sep < 0 {
diff --git a/vendor/golang.org/x/sys/unix/creds_test.go b/vendor/golang.org/x/sys/unix/creds_test.go
index 7ae330532..eaae7c367 100644
--- a/vendor/golang.org/x/sys/unix/creds_test.go
+++ b/vendor/golang.org/x/sys/unix/creds_test.go
@@ -21,116 +21,101 @@ import (
// sockets. The SO_PASSCRED socket option is enabled on the sending
// socket for this to work.
func TestSCMCredentials(t *testing.T) {
- socketTypeTests := []struct {
- socketType int
- dataLen int
- }{
- {
- unix.SOCK_STREAM,
- 1,
- }, {
- unix.SOCK_DGRAM,
- 0,
- },
+ fds, err := unix.Socketpair(unix.AF_LOCAL, unix.SOCK_STREAM, 0)
+ if err != nil {
+ t.Fatalf("Socketpair: %v", err)
+ }
+ defer unix.Close(fds[0])
+ defer unix.Close(fds[1])
+
+ err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1)
+ if err != nil {
+ t.Fatalf("SetsockoptInt: %v", err)
}
- for _, tt := range socketTypeTests {
- fds, err := unix.Socketpair(unix.AF_LOCAL, tt.socketType, 0)
- if err != nil {
- t.Fatalf("Socketpair: %v", err)
- }
- defer unix.Close(fds[0])
- defer unix.Close(fds[1])
+ srvFile := os.NewFile(uintptr(fds[0]), "server")
+ defer srvFile.Close()
+ srv, err := net.FileConn(srvFile)
+ if err != nil {
+ t.Errorf("FileConn: %v", err)
+ return
+ }
+ defer srv.Close()
- err = unix.SetsockoptInt(fds[0], unix.SOL_SOCKET, unix.SO_PASSCRED, 1)
- if err != nil {
- t.Fatalf("SetsockoptInt: %v", err)
- }
-
- srvFile := os.NewFile(uintptr(fds[0]), "server")
- defer srvFile.Close()
- srv, err := net.FileConn(srvFile)
- if err != nil {
- t.Errorf("FileConn: %v", err)
- return
- }
- defer srv.Close()
-
- cliFile := os.NewFile(uintptr(fds[1]), "client")
- defer cliFile.Close()
- cli, err := net.FileConn(cliFile)
- if err != nil {
- t.Errorf("FileConn: %v", err)
- return
- }
- defer cli.Close()
-
- var ucred unix.Ucred
- if os.Getuid() != 0 {
- ucred.Pid = int32(os.Getpid())
- ucred.Uid = 0
- ucred.Gid = 0
- oob := unix.UnixCredentials(&ucred)
- _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
- if op, ok := err.(*net.OpError); ok {
- err = op.Err
- }
- if sys, ok := err.(*os.SyscallError); ok {
- err = sys.Err
- }
- if err != syscall.EPERM {
- t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
- }
- }
+ cliFile := os.NewFile(uintptr(fds[1]), "client")
+ defer cliFile.Close()
+ cli, err := net.FileConn(cliFile)
+ if err != nil {
+ t.Errorf("FileConn: %v", err)
+ return
+ }
+ defer cli.Close()
+ var ucred unix.Ucred
+ if os.Getuid() != 0 {
ucred.Pid = int32(os.Getpid())
- ucred.Uid = uint32(os.Getuid())
- ucred.Gid = uint32(os.Getgid())
+ ucred.Uid = 0
+ ucred.Gid = 0
oob := unix.UnixCredentials(&ucred)
+ _, _, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
+ if op, ok := err.(*net.OpError); ok {
+ err = op.Err
+ }
+ if sys, ok := err.(*os.SyscallError); ok {
+ err = sys.Err
+ }
+ if err != syscall.EPERM {
+ t.Fatalf("WriteMsgUnix failed with %v, want EPERM", err)
+ }
+ }
- // On SOCK_STREAM, this is internally going to send a dummy byte
- n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
- if err != nil {
- t.Fatalf("WriteMsgUnix: %v", err)
- }
- if n != 0 {
- t.Fatalf("WriteMsgUnix n = %d, want 0", n)
- }
- if oobn != len(oob) {
- t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob))
- }
+ ucred.Pid = int32(os.Getpid())
+ ucred.Uid = uint32(os.Getuid())
+ ucred.Gid = uint32(os.Getgid())
+ oob := unix.UnixCredentials(&ucred)
- oob2 := make([]byte, 10*len(oob))
- n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2)
- if err != nil {
- t.Fatalf("ReadMsgUnix: %v", err)
- }
- if flags != 0 {
- t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags)
- }
- if n != tt.dataLen {
- t.Fatalf("ReadMsgUnix n = %d, want %d", n, tt.dataLen)
- }
- if oobn2 != oobn {
- // without SO_PASSCRED set on the socket, ReadMsgUnix will
- // return zero oob bytes
- t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn)
- }
- oob2 = oob2[:oobn2]
- if !bytes.Equal(oob, oob2) {
- t.Fatal("ReadMsgUnix oob bytes don't match")
- }
+ // this is going to send a dummy byte
+ n, oobn, err := cli.(*net.UnixConn).WriteMsgUnix(nil, oob, nil)
+ if err != nil {
+ t.Fatalf("WriteMsgUnix: %v", err)
+ }
+ if n != 0 {
+ t.Fatalf("WriteMsgUnix n = %d, want 0", n)
+ }
+ if oobn != len(oob) {
+ t.Fatalf("WriteMsgUnix oobn = %d, want %d", oobn, len(oob))
+ }
- scm, err := unix.ParseSocketControlMessage(oob2)
- if err != nil {
- t.Fatalf("ParseSocketControlMessage: %v", err)
- }
- newUcred, err := unix.ParseUnixCredentials(&scm[0])
- if err != nil {
- t.Fatalf("ParseUnixCredentials: %v", err)
- }
- if *newUcred != ucred {
- t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred)
- }
+ oob2 := make([]byte, 10*len(oob))
+ n, oobn2, flags, _, err := srv.(*net.UnixConn).ReadMsgUnix(nil, oob2)
+ if err != nil {
+ t.Fatalf("ReadMsgUnix: %v", err)
+ }
+ if flags != 0 {
+ t.Fatalf("ReadMsgUnix flags = 0x%x, want 0", flags)
+ }
+ if n != 1 {
+ t.Fatalf("ReadMsgUnix n = %d, want 1 (dummy byte)", n)
+ }
+ if oobn2 != oobn {
+ // without SO_PASSCRED set on the socket, ReadMsgUnix will
+ // return zero oob bytes
+ t.Fatalf("ReadMsgUnix oobn = %d, want %d", oobn2, oobn)
+ }
+ oob2 = oob2[:oobn2]
+ if !bytes.Equal(oob, oob2) {
+ t.Fatal("ReadMsgUnix oob bytes don't match")
+ }
+
+ scm, err := unix.ParseSocketControlMessage(oob2)
+ if err != nil {
+ t.Fatalf("ParseSocketControlMessage: %v", err)
+ }
+ newUcred, err := unix.ParseUnixCredentials(&scm[0])
+ if err != nil {
+ t.Fatalf("ParseUnixCredentials: %v", err)
+ }
+ if *newUcred != ucred {
+ t.Fatalf("ParseUnixCredentials = %+v, want %+v", newUcred, ucred)
}
}
diff --git a/vendor/golang.org/x/sys/unix/dev_darwin.go b/vendor/golang.org/x/sys/unix/dev_darwin.go
deleted file mode 100644
index 7d101d527..000000000
--- a/vendor/golang.org/x/sys/unix/dev_darwin.go
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 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.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used in Darwin's sys/types.h header.
-
-package unix
-
-// Major returns the major component of a Darwin device number.
-func Major(dev uint64) uint32 {
- return uint32((dev >> 24) & 0xff)
-}
-
-// Minor returns the minor component of a Darwin device number.
-func Minor(dev uint64) uint32 {
- return uint32(dev & 0xffffff)
-}
-
-// Mkdev returns a Darwin device number generated from the given major and minor
-// components.
-func Mkdev(major, minor uint32) uint64 {
- return uint64((major << 24) | minor)
-}
diff --git a/vendor/golang.org/x/sys/unix/dev_darwin_test.go b/vendor/golang.org/x/sys/unix/dev_darwin_test.go
deleted file mode 100644
index 48d044860..000000000
--- a/vendor/golang.org/x/sys/unix/dev_darwin_test.go
+++ /dev/null
@@ -1,49 +0,0 @@
-// Copyright 2017 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 unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // Most of the device major/minor numbers on Darwin are
- // dynamically generated by devfs. These are some well-known
- // static numbers.
- {"/dev/ttyp0", 4, 0},
- {"/dev/ttys0", 4, 48},
- {"/dev/ptyp0", 5, 0},
- {"/dev/ptyr0", 5, 32},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
- }
-}
diff --git a/vendor/golang.org/x/sys/unix/dev_netbsd.go b/vendor/golang.org/x/sys/unix/dev_netbsd.go
deleted file mode 100644
index 08db58ee3..000000000
--- a/vendor/golang.org/x/sys/unix/dev_netbsd.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright 2017 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.
-
-// Functions to access/create device major and minor numbers matching the
-// encoding used in NetBSD's sys/types.h header.
-
-package unix
-
-// Major returns the major component of a NetBSD device number.
-func Major(dev uint64) uint32 {
- return uint32((dev & 0x000fff00) >> 8)
-}
-
-// Minor returns the minor component of a NetBSD device number.
-func Minor(dev uint64) uint32 {
- minor := uint32((dev & 0x000000ff) >> 0)
- minor |= uint32((dev & 0xfff00000) >> 12)
- return minor
-}
-
-// Mkdev returns a NetBSD device number generated from the given major and minor
-// components.
-func Mkdev(major, minor uint32) uint64 {
- dev := uint64((major << 8) & 0x000fff00)
- dev |= uint64((minor << 12) & 0xfff00000)
- dev |= uint64((minor << 0) & 0x000000ff)
- return dev
-}
diff --git a/vendor/golang.org/x/sys/unix/dev_netbsd_test.go b/vendor/golang.org/x/sys/unix/dev_netbsd_test.go
deleted file mode 100644
index c39a80a48..000000000
--- a/vendor/golang.org/x/sys/unix/dev_netbsd_test.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2017 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 unix_test
-
-import (
- "fmt"
- "testing"
-
- "golang.org/x/sys/unix"
-)
-
-func TestDevices(t *testing.T) {
- testCases := []struct {
- path string
- major uint32
- minor uint32
- }{
- // well known major/minor numbers according to /dev/MAKEDEV on
- // NetBSD 7.0
- {"/dev/null", 2, 2},
- {"/dev/zero", 2, 12},
- {"/dev/ttyp0", 5, 0},
- {"/dev/ttyp1", 5, 1},
- {"/dev/random", 46, 0},
- {"/dev/urandom", 46, 1},
- }
- for _, tc := range testCases {
- t.Run(fmt.Sprintf("%s %v:%v", tc.path, tc.major, tc.minor), func(t *testing.T) {
- var stat unix.Stat_t
- err := unix.Stat(tc.path, &stat)
- if err != nil {
- t.Errorf("failed to stat device: %v", err)
- return
- }
-
- dev := uint64(stat.Rdev)
- if unix.Major(dev) != tc.major {
- t.Errorf("for %s Major(%#x) == %d, want %d", tc.path, dev, unix.Major(dev), tc.major)
- }
- if unix.Minor(dev) != tc.minor {
- t.Errorf("for %s Minor(%#x) == %d, want %d", tc.path, dev, unix.Minor(dev), tc.minor)
- }
- if unix.Mkdev(tc.major, tc.minor) != dev {
- t.Errorf("for %s Mkdev(%d, %d) == %#x, want %#x", tc.path, tc.major, tc.minor, unix.Mkdev(tc.major, tc.minor), dev)
- }
- })
- }
-}
diff --git a/vendor/golang.org/x/sys/unix/linux/types.go b/vendor/golang.org/x/sys/unix/linux/types.go
index 27d9a991a..e5769db57 100644
--- a/vendor/golang.org/x/sys/unix/linux/types.go
+++ b/vendor/golang.org/x/sys/unix/linux/types.go
@@ -62,8 +62,6 @@ package unix
#include
#include
#include
-#include
-#include
// On mips64, the glibc stat and kernel stat do not agree
#if (defined(__mips__) && _MIPS_SIM == _MIPS_SIM_ABI64)
@@ -552,56 +550,3 @@ const _SC_PAGESIZE = C._SC_PAGESIZE
type Termios C.termios_t
type Winsize C.struct_winsize
-
-// Taskstats
-
-type Taskstats C.struct_taskstats
-
-const (
- TASKSTATS_CMD_UNSPEC = C.TASKSTATS_CMD_UNSPEC
- TASKSTATS_CMD_GET = C.TASKSTATS_CMD_GET
- TASKSTATS_CMD_NEW = C.TASKSTATS_CMD_NEW
- TASKSTATS_TYPE_UNSPEC = C.TASKSTATS_TYPE_UNSPEC
- TASKSTATS_TYPE_PID = C.TASKSTATS_TYPE_PID
- TASKSTATS_TYPE_TGID = C.TASKSTATS_TYPE_TGID
- TASKSTATS_TYPE_STATS = C.TASKSTATS_TYPE_STATS
- TASKSTATS_TYPE_AGGR_PID = C.TASKSTATS_TYPE_AGGR_PID
- TASKSTATS_TYPE_AGGR_TGID = C.TASKSTATS_TYPE_AGGR_TGID
- TASKSTATS_TYPE_NULL = C.TASKSTATS_TYPE_NULL
- TASKSTATS_CMD_ATTR_UNSPEC = C.TASKSTATS_CMD_ATTR_UNSPEC
- TASKSTATS_CMD_ATTR_PID = C.TASKSTATS_CMD_ATTR_PID
- TASKSTATS_CMD_ATTR_TGID = C.TASKSTATS_CMD_ATTR_TGID
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_REGISTER_CPUMASK
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = C.TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK
-)
-
-// Generic netlink
-
-type Genlmsghdr C.struct_genlmsghdr
-
-const (
- CTRL_CMD_UNSPEC = C.CTRL_CMD_UNSPEC
- CTRL_CMD_NEWFAMILY = C.CTRL_CMD_NEWFAMILY
- CTRL_CMD_DELFAMILY = C.CTRL_CMD_DELFAMILY
- CTRL_CMD_GETFAMILY = C.CTRL_CMD_GETFAMILY
- CTRL_CMD_NEWOPS = C.CTRL_CMD_NEWOPS
- CTRL_CMD_DELOPS = C.CTRL_CMD_DELOPS
- CTRL_CMD_GETOPS = C.CTRL_CMD_GETOPS
- CTRL_CMD_NEWMCAST_GRP = C.CTRL_CMD_NEWMCAST_GRP
- CTRL_CMD_DELMCAST_GRP = C.CTRL_CMD_DELMCAST_GRP
- CTRL_CMD_GETMCAST_GRP = C.CTRL_CMD_GETMCAST_GRP
- CTRL_ATTR_UNSPEC = C.CTRL_ATTR_UNSPEC
- CTRL_ATTR_FAMILY_ID = C.CTRL_ATTR_FAMILY_ID
- CTRL_ATTR_FAMILY_NAME = C.CTRL_ATTR_FAMILY_NAME
- CTRL_ATTR_VERSION = C.CTRL_ATTR_VERSION
- CTRL_ATTR_HDRSIZE = C.CTRL_ATTR_HDRSIZE
- CTRL_ATTR_MAXATTR = C.CTRL_ATTR_MAXATTR
- CTRL_ATTR_OPS = C.CTRL_ATTR_OPS
- CTRL_ATTR_MCAST_GROUPS = C.CTRL_ATTR_MCAST_GROUPS
- CTRL_ATTR_OP_UNSPEC = C.CTRL_ATTR_OP_UNSPEC
- CTRL_ATTR_OP_ID = C.CTRL_ATTR_OP_ID
- CTRL_ATTR_OP_FLAGS = C.CTRL_ATTR_OP_FLAGS
- CTRL_ATTR_MCAST_GRP_UNSPEC = C.CTRL_ATTR_MCAST_GRP_UNSPEC
- CTRL_ATTR_MCAST_GRP_NAME = C.CTRL_ATTR_MCAST_GRP_NAME
- CTRL_ATTR_MCAST_GRP_ID = C.CTRL_ATTR_MCAST_GRP_ID
-)
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 2c434f7ae..08dd77518 100755
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -181,8 +181,6 @@ struct ltchars {
#include
#include
#include
-#include
-#include
#include
#include
@@ -415,8 +413,6 @@ ccflags="$@"
$2 ~ /^SECCOMP_MODE_/ ||
$2 ~ /^SPLICE_/ ||
$2 ~ /^(VM|VMADDR)_/ ||
- $2 ~ /^(TASKSTATS|TS)_/ ||
- $2 ~ /^GENL_/ ||
$2 ~ /^XATTR_(CREATE|REPLACE)/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ ||
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 1b7d59d89..2afe62bf8 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -931,13 +931,8 @@ func Recvmsg(fd int, p, oob []byte, flags int) (n, oobn int, recvflags int, from
}
var dummy byte
if len(oob) > 0 {
- var sockType int
- sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
- if err != nil {
- return
- }
// receive at least one normal byte
- if sockType != SOCK_DGRAM && len(p) == 0 {
+ if len(p) == 0 {
iov.Base = &dummy
iov.SetLen(1)
}
@@ -983,13 +978,8 @@ func SendmsgN(fd int, p, oob []byte, to Sockaddr, flags int) (n int, err error)
}
var dummy byte
if len(oob) > 0 {
- var sockType int
- sockType, err = GetsockoptInt(fd, SOL_SOCKET, SO_TYPE)
- if err != nil {
- return 0, err
- }
// send at least one normal byte
- if sockType != SOCK_DGRAM && len(p) == 0 {
+ if len(p) == 0 {
iov.Base = &dummy
iov.SetLen(1)
}
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index 33ced1ae4..a6b3b5f14 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1639,12 +1626,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b
TCGETA = 0x5405
TCGETS = 0x5401
@@ -1784,7 +1765,6 @@ const (
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
TOSTOP = 0x100
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x400854d5
TUNDETACHFILTER = 0x400854d6
TUNGETFEATURES = 0x800454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index a6618fc11..4ffc8d29c 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1640,12 +1627,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b
TCGETA = 0x5405
TCGETS = 0x5401
@@ -1785,7 +1766,6 @@ const (
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
TOSTOP = 0x100
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6
TUNGETFEATURES = 0x800454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 1adff0b28..f4b178ef1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1644,12 +1631,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b
TCGETA = 0x5405
TCGETS = 0x5401
@@ -1789,7 +1770,6 @@ const (
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
TOSTOP = 0x100
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x400854d5
TUNDETACHFILTER = 0x400854d6
TUNGETFEATURES = 0x800454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index c0ecd47c2..495f13b61 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -508,19 +508,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1629,12 +1616,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b
TCGETA = 0x5405
TCGETS = 0x5401
@@ -1774,7 +1755,6 @@ const (
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
TOSTOP = 0x100
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6
TUNGETFEATURES = 0x800454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index 900f568af..59651e415 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
@@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
TOSTOP = 0x8000
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x800854d5
TUNDETACHFILTER = 0x800854d6
TUNGETFEATURES = 0x400454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 4148f2773..a09bf9b18 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
@@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
TOSTOP = 0x8000
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 2310beebd..72a0083c4 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
@@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
TOSTOP = 0x8000
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 44191b0c2..84c0e3cc1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1642,12 +1629,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x5407
TCGETA = 0x5401
TCGETS = 0x540d
@@ -1788,7 +1769,6 @@ const (
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
TOSTOP = 0x8000
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x800854d5
TUNDETACHFILTER = 0x800854d6
TUNGETFEATURES = 0x400454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 6772a59be..8e4606e06 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x4000
@@ -1697,12 +1684,6 @@ const (
TAB2 = 0x800
TAB3 = 0xc00
TABDLY = 0xc00
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x2000741f
TCGETA = 0x40147417
TCGETS = 0x402c7413
@@ -1846,7 +1827,6 @@ const (
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
TOSTOP = 0x400000
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index ad29c3d3d..16ed19311 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x4000
@@ -1697,12 +1684,6 @@ const (
TAB2 = 0x800
TAB3 = 0xc00
TABDLY = 0xc00
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x2000741f
TCGETA = 0x40147417
TCGETS = 0x402c7413
@@ -1846,7 +1827,6 @@ const (
TIOCSWINSZ = 0x80087467
TIOCVHANGUP = 0x5437
TOSTOP = 0x400000
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x801054d5
TUNDETACHFILTER = 0x801054d6
TUNGETFEATURES = 0x400454cf
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 3b5707548..bd385f809 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -507,19 +507,6 @@ const (
F_ULOCK = 0x0
F_UNLCK = 0x2
F_WRLCK = 0x1
- GENL_ADMIN_PERM = 0x1
- GENL_CMD_CAP_DO = 0x2
- GENL_CMD_CAP_DUMP = 0x4
- GENL_CMD_CAP_HASPOL = 0x8
- GENL_HDRLEN = 0x4
- GENL_ID_CTRL = 0x10
- GENL_ID_PMCRAID = 0x12
- GENL_ID_VFS_DQUOT = 0x11
- GENL_MAX_ID = 0x3ff
- GENL_MIN_ID = 0x10
- GENL_NAMSIZ = 0x10
- GENL_START_ALLOC = 0x13
- GENL_UNS_ADMIN_PERM = 0x10
GRND_NONBLOCK = 0x1
GRND_RANDOM = 0x2
HUPCL = 0x400
@@ -1701,12 +1688,6 @@ const (
TAB2 = 0x1000
TAB3 = 0x1800
TABDLY = 0x1800
- TASKSTATS_CMD_ATTR_MAX = 0x4
- TASKSTATS_CMD_MAX = 0x2
- TASKSTATS_GENL_NAME = "TASKSTATS"
- TASKSTATS_GENL_VERSION = 0x1
- TASKSTATS_TYPE_MAX = 0x6
- TASKSTATS_VERSION = 0x8
TCFLSH = 0x540b
TCGETA = 0x5405
TCGETS = 0x5401
@@ -1846,7 +1827,6 @@ const (
TIOCSWINSZ = 0x5414
TIOCVHANGUP = 0x5437
TOSTOP = 0x100
- TS_COMM_LEN = 0x20
TUNATTACHFILTER = 0x401054d5
TUNDETACHFILTER = 0x401054d6
TUNGETFEATURES = 0x800454cf
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 7b36896ea..0dcebb50b 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -692,104 +692,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index e54fa9847..d70e54348 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -710,104 +710,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index bff6ce258..497f56319 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -681,104 +681,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]uint8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index a3d0cc4a1..f0bdaede6 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -689,104 +689,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 8fa6603fb..850a68cb2 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -686,104 +686,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 3e5fc6252..92aac5d93 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -691,104 +691,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index f9bd1ab0c..623f58127 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -691,104 +691,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 74c542132..56598a1bf 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -686,104 +686,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 2b0b18e94..acc7c819d 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -699,104 +699,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]uint8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index b2b59992d..b348885c8 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -699,104 +699,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- Pad_cgo_0 [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- Pad_cgo_1 [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]uint8
- Ac_sched uint8
- Ac_pad [3]uint8
- Pad_cgo_2 [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- Pad_cgo_3 [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 5e0aa6636..a706e2f8c 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -716,104 +716,3 @@ type Winsize struct {
Xpixel uint16
Ypixel uint16
}
-
-type Taskstats struct {
- Version uint16
- _ [2]byte
- Ac_exitcode uint32
- Ac_flag uint8
- Ac_nice uint8
- _ [6]byte
- Cpu_count uint64
- Cpu_delay_total uint64
- Blkio_count uint64
- Blkio_delay_total uint64
- Swapin_count uint64
- Swapin_delay_total uint64
- Cpu_run_real_total uint64
- Cpu_run_virtual_total uint64
- Ac_comm [32]int8
- Ac_sched uint8
- Ac_pad [3]uint8
- _ [4]byte
- Ac_uid uint32
- Ac_gid uint32
- Ac_pid uint32
- Ac_ppid uint32
- Ac_btime uint32
- _ [4]byte
- Ac_etime uint64
- Ac_utime uint64
- Ac_stime uint64
- Ac_minflt uint64
- Ac_majflt uint64
- Coremem uint64
- Virtmem uint64
- Hiwater_rss uint64
- Hiwater_vm uint64
- Read_char uint64
- Write_char uint64
- Read_syscalls uint64
- Write_syscalls uint64
- Read_bytes uint64
- Write_bytes uint64
- Cancelled_write_bytes uint64
- Nvcsw uint64
- Nivcsw uint64
- Ac_utimescaled uint64
- Ac_stimescaled uint64
- Cpu_scaled_run_real_total uint64
- Freepages_count uint64
- Freepages_delay_total uint64
-}
-
-const (
- TASKSTATS_CMD_UNSPEC = 0x0
- TASKSTATS_CMD_GET = 0x1
- TASKSTATS_CMD_NEW = 0x2
- TASKSTATS_TYPE_UNSPEC = 0x0
- TASKSTATS_TYPE_PID = 0x1
- TASKSTATS_TYPE_TGID = 0x2
- TASKSTATS_TYPE_STATS = 0x3
- TASKSTATS_TYPE_AGGR_PID = 0x4
- TASKSTATS_TYPE_AGGR_TGID = 0x5
- TASKSTATS_TYPE_NULL = 0x6
- TASKSTATS_CMD_ATTR_UNSPEC = 0x0
- TASKSTATS_CMD_ATTR_PID = 0x1
- TASKSTATS_CMD_ATTR_TGID = 0x2
- TASKSTATS_CMD_ATTR_REGISTER_CPUMASK = 0x3
- TASKSTATS_CMD_ATTR_DEREGISTER_CPUMASK = 0x4
-)
-
-type Genlmsghdr struct {
- Cmd uint8
- Version uint8
- Reserved uint16
-}
-
-const (
- CTRL_CMD_UNSPEC = 0x0
- CTRL_CMD_NEWFAMILY = 0x1
- CTRL_CMD_DELFAMILY = 0x2
- CTRL_CMD_GETFAMILY = 0x3
- CTRL_CMD_NEWOPS = 0x4
- CTRL_CMD_DELOPS = 0x5
- CTRL_CMD_GETOPS = 0x6
- CTRL_CMD_NEWMCAST_GRP = 0x7
- CTRL_CMD_DELMCAST_GRP = 0x8
- CTRL_CMD_GETMCAST_GRP = 0x9
- CTRL_ATTR_UNSPEC = 0x0
- CTRL_ATTR_FAMILY_ID = 0x1
- CTRL_ATTR_FAMILY_NAME = 0x2
- CTRL_ATTR_VERSION = 0x3
- CTRL_ATTR_HDRSIZE = 0x4
- CTRL_ATTR_MAXATTR = 0x5
- CTRL_ATTR_OPS = 0x6
- CTRL_ATTR_MCAST_GROUPS = 0x7
- CTRL_ATTR_OP_UNSPEC = 0x0
- CTRL_ATTR_OP_ID = 0x1
- CTRL_ATTR_OP_FLAGS = 0x2
- CTRL_ATTR_MCAST_GRP_UNSPEC = 0x0
- CTRL_ATTR_MCAST_GRP_NAME = 0x1
- CTRL_ATTR_MCAST_GRP_ID = 0x2
-)