Update dependencies (#2180)
* Update dependencies * Fix whatsmeow API changes
This commit is contained in:
9
vendor/github.com/philhofer/fwd/README.md
generated
vendored
9
vendor/github.com/philhofer/fwd/README.md
generated
vendored
@@ -45,6 +45,15 @@ the write position by the length of the returned slice. This allows users
|
||||
to write directly to the end of the buffer.
|
||||
|
||||
|
||||
## Portability
|
||||
|
||||
Because it uses the unsafe package, there are theoretically
|
||||
no promises about forward or backward portability.
|
||||
|
||||
To stay compatible with tinygo 0.32, unsafestr() has been updated
|
||||
to use unsafe.Slice() as suggested by
|
||||
https://tinygo.org/docs/guides/compatibility, which also required
|
||||
bumping go.mod to require at least go 1.20.
|
||||
|
||||
|
||||
## <a name="pkg-index">Index</a>
|
||||
|
||||
8
vendor/github.com/philhofer/fwd/writer_tinygo.go
generated
vendored
8
vendor/github.com/philhofer/fwd/writer_tinygo.go
generated
vendored
@@ -4,16 +4,10 @@
|
||||
package fwd
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// unsafe cast string as []byte
|
||||
func unsafestr(b string) []byte {
|
||||
l := uintptr(len(b))
|
||||
return *(*[]byte)(unsafe.Pointer(&reflect.SliceHeader{
|
||||
Len: l,
|
||||
Cap: l,
|
||||
Data: (*reflect.StringHeader)(unsafe.Pointer(&b)).Data,
|
||||
}))
|
||||
return unsafe.Slice(unsafe.StringData(b), len(b))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user