detached 5905af5

all: remove dependencies on golang.org/x/sys (#271)

The example still has the dependency on golang.org/x/sys.

Updates #270
commit
5905af50730466425f56454a0491ae991d644beb
author
Hajime Hoshi · · 2024-08-22 13:03 UTC
committer
GitHub · · 2024-08-22 13:03 UTC
parent
ebc2d33
signature
GPG UnverifiedB5690EEEBB952194 The key is unknown
refs
tag: v0.8.0-alpha.5
2 files · +6 -6
M internal/load/load_windows.go +5 -3
@@ -3,13 +3,15 @@
33
44 package load
55
6-import "golang.org/x/sys/windows"
6+import (
7+ "syscall"
8+)
79
810 func OpenLibrary(name string) (uintptr, error) {
9- handle, err := windows.LoadLibrary(name)
11+ handle, err := syscall.LoadLibrary(name)
1012 return uintptr(handle), err
1113 }
1214
1315 func OpenSymbol(lib uintptr, name string) (uintptr, error) {
14- return windows.GetProcAddress(windows.Handle(lib), name)
16+ return syscall.GetProcAddress(syscall.Handle(lib), name)
1517 }
@@ -3,13 +3,15 @@
3 3
4 package load4 package load
5 5
6-import "golang.org/x/sys/windows"6+import (
7+ "syscall"
8+)
7 9
8 func OpenLibrary(name string) (uintptr, error) {10 func OpenLibrary(name string) (uintptr, error) {
9- handle, err := windows.LoadLibrary(name)11+ handle, err := syscall.LoadLibrary(name)
10 return uintptr(handle), err12 return uintptr(handle), err
11 }13 }
12 14
13 func OpenSymbol(lib uintptr, name string) (uintptr, error) {15 func OpenSymbol(lib uintptr, name string) (uintptr, error) {
14- return windows.GetProcAddress(windows.Handle(lib), name)16+ return syscall.GetProcAddress(syscall.Handle(lib), name)
15 }17 }
M syscall_windows.go +1 -3
@@ -6,8 +6,6 @@ package purego
66 import (
77 "reflect"
88 "syscall"
9-
10- "golang.org/x/sys/windows"
119 )
1210
1311 var syscall15XABI0 uintptr
@@ -44,5 +42,5 @@ func NewCallback(fn interface{}) uintptr {
4442 }
4543
4644 func loadSymbol(handle uintptr, name string) (uintptr, error) {
47- return windows.GetProcAddress(windows.Handle(handle), name)
45+ return syscall.GetProcAddress(syscall.Handle(handle), name)
4846 }
@@ -6,8 +6,6 @@ package purego
6 import (6 import (
7 "reflect"7 "reflect"
8 "syscall"8 "syscall"
9-
10- "golang.org/x/sys/windows"
11 )9 )
12 10
13 var syscall15XABI0 uintptr11 var syscall15XABI0 uintptr
@@ -44,5 +42,5 @@ func NewCallback(fn interface{}) uintptr {
44 }42 }
45 43
46 func loadSymbol(handle uintptr, name string) (uintptr, error) {44 func loadSymbol(handle uintptr, name string) (uintptr, error) {
47- return windows.GetProcAddress(windows.Handle(handle), name)45+ return syscall.GetProcAddress(syscall.Handle(handle), name)
48 }46 }

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close