- Go 1.26+
- macOS, Linux, or Windows (host PC)
- pre-commit for local hooks
git clone https://github.com/ykus4/memdroid.git
cd memdroid
go mod download
# Install pre-commit hooks
brew install pre-commit # or: pip install pre-commit
pre-commit installgo build -o memdroid .Configured in .pre-commit-config.yaml:
| Hook | What it does |
|---|---|
go-fmt |
Formats all .go files with gofmt |
go-vet |
Runs go vet ./... |
go-imports |
Cleans up import blocks with goimports |
golangci-lint |
Runs linters defined in .golangci.yml |
Run manually at any time:
pre-commit run --all-filesLinter config: .golangci.yml
Enabled: gofmt, goimports, govet, errcheck, staticcheck
-
Decide which package it belongs to:
internal/memory/search/— scanning and filtering logicinternal/memory/modify/— write-side operationsinternal/memory/watch/— background monitoringinternal/memory/store/— persistence (bookmarks, JSON)internal/process/— process lifecycleinternal/driver/adb/— ADB-level operations
-
Add the CLI handler to the appropriate
cli_*.gofile (or create a new one for a distinct category). Add a menu entry inprintMenuand a dispatch case inmain.go. -
Register any new REST endpoint in
internal/server/server.go. -
Update docs/usage.md and docs/architecture.md.
Write descriptive commit messages. Format:
<Package>: <short summary>
- detail 1
- detail 2
Example:
search/filter.go: add fuzzy float comparison
- Treat float32/64 values within 1e-6 as equal to handle
floating-point drift in game engines.