Skip to content

Latest commit

 

History

History
84 lines (66 loc) · 1.97 KB

File metadata and controls

84 lines (66 loc) · 1.97 KB

Contributing to traverse

Thank you for your interest in contributing! Here's how to get started.

Development Setup

  1. Install Go 1.26+
  2. Clone the repository:
    git clone https://github.com/chenyc21/traverse.git
    cd traverse
  3. Install dependencies:
    go mod download
  4. Build and run:
    go build -o traverse .
    ./traverse

Code Style

  • Use gofmt to format your code
  • Run go vet ./... before committing
  • Follow standard Go conventions

Commit Messages

Use Conventional Commits:

  • feat: — new feature
  • fix: — bug fix
  • docs: — documentation
  • style: — formatting, no code change
  • refactor: — code refactoring
  • test: — adding tests
  • chore: — maintenance

Example: feat: add file preview panel

Pull Requests

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/my-feature
  3. Make your changes
  4. Run tests: go test ./...
  5. Run linter: go vet ./...
  6. Commit with conventional commit message
  7. Push and create a Pull Request

Testing

Run all tests:

go test ./...

Run tests with coverage:

go test -cover ./...

Project Structure

traverse/
├── main.go          # Entry point
├── app.go           # Core model struct + Init/Update + directory/Git loading
├── handlers.go      # Keyboard event handling
├── commands.go      # Async commands (file ops, Git ops, filter, shell)
├── render.go        # UI rendering (sidebar, preview, status bar, dialogs)
├── git.go           # GitService (os/exec wrapper)
├── file.go          # File loading, sorting, icons
├── preview.go       # Syntax-highlighted preview (Chroma)
├── keys.go          # Keybinding definitions
├── config.go        # Configuration management (Viper)
└── themes/          # Theme files

Questions?

Open an issue on GitHub for any questions or suggestions.