mirror of
https://github.com/kubernetes/sample-controller.git
synced 2025-02-01 01:12:52 +08:00
c0feae0701
Automatic merge from submit-queue (batch tested with PRs 59965, 59115, 63076, 63059). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Upgrade dep json-iterator/go to fix base64 decode bug **What this PR does / why we need it**: upgrade dep `json-iterator/go` to fix base64 decode bug #62742 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes #62742 **Special notes for your reviewer**: Just upgrade `json-iterator/go` to latest which includes base64 decode fix https://github.com/json-iterator/go/pull/266 No other code changes **Release note**: ```release-note None ``` Kubernetes-commit: 3dbcd1ddcee786f443f89a82514bbd9c6ad06c99
138 lines
1.8 KiB
Go
138 lines
1.8 KiB
Go
package jsoniter
|
|
|
|
type trueAny struct {
|
|
baseAny
|
|
}
|
|
|
|
func (any *trueAny) LastError() error {
|
|
return nil
|
|
}
|
|
|
|
func (any *trueAny) ToBool() bool {
|
|
return true
|
|
}
|
|
|
|
func (any *trueAny) ToInt() int {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToInt32() int32 {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToInt64() int64 {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToUint() uint {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToUint32() uint32 {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToUint64() uint64 {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToFloat32() float32 {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToFloat64() float64 {
|
|
return 1
|
|
}
|
|
|
|
func (any *trueAny) ToString() string {
|
|
return "true"
|
|
}
|
|
|
|
func (any *trueAny) WriteTo(stream *Stream) {
|
|
stream.WriteTrue()
|
|
}
|
|
|
|
func (any *trueAny) Parse() *Iterator {
|
|
return nil
|
|
}
|
|
|
|
func (any *trueAny) GetInterface() interface{} {
|
|
return true
|
|
}
|
|
|
|
func (any *trueAny) ValueType() ValueType {
|
|
return BoolValue
|
|
}
|
|
|
|
func (any *trueAny) MustBeValid() Any {
|
|
return any
|
|
}
|
|
|
|
type falseAny struct {
|
|
baseAny
|
|
}
|
|
|
|
func (any *falseAny) LastError() error {
|
|
return nil
|
|
}
|
|
|
|
func (any *falseAny) ToBool() bool {
|
|
return false
|
|
}
|
|
|
|
func (any *falseAny) ToInt() int {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToInt32() int32 {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToInt64() int64 {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToUint() uint {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToUint32() uint32 {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToUint64() uint64 {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToFloat32() float32 {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToFloat64() float64 {
|
|
return 0
|
|
}
|
|
|
|
func (any *falseAny) ToString() string {
|
|
return "false"
|
|
}
|
|
|
|
func (any *falseAny) WriteTo(stream *Stream) {
|
|
stream.WriteFalse()
|
|
}
|
|
|
|
func (any *falseAny) Parse() *Iterator {
|
|
return nil
|
|
}
|
|
|
|
func (any *falseAny) GetInterface() interface{} {
|
|
return false
|
|
}
|
|
|
|
func (any *falseAny) ValueType() ValueType {
|
|
return BoolValue
|
|
}
|
|
|
|
func (any *falseAny) MustBeValid() Any {
|
|
return any
|
|
}
|