detached d0403f8

Use structs.HostLayout

commit
d0403f86f8bdb86c61c29315292cac2c590138cd
author
Jeroen Wijenbergh · · 2024-10-30 09:08 UTC
committer
Jeroen Wijenbergh · · 2025-04-07 12:28 UTC
parent
cca21a2
signature
unsigned
2 files · +5 -3
M go.mod +1 -1
@@ -1,6 +1,6 @@
11 module github.com/jwijenbergh/puregotk
22
3-go 1.20
3+go 1.23
44
55 require github.com/jwijenbergh/purego v0.0.0-20241210143217-aeaa0bfe09e0
66
@@ -1,6 +1,6 @@
1 module github.com/jwijenbergh/puregotk1 module github.com/jwijenbergh/puregotk
2 2
3-go 1.203+go 1.23
4 4
5 require github.com/jwijenbergh/purego v0.0.0-20241210143217-aeaa0bfe09e05 require github.com/jwijenbergh/purego v0.0.0-20241210143217-aeaa0bfe09e0
6 6
M templates/go +4 -2
@@ -6,10 +6,11 @@ package {{.PkgName}}
66
77 {{if .NeedsInit}}
88 import (
9- {{if .NeedsInit}}
9+ {{if .Records}}
10+ "structs"
11+ {{end}}
1012 "github.com/jwijenbergh/purego"
1113 "github.com/jwijenbergh/puregotk/internal/core"
12- {{end}}
1314 )
1415 {{end}}
1516
@@ -23,6 +24,7 @@ type {{.Name}} func({{ conv .Args.Pure.Types }}) {{.Ret.Raw}}
2324 {{range .Records -}}
2425 {{.Doc}}
2526 type {{.Name}} struct {
27+ _ structs.HostLayout
2628 {{range .Fields}}
2729 {{.Name}} {{.Type}}
2830 {{end}}
@@ -6,10 +6,11 @@ package {{.PkgName}}
6 6
7 {{if .NeedsInit}}7 {{if .NeedsInit}}
8 import (8 import (
9- {{if .NeedsInit}}9+ {{if .Records}}
10+ "structs"
11+ {{end}}
10 "github.com/jwijenbergh/purego"12 "github.com/jwijenbergh/purego"
11 "github.com/jwijenbergh/puregotk/internal/core"13 "github.com/jwijenbergh/puregotk/internal/core"
12- {{end}}
13 )14 )
14 {{end}}15 {{end}}
15 16
@@ -23,6 +24,7 @@ type {{.Name}} func({{ conv .Args.Pure.Types }}) {{.Ret.Raw}}
23 {{range .Records -}}24 {{range .Records -}}
24 {{.Doc}}25 {{.Doc}}
25 type {{.Name}} struct {26 type {{.Name}} struct {
27+ _ structs.HostLayout
26 {{range .Fields}}28 {{range .Fields}}
27 {{.Name}} {{.Type}}29 {{.Name}} {{.Type}}
28 {{end}}30 {{end}}

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