detached 8ec4bfc

build(deps): require kvconf v0.1.0

commit
8ec4bfc7386d1a8f01af550330e13a047e2c0d49
author
brice · · 2026-10-10 03:25 UTC
parent
1894f55
signature
GPG VerifiedCD88F9E564E0102646FB6077A1A07C7C7C3E349D · arch-gpg Verified for the committer email
2 files · +6 -4
M go.sum +2 -0 generated file: collapsed
M internal/adapters/config/config.go +4 -4
@@ -61,7 +61,7 @@ func (o *onOff) UnmarshalText(text []byte) error {
6161 case "off":
6262 *o = false
6363 default:
64- return errors.New("must be on or off")
64+ return kvconf.ValueError("must be on or off")
6565 }
6666 return nil
6767 }
@@ -71,10 +71,10 @@ type dirPath string
7171
7272 func (d *dirPath) UnmarshalText(text []byte) error {
7373 if len(text) > maxPath {
74- return errors.New("must be a non-empty path")
74+ return kvconf.ValueError("must be a non-empty path")
7575 }
7676 if string(text) == "~" {
77- return errors.New("must be an absolute path or start with ~/")
77+ return kvconf.ValueError("must be an absolute path or start with ~/")
7878 }
7979 var p kvconf.Path
8080 if err := p.UnmarshalText(text); err != nil {
@@ -100,7 +100,7 @@ func Load() (Settings, error) {
100100 return settings, nil
101101 case errors.Is(err, kvconf.ErrTooLarge):
102102 return Settings{}, fmt.Errorf("config %s exceeds %d bytes", path, maxBytes)
103- case err != nil && strings.HasSuffix(err.Error(), "not a regular file"):
103+ case errors.Is(err, kvconf.ErrNotRegular):
104104 return Settings{}, fmt.Errorf("config %s: expected a regular file", path)
105105 case err != nil:
106106 return Settings{}, fmt.Errorf("read config: %w", err)
@@ -61,7 +61,7 @@ func (o *onOff) UnmarshalText(text []byte) error {
61 case "off":61 case "off":
62 *o = false62 *o = false
63 default:63 default:
64- return errors.New("must be on or off")64+ return kvconf.ValueError("must be on or off")
65 }65 }
66 return nil66 return nil
67 }67 }
@@ -71,10 +71,10 @@ type dirPath string
71 71
72 func (d *dirPath) UnmarshalText(text []byte) error {72 func (d *dirPath) UnmarshalText(text []byte) error {
73 if len(text) > maxPath {73 if len(text) > maxPath {
74- return errors.New("must be a non-empty path")74+ return kvconf.ValueError("must be a non-empty path")
75 }75 }
76 if string(text) == "~" {76 if string(text) == "~" {
77- return errors.New("must be an absolute path or start with ~/")77+ return kvconf.ValueError("must be an absolute path or start with ~/")
78 }78 }
79 var p kvconf.Path79 var p kvconf.Path
80 if err := p.UnmarshalText(text); err != nil {80 if err := p.UnmarshalText(text); err != nil {
@@ -100,7 +100,7 @@ func Load() (Settings, error) {
100 return settings, nil100 return settings, nil
101 case errors.Is(err, kvconf.ErrTooLarge):101 case errors.Is(err, kvconf.ErrTooLarge):
102 return Settings{}, fmt.Errorf("config %s exceeds %d bytes", path, maxBytes)102 return Settings{}, fmt.Errorf("config %s exceeds %d bytes", path, maxBytes)
103- case err != nil && strings.HasSuffix(err.Error(), "not a regular file"):103+ case errors.Is(err, kvconf.ErrNotRegular):
104 return Settings{}, fmt.Errorf("config %s: expected a regular file", path)104 return Settings{}, fmt.Errorf("config %s: expected a regular file", path)
105 case err != nil:105 case err != nil:
106 return Settings{}, fmt.Errorf("read config: %w", err)106 return Settings{}, fmt.Errorf("read config: %w", err)

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 2

Tags 9

↑↓ moveenter openesc close