mirror of
https://github.com/kubernetes-sigs/prometheus-adapter.git
synced 2026-04-06 01:38:10 +00:00
vendored changes
This commit is contained in:
parent
d091fff18b
commit
128f9a29f5
522 changed files with 29974 additions and 25705 deletions
15
vendor/github.com/go-openapi/swag/json.go
generated
vendored
15
vendor/github.com/go-openapi/swag/json.go
generated
vendored
|
|
@ -21,7 +21,6 @@ import (
|
|||
"reflect"
|
||||
"strings"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
|
||||
"github.com/mailru/easyjson/jlexer"
|
||||
"github.com/mailru/easyjson/jwriter"
|
||||
|
|
@ -35,14 +34,13 @@ var DefaultJSONNameProvider = NewNameProvider()
|
|||
|
||||
const comma = byte(',')
|
||||
|
||||
var atomicClosers atomic.Value
|
||||
var closers map[byte]byte
|
||||
|
||||
func init() {
|
||||
atomicClosers.Store(
|
||||
map[byte]byte{
|
||||
'{': '}',
|
||||
'[': ']',
|
||||
})
|
||||
closers = map[byte]byte{
|
||||
'{': '}',
|
||||
'[': ']',
|
||||
}
|
||||
}
|
||||
|
||||
type ejMarshaler interface {
|
||||
|
|
@ -113,7 +111,6 @@ func ConcatJSON(blobs ...[]byte) []byte {
|
|||
var opening, closing byte
|
||||
var idx, a int
|
||||
buf := bytes.NewBuffer(nil)
|
||||
closers := atomicClosers.Load().(map[byte]byte)
|
||||
|
||||
for i, b := range blobs[:last+1] {
|
||||
if b == nil || bytes.Equal(b, nullJSON) {
|
||||
|
|
@ -264,7 +261,7 @@ func (n *NameProvider) GetJSONNames(subject interface{}) []string {
|
|||
names = n.makeNameIndex(tpe)
|
||||
}
|
||||
|
||||
var res []string
|
||||
res := make([]string, 0, len(names.jsonNames))
|
||||
for k := range names.jsonNames {
|
||||
res = append(res, k)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue