v0.3.0 d226234

go-module.yaml RawHistoryFolder

1# Go Module Contract: Project Dependencies
2
3# Expected go.mod file structure after initialization
4module: dumber
5go_version: "1.25"
6
7# Runtime dependencies (will be installed via go get @latest)
8dependencies:
9  cli:
10    - import_path: "github.com/spf13/cobra"
11      purpose: "CLI framework and command handling"
12      min_version: "v1.8.0"
13      
14    - import_path: "github.com/spf13/viper"
15      purpose: "Configuration management"
16      min_version: "v1.18.0"
17
18  database:
19    - import_path: "github.com/ncruces/go-sqlite3"
20      purpose: "CGO-free SQLite database driver"
21      min_version: "v0.28.0"
22      build_tags: []
23      requirements: []
24      benefits: ["no CGO required", "better performance", "cleaner builds"]
25
26  validation:
27    - import_path: "github.com/go-playground/validator/v10"
28      purpose: "Struct validation and input sanitization"
29      min_version: "v10.16.0"
30
31  testing:
32    - import_path: "github.com/stretchr/testify"
33      purpose: "Enhanced testing assertions and mocks"
34      min_version: "v1.8.4"
35      scope: "test"
36
37# Development tools (installed via go install)
38tools:
39  - name: "sqlc"
40    install_command: "go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest"
41    purpose: "Generate type-safe Go code from SQL"
42    version_check: "sqlc version"
43    
44  - name: "wails"
45    install_command: "go install github.com/wailsapp/wails/v3/cmd/wails@v3.0.0-alpha.28"
46    purpose: "Desktop application framework"
47    version_check: "wails version"
48    system_deps: ["libwebkit2gtk-4.0-dev", "libgtk-3-dev"]
49
50# Expected go.mod content template
51go_mod_template: |
52  module dumber
53  
54  go 1.21
55  
56  require (
57      github.com/spf13/cobra v1.8.0
58      github.com/spf13/viper v1.18.2
59      github.com/ncruces/go-sqlite3 v0.28.0
60      github.com/go-playground/validator/v10 v10.16.0
61      github.com/stretchr/testify v1.8.4
62  )
63
64# Compatibility matrix
65compatibility:
66  go_version:
67    minimum: "1.18"  # Required for generics
68    recommended: "1.21"
69    maximum: "1.22"
70    
71  operating_systems:
72    primary: "linux"
73    supported: ["linux", "darwin"]
74    tested: ["archlinux", "ubuntu-22.04"]
75    
76  architectures:
77    primary: "amd64"
78    supported: ["amd64", "arm64"]
79
80# Build configuration
81build:
82  tags:
83    development: ["dev", "debug"]
84    production: []
85    testing: ["test", "integration"]
86    
87  environment:
88    wails_build:
89      - name: "CGO_ENABLED"
90        value: "1"  
91        reason: "Required for Wails WebKit2GTK bindings"
92    cgo_free_development:
93      - name: "CGO_ENABLED"
94        value: "0"
95        reason: "Most development can happen CGO-free (CLI, database, parser)"
96        
97  flags:
98    development: "-race -v"
99    production: "-ldflags='-s -w'"
100    
101# Verification commands
102verification:
103  module_valid: "go mod verify"
104  dependencies_resolved: "go mod download"
105  build_succeeds: "go build ./cmd/dumber"
106  tests_pass: "go test ./..."
107  tools_available: 
108    - "sqlc version"
109    - "wails version"
110
111# Installation success criteria
112success_criteria:
113  - name: "go.mod exists"
114    command: "test -f go.mod"
115    
116  - name: "module name correct"
117    command: "grep -q 'module dumber' go.mod"
118    
119  - name: "all dependencies resolved"
120    command: "go mod download && echo 'OK'"
121    
122  - name: "build succeeds"
123    command: "go build -o /tmp/test-build ./cmd/dumber"
124    cleanup: "rm -f /tmp/test-build"
125    
126  - name: "sqlc available"
127    command: "which sqlc && sqlc version"
128    
129  - name: "wails available" 
130    command: "which wails && wails version"
131    
132# Error conditions and solutions
133error_handling:
134  cgo_disabled_for_wails:
135    error_pattern: "C compiler|CGO_ENABLED.*wails"
136    solution: "export CGO_ENABLED=1 # Only needed for Wails builds"
137    documentation: "Wails requires CGO for WebKit2GTK bindings (database layer is CGO-free)"
138    
139  missing_webkit:
140    error_pattern: "webkit2gtk|libwebkit2gtk"
141    solution: "sudo apt install libwebkit2gtk-4.0-dev libgtk-3-dev"
142    documentation: "Wails requires WebKit2GTK development headers"
143    
144  network_failure:
145    error_pattern: "dial tcp|connection refused|timeout"
146    solution: "Check internet connection and proxy settings"
147    documentation: "Dependency installation requires network access"
148    
149  insufficient_space:
150    error_pattern: "no space left|disk full"
151    solution: "Free up disk space and try again"
152    documentation: "Go module cache and tools require ~500MB space"

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 8

Tags 42

↑↓ moveenter openesc close