summaryrefslogtreecommitdiffhomepage
path: root/tun/wintun/resource/resource_windows.go
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-11-07 21:56:32 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2020-11-07 21:56:32 +0100
commit82128c47d90a54faded017ad3e5bc61eb0c641db (patch)
tree91ec906e69ba373f1ef014dd1ce684cb459d44c8 /tun/wintun/resource/resource_windows.go
parentc192b2eeec5dc8e21e8a6deb5e6dcceda91d649c (diff)
global: switch to using %w instead of %v for Errorf
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tun/wintun/resource/resource_windows.go')
-rw-r--r--tun/wintun/resource/resource_windows.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/tun/wintun/resource/resource_windows.go b/tun/wintun/resource/resource_windows.go
index 109c2ca..b797e1f 100644
--- a/tun/wintun/resource/resource_windows.go
+++ b/tun/wintun/resource/resource_windows.go
@@ -74,17 +74,17 @@ func FindByName(module windows.Handle, name string, resType *uint16) (resInfo wi
func Load(module, resInfo windows.Handle) (data []byte, err error) {
size, err := sizeofResource(module, resInfo)
if err != nil {
- err = fmt.Errorf("Unable to size resource: %v", err)
+ err = fmt.Errorf("Unable to size resource: %w", err)
return
}
resData, err := loadResource(module, resInfo)
if err != nil {
- err = fmt.Errorf("Unable to load resource: %v", err)
+ err = fmt.Errorf("Unable to load resource: %w", err)
return
}
ptr, err := lockResource(resData)
if err != nil {
- err = fmt.Errorf("Unable to lock resource: %v", err)
+ err = fmt.Errorf("Unable to lock resource: %w", err)
return
}
unsafeSlice(unsafe.Pointer(&data), unsafe.Pointer(ptr), int(size))