detached e997a62

Refactor project structure and update build configuration

- Add 'binary: gordon' to .goreleaser.yaml to ensure correct binary naming
- Remove cmd/cli/main.go as part of project restructuring
- Move main functionality to root-level main.go for better Go installation support
commit
e997a62414a7891a59100713c5113b40fa4d60ae
author
bamen · · 2024-09-18 17:59 UTC
committer
bamen · · 2024-09-18 20:42 UTC
parent
251a033
signature
unsigned
3 files · +12 -2
M .goreleaser.yaml +1 -0
@@ -10,6 +10,7 @@ release:
1010 builds:
1111 - id: "gordon"
1212 main: ./cmd/cli/main.go
13+ binary: gordon
1314 goos:
1415 - linux
1516 - windows
@@ -10,6 +10,7 @@ release:
10 builds:10 builds:
11 - id: "gordon"11 - id: "gordon"
12 main: ./cmd/cli/main.go12 main: ./cmd/cli/main.go
13+ binary: gordon
13 goos:14 goos:
14 - linux15 - linux
15 - windows16 - windows
R cmd/cli/main.go → cmd/gordon.go +2 -2 renamed, 98% similar
@@ -1,4 +1,4 @@
1-package main
1+package cmd
22
33 import (
44 "fmt"
@@ -38,7 +38,7 @@ func Execute(client *cli.App, server *server.App) {
3838 cobra.CheckErr(rootCmd.Execute())
3939 }
4040
41-func main() {
41+func ExecuteCLI() {
4242 build = regexp.MustCompile(`\d+\.\d+\.\d+`).FindString(build)
4343 buildInfo := &common.BuildConfig{
4444 BuildVersion: build,
@@ -1,4 +1,4 @@
1-package main1+package cmd
2 2
3 import (3 import (
4 "fmt"4 "fmt"
@@ -38,7 +38,7 @@ func Execute(client *cli.App, server *server.App) {
38 cobra.CheckErr(rootCmd.Execute())38 cobra.CheckErr(rootCmd.Execute())
39 }39 }
40 40
41-func main() {41+func ExecuteCLI() {
42 build = regexp.MustCompile(`\d+\.\d+\.\d+`).FindString(build)42 build = regexp.MustCompile(`\d+\.\d+\.\d+`).FindString(build)
43 buildInfo := &common.BuildConfig{43 buildInfo := &common.BuildConfig{
44 BuildVersion: build,44 BuildVersion: build,
A main.go +9 -0
@@ -0,0 +1,9 @@
1+package main
2+
3+import (
4+ "github.com/bnema/gordon/cmd"
5+)
6+
7+func main() {
8+ cmd.ExecuteCLI()
9+}
@@ -0,0 +1,9 @@
1+package main
2+
3+import (
4+ "github.com/bnema/gordon/cmd"
5+)
6+
7+func main() {
8+ cmd.ExecuteCLI()
9+}

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 7

Tags 106

↑↓ moveenter openesc close