vendor: update all dependencies
This commit is contained in:
parent
d1a39dcc4b
commit
af192d2507
232 changed files with 15744 additions and 1710 deletions
23
vendor/github.com/mattn/go-ieproxy/utils.go
generated
vendored
Normal file
23
vendor/github.com/mattn/go-ieproxy/utils.go
generated
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
package ieproxy
|
||||
|
||||
import (
|
||||
"unicode/utf16"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// StringFromUTF16Ptr converts a *uint16 C string to a Go String
|
||||
func StringFromUTF16Ptr(s *uint16) string {
|
||||
if s == nil {
|
||||
return ""
|
||||
}
|
||||
|
||||
p := (*[1<<30 - 1]uint16)(unsafe.Pointer(s))
|
||||
|
||||
// find the string length
|
||||
sz := 0
|
||||
for p[sz] != 0 {
|
||||
sz++
|
||||
}
|
||||
|
||||
return string(utf16.Decode(p[:sz:sz]))
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue