Thanks for your interest in contributing to risgo, a Go CLI tool for searching Austrian legal documents via the RIS API.
- Fork this repository on GitHub.
- Clone your fork:
git clone https://github.com/<your-user>/risgo.git cd risgo
- Build the binary:
go build -o risgo . - Run the tests:
go test ./...
If everything passes you are ready to go.
The project ships a Makefile with common shortcuts:
| Command | Description |
|---|---|
make build |
Compile the risgo binary |
make test |
Run tests with race detector |
make lint |
Run go vet |
make fmt |
Format code with go fmt |
make check |
Run fmt, lint, and test in sequence |
make clean |
Remove the compiled binary |
make install |
Install risgo into your $GOPATH/bin |
Before opening a pull request, run make check to make sure everything is in order.
.
├── main.go # Entry point
├── cmd/ # CLI commands (cobra)
├── internal/
│ ├── api/ # HTTP client for the RIS API
│ ├── parser/ # Response parsing
│ ├── model/ # Shared types and structs
│ ├── format/ # Output formatting (table, detail views)
│ ├── constants/ # Enum mappings and named constants
│ └── ui/ # Terminal UI helpers (spinner, colors)
├── Makefile # Developer shortcuts
├── go.mod / go.sum # Go module files
└── ...
- Create a feature branch off
main:git checkout -b feat/my-change
- Make your changes. Keep commits small and focused.
- Use conventional commit style messages:
feat: add --output json flagfix: handle empty API responsedocs: update README examplesrefactor: extract search helpertest: add parser unit tests
- Run
make checkand make sure everything passes. - Push your branch and open a pull request against
main.
- Run
go fmtandgo vetbefore committing. - Keep functions short and names descriptive.
- Prefer returning errors over panicking.
- Write tests for new functionality (see
*_test.gofiles for examples).
The CLI output and help text are in German because the tool targets Austrian legal professionals. Code, comments, commit messages, and PR discussions should be in English.
If you find a bug, please open a GitHub Issue with:
- A clear description of the problem
- Steps to reproduce
- Expected vs. actual behavior
- Your Go version (
go version) and OS
Feel free to open an issue if something is unclear. We appreciate every contribution, no matter how small.