mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-03 10:42:26 -06:00
[chore] update bun libraries to v1.2.5 (#3528)
* update bun libraries to v1.2.5 * pin old v1.29.0 of otel
This commit is contained in:
parent
45e1609377
commit
29007b1b88
59 changed files with 4181 additions and 1196 deletions
2
vendor/github.com/uptrace/bun/extra/bunotel/README.md
generated
vendored
2
vendor/github.com/uptrace/bun/extra/bunotel/README.md
generated
vendored
|
|
@ -1,3 +1,3 @@
|
|||
# OpenTelemetry instrumentation for Bun
|
||||
|
||||
See [example](../example/opentelemetry) for details.
|
||||
See [example](../../example/opentelemetry) for details.
|
||||
|
|
|
|||
16
vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go
generated
vendored
16
vendor/github.com/uptrace/bun/extra/bunotel/unsafe.go
generated
vendored
|
|
@ -1,3 +1,4 @@
|
|||
//go:build !appengine
|
||||
// +build !appengine
|
||||
|
||||
package bunotel
|
||||
|
|
@ -5,14 +6,15 @@ package bunotel
|
|||
import "unsafe"
|
||||
|
||||
func bytesToString(b []byte) string {
|
||||
return *(*string)(unsafe.Pointer(&b))
|
||||
if len(b) == 0 {
|
||||
return ""
|
||||
}
|
||||
return unsafe.String(&b[0], len(b))
|
||||
}
|
||||
|
||||
func stringToBytes(s string) []byte {
|
||||
return *(*[]byte)(unsafe.Pointer(
|
||||
&struct {
|
||||
string
|
||||
Cap int
|
||||
}{s, len(s)},
|
||||
))
|
||||
if s == "" {
|
||||
return []byte{}
|
||||
}
|
||||
return unsafe.Slice(unsafe.StringData(s), len(s))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue