mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 17:32:25 -05:00
[bugfix] Downstep otel to fix freebsd compile issue (#1773)
https://github.com/open-telemetry/opentelemetry-go/issues/4076
This commit is contained in:
parent
ec325fee14
commit
b47661f033
70 changed files with 1097 additions and 3138 deletions
20
vendor/go.opentelemetry.io/otel/attribute/set.go
generated
vendored
20
vendor/go.opentelemetry.io/otel/attribute/set.go
generated
vendored
|
|
@ -18,7 +18,6 @@ import (
|
|||
"encoding/json"
|
||||
"reflect"
|
||||
"sort"
|
||||
"sync"
|
||||
)
|
||||
|
||||
type (
|
||||
|
|
@ -63,12 +62,6 @@ var (
|
|||
iface: [0]KeyValue{},
|
||||
},
|
||||
}
|
||||
|
||||
// sortables is a pool of Sortables used to create Sets with a user does
|
||||
// not provide one.
|
||||
sortables = sync.Pool{
|
||||
New: func() interface{} { return new(Sortable) },
|
||||
}
|
||||
)
|
||||
|
||||
// EmptySet returns a reference to a Set with no elements.
|
||||
|
|
@ -98,7 +91,7 @@ func (l *Set) Len() int {
|
|||
|
||||
// Get returns the KeyValue at ordered position idx in this set.
|
||||
func (l *Set) Get(idx int) (KeyValue, bool) {
|
||||
if l == nil || !l.equivalent.Valid() {
|
||||
if l == nil {
|
||||
return KeyValue{}, false
|
||||
}
|
||||
value := l.equivalent.reflectValue()
|
||||
|
|
@ -114,7 +107,7 @@ func (l *Set) Get(idx int) (KeyValue, bool) {
|
|||
|
||||
// Value returns the value of a specified key in this set.
|
||||
func (l *Set) Value(k Key) (Value, bool) {
|
||||
if l == nil || !l.equivalent.Valid() {
|
||||
if l == nil {
|
||||
return Value{}, false
|
||||
}
|
||||
rValue := l.equivalent.reflectValue()
|
||||
|
|
@ -198,9 +191,7 @@ func NewSet(kvs ...KeyValue) Set {
|
|||
if len(kvs) == 0 {
|
||||
return empty()
|
||||
}
|
||||
srt := sortables.Get().(*Sortable)
|
||||
s, _ := NewSetWithSortableFiltered(kvs, srt, nil)
|
||||
sortables.Put(srt)
|
||||
s, _ := NewSetWithSortableFiltered(kvs, new(Sortable), nil)
|
||||
return s
|
||||
}
|
||||
|
||||
|
|
@ -227,10 +218,7 @@ func NewSetWithFiltered(kvs []KeyValue, filter Filter) (Set, []KeyValue) {
|
|||
if len(kvs) == 0 {
|
||||
return empty(), nil
|
||||
}
|
||||
srt := sortables.Get().(*Sortable)
|
||||
s, filtered := NewSetWithSortableFiltered(kvs, srt, filter)
|
||||
sortables.Put(srt)
|
||||
return s, filtered
|
||||
return NewSetWithSortableFiltered(kvs, new(Sortable), filter)
|
||||
}
|
||||
|
||||
// NewSetWithSortableFiltered returns a new Set.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue