Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: "[Bug] <short description>"
labels: bug
assignees: ''
---

### Describe the bug

A clear and concise description of what the bug is.

### To Reproduce

Steps to reproduce the behavior:

1. Command(s) run
2. Output

### Expected behavior

What you expected to happen.

### Environment

- OS:
- Go version:
- GoLearn version:

### Additional context

Add any other context about the problem here.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[Feature] <short description>"
labels: enhancement
assignees: ''
---

### Problem

What problem does this feature solve?

### Proposal

Describe the solution you'd like.

### Alternatives

Describe alternatives you've considered.

### Additional context

Add any other context or screenshots.
17 changes: 17 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Summary

Describe the change and its motivation.

## Checklist

- [ ] Tests pass: `make verify` or `golearn verify <slug>`
- [ ] Docs updated (README/CONTRIBUTING) if needed
- [ ] No large new dependencies

## Screenshots / Output (if CLI UX)

Paste before/after where helpful.

## Related issues

Fixes #
27 changes: 27 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Code of Conduct

This project follows the Contributor Covenant Code of Conduct.

- For maintainers and contributors: please act with empathy and respect.
- Harassment and discrimination are not tolerated.

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone.

## Our Standards

- Use welcoming and inclusive language
- Be respectful of differing viewpoints and experiences
- Gracefully accept constructive criticism
- Focus on what is best for the community

## Enforcement

Report unacceptable behavior to the maintainers at: <mrshravankumarb@gmail.com>.

Project maintainers are responsible for clarifying and enforcing standards of acceptable behavior and will take appropriate and fair corrective action.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
80 changes: 80 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
# Contributing to GoLearn

Thanks for your interest in contributing! This project aims to be a friendly, welcoming place to learn and teach Go.

## Ways to contribute

- Report bugs and propose enhancements
- Improve exercises, hints, and documentation
- Add new exercises or solutions (see below)
- Improve the CLI UX and accessibility

## Development setup

```bash
# Clone your fork
git clone https://github.com/<you>/golearn
cd golearn

# Build the CLI
make build # or: go build ./cmd/golearn

# Run locally
./bin/golearn help

# Initialize embedded exercises into a workspace
mkdir -p /tmp/golearn-ws && cd /tmp/golearn-ws
/path/to/bin/golearn init
```

## Running tests

This repository embeds template tests. To run tests for an exercise from the CLI repo:

```bash
# From repo root
make verify NAME=01_hello # or: go run ./cmd/golearn verify 01_hello
```

## Code style

- Go 1.22+
- Match existing formatting; run `gofmt` and `go vet`
- Prefer clear, readable code; add concise comments for non-obvious logic
- Avoid adding heavy deps; keep the binary small and portable

## Git workflow

1. Create a feature branch
2. Make focused commits with descriptive messages
3. Ensure `make build` and `make verify` pass
4. Open a PR with a clear title and description (screenshots welcome)

## Adding or updating exercises

- Edit templates under `internal/exercises/templates/<slug>`
- Keep tests self-contained in the exercise folder
- Provide hints in `internal/exercises/catalog.yaml`
- Do not add solution code into templates; see solutions below

## Adding solutions

- Place solutions in `internal/exercises/solutions/<slug>`
- Only include implementation files; do not include tests
- Validate locally:

```bash
# Validate embedded solution against embedded tests
./bin/golearn verify <slug> --solution
```

## Docs and UX

- Update `README.md` if you add a new command or flag
- Keep output accessible; follow `internal/cli/theme` guidance

## License

- Code is MIT. Non-code lesson content and artwork are under CC BY 3.0 (see CONTENT_LICENSE).

Please also read the Code of Conduct.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ golearn progress # Rich TUI with ASCII progress bar and checklist
golearn watch # Watches ./exercises and re-runs tests per edited exercise
```

### Contributing
- See [CONTRIBUTING.md](./CONTRIBUTING.md)
- Please follow our [Code of Conduct](./CODE_OF_CONDUCT.md)
- Security issues: see [SECURITY.md](./SECURITY.md)

Need commands?

```bash
Expand Down
13 changes: 13 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Security Policy

We take security seriously. Please report vulnerabilities responsibly.

## Supported versions
We generally support the latest minor release of the CLI.

## Reporting a vulnerability
- Email: security@example.com
- Please include steps to reproduce and any PoC code if available
- Do not open public issues for security problems

We will acknowledge your report within 72 hours and keep you updated.