detached 08db4d0

remove strings package (#9)

commit
08db4d07a2c1435ee11dbc254b3383a743d75b5a
author
TotallyGamerJet · · 2022-06-28 03:17 UTC
committer
GitHub · · 2022-06-28 03:17 UTC
parent
674eeb4
signature
GPG Unverified4AEE18F83AFDEB23 The key is unknown
1 file · +6 -2
M dl_darwin.go +6 -2
@@ -5,7 +5,6 @@ package purego
55
66 import (
77 "runtime"
8- "strings"
98 "unsafe"
109 )
1110
@@ -13,8 +12,13 @@ const RTLD_GLOBAL = 0x8
1312
1413 const RTLD_DEFAULT = ^uintptr(1)
1514
15+// hasSuffix tests whether the string s ends with suffix.
16+func hasSuffix(s, suffix string) bool {
17+ return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix
18+}
19+
1620 func cString(name string) *byte {
17- if strings.HasSuffix(name, "\x00") {
21+ if hasSuffix(name, "\x00") {
1822 return &[]byte(name)[0]
1923 }
2024 var b = make([]byte, len(name)+1)
@@ -5,7 +5,6 @@ package purego
5 5
6 import (6 import (
7 "runtime"7 "runtime"
8- "strings"
9 "unsafe"8 "unsafe"
10 )9 )
11 10
@@ -13,8 +12,13 @@ const RTLD_GLOBAL = 0x8
13 12
14 const RTLD_DEFAULT = ^uintptr(1)13 const RTLD_DEFAULT = ^uintptr(1)
15 14
15+// hasSuffix tests whether the string s ends with suffix.
16+func hasSuffix(s, suffix string) bool {
17+ return len(s) >= len(suffix) && s[len(s)-len(suffix):] == suffix
18+}
19+
16 func cString(name string) *byte {20 func cString(name string) *byte {
17- if strings.HasSuffix(name, "\x00") {21+ if hasSuffix(name, "\x00") {
18 return &[]byte(name)[0]22 return &[]byte(name)[0]
19 }23 }
20 var b = make([]byte, len(name)+1)24 var b = make([]byte, len(name)+1)

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