We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c65de30 commit df92e60Copy full SHA for df92e60
bson/bsoncodec/codec_cache.go
@@ -82,6 +82,13 @@ func (c *typeDecoderCache) Clone() *typeDecoderCache {
82
return cc
83
}
84
85
+func init() {
86
+ if s := reflect.Kind(len(kindEncoderCache{}.entries)).String(); s != "kind27" {
87
+ panic("The capacity of kindEncoderCache is too small.\n" +
88
+ "This is due to a new type being added to reflect.Kind.")
89
+ }
90
+}
91
+
92
// atomic.Value requires that all calls to Store() have the same concrete type
93
// so we wrap the ValueEncoder with a kindEncoderCacheEntry to ensure the type
94
// is always the same (since different concrete types may implement the
0 commit comments