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
2 changes: 1 addition & 1 deletion .github/workflows/hype.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.x"
go-version-file: 'go.mod'
cache-dependency-path: subdir/go.sum
- name: Install hype
run: go install github.com/gopherguides/hype/cmd/hype@latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: "1.24.x"
go-version-file: 'go.mod'
cache-dependency-path: go.sum
- uses: goreleaser/goreleaser-action@v6
with:
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ on:
pull_request:
jobs:
tests-on:
name: ${{matrix.go-version}} ${{matrix.os}}
name: ${{matrix.os}}
runs-on: ${{ matrix.os }}
strategy:
matrix:
go-version: [1.24.x]
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.x"
go-version-file: 'go.mod'
- name: Go Environment
run: go env
- name: Verify Go Modules
Expand Down
25 changes: 25 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Repository Guidelines

## Project Structure & Module Organization

Core packages live at repo root (e.g., `element.go`, `parser.go`) and follow Go's standard package-per-file pattern, each paired with `*_test.go`. The CLI wrapper sits in `cmd/hype`, which builds the `hype` binary. Content templates and examples live under `docs/`, `mdx/`, and `slides/`, while reusable fixtures are stored in `testdata/`. Helper utilities and adapters reside in `internal/` plus feature-specific subfolders such as `atomx/` and `binding/`.

## Build, Test, and Development Commands

- `make test`: runs `go test -count 1 -race -vet=off -cover` across all packages except generated docs.
- `make build`: produces a local `hype` binary from `cmd/hype/`.
- `go run ./cmd/hype --help`: inspect CLI options without installing.
- `make docs` or `make hype`: regenerate `README.md` from `hype.md`; run after changing documentation templates.
- `go install ./cmd/hype`: install the CLI into your `$GOBIN` for reuse in other projects.

## Coding Style & Naming Conventions

Use Go 1.25+ features conservatively and keep compiler warnings at zero. Format code via `gofmt` (tabs for indentation, blank lines between logical sections) and lint with `revive` using `revive.toml`. Exported identifiers should read like `Parser`, `ExecuteError`, while private helpers stay lowerCamel. Keep package boundaries focused; avoid cyclic imports by adding shared helpers to `internal/`.

## Testing Guidelines

Unit tests mirror their source files (e.g., `figure_test.go`) and should cover happy paths plus failure parsing cases. Add integration coverage for the CLI in `cli_integration_test.go` when touching command behavior. Run `make cov` to inspect HTML coverage locally and target meaningful assertions rather than snapshot dumps. Table-driven tests are preferred; name cases with short strings describing the scenario. All new features require a failing test before implementation when practical.

## Commit & Pull Request Guidelines

Follow the existing history style: short imperative subject plus optional PR reference, e.g., `Fix non-deterministic JSON output (#46)`. Group related changes into one commit and keep generated files (like `README.md`) in the same commit when they stem from code changes. Pull requests should link issues, describe the behavior change, list verification steps (`make test`, `go run examples/...`), and include screenshots when user-facing output changes. Ensure CI (GitHub Actions `tests.yml`) passes before requesting review.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ $ go run .
Hello World

--------------------------------------------------------------------------------
Go Version: go1.24.9
Go Version: go1.25.3

```

Expand Down Expand Up @@ -160,7 +160,7 @@ $ go run .
Hello World

--------------------------------------------------------------------------------
Go Version: go1.24.9
Go Version: go1.25.3

```

Expand Down Expand Up @@ -189,7 +189,7 @@ $ go run .
Hello World

--------------------------------------------------------------------------------
Go Version: go1.24.9
Go Version: go1.25.3

```

Expand Down Expand Up @@ -219,7 +219,7 @@ $ go run .
./main.go:7:6: undefined: fmt.Prin

--------------------------------------------------------------------------------
Go Version: go1.24.9
Go Version: go1.25.3

```

Expand Down Expand Up @@ -256,7 +256,7 @@ type Context interface{ ... }
func WithoutCancel(parent Context) Context

--------------------------------------------------------------------------------
Go Version: go1.24.9
Go Version: go1.25.3

```

Expand All @@ -279,7 +279,7 @@ func WithCancel(parent Context) (ctx Context, cancel CancelFunc)
call cancel as soon as the operations running in this Context complete.

--------------------------------------------------------------------------------
Go Version: go1.24.9
Go Version: go1.25.3

```

Expand Down Expand Up @@ -427,7 +427,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24.x"
go-version-file: 'go.mod'
cache-dependency-path: subdir/go.sum
- name: Install hype
run: go install github.com/gopherguides/hype/cmd/hype@latest
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/gopherguides/hype

go 1.24
go 1.25

toolchain go1.24.0
toolchain go1.25.0

require (
github.com/gobuffalo/flect v1.0.2
Expand Down