summaryrefslogtreecommitdiffstats
path: root/vendor/golang.org/x/sys/windows/syscall_windows.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-03-09 21:39:06 +0100
committerGitHub <noreply@github.com>2023-03-09 21:39:06 +0100
commit57ce19150f38842cdf44370b358881dbb83fb20e (patch)
tree42512063df92e51b69b9d1e6fb0b247c3f276da4 /vendor/golang.org/x/sys/windows/syscall_windows.go
parent24f6747516a9a80f82068656df50b3972928ba56 (diff)
downloadmatterbridge-msglm-57ce19150f38842cdf44370b358881dbb83fb20e.tar.gz
matterbridge-msglm-57ce19150f38842cdf44370b358881dbb83fb20e.tar.bz2
matterbridge-msglm-57ce19150f38842cdf44370b358881dbb83fb20e.zip
Bump golang.org/x/net from 0.5.0 to 0.7.0 (#2003)
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.5.0 to 0.7.0. - [Release notes](https://github.com/golang/net/releases) - [Commits](https://github.com/golang/net/compare/v0.5.0...v0.7.0) --- updated-dependencies: - dependency-name: golang.org/x/net dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/golang.org/x/sys/windows/syscall_windows.go')
-rw-r--r--vendor/golang.org/x/sys/windows/syscall_windows.go14
1 files changed, 2 insertions, 12 deletions
diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go
index a49853e9..41cb3c01 100644
--- a/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -10,7 +10,6 @@ import (
errorspkg "errors"
"fmt"
"runtime"
- "strings"
"sync"
"syscall"
"time"
@@ -87,22 +86,13 @@ func StringToUTF16(s string) []uint16 {
// s, with a terminating NUL added. If s contains a NUL byte at any
// location, it returns (nil, syscall.EINVAL).
func UTF16FromString(s string) ([]uint16, error) {
- if strings.IndexByte(s, 0) != -1 {
- return nil, syscall.EINVAL
- }
- return utf16.Encode([]rune(s + "\x00")), nil
+ return syscall.UTF16FromString(s)
}
// UTF16ToString returns the UTF-8 encoding of the UTF-16 sequence s,
// with a terminating NUL and any bytes after the NUL removed.
func UTF16ToString(s []uint16) string {
- for i, v := range s {
- if v == 0 {
- s = s[:i]
- break
- }
- }
- return string(utf16.Decode(s))
+ return syscall.UTF16ToString(s)
}
// StringToUTF16Ptr is deprecated. Use UTF16PtrFromString instead.