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
6 changes: 3 additions & 3 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Testkit is a Go module providing a modular builder framework to streamline test
## Working Effectively

### Bootstrap and Dependencies
- Ensure Go 1.26.0+ is installed
- `cd /home/runner/work/testkit/testkit` (repository root)
- Ensure Go 1.26.2+ is installed
- Work from the repository root
- `go mod tidy` -- downloads and organizes dependencies (takes ~2 seconds)
Comment on lines 9 to 12
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file updates the stated Go requirement to 1.26.2+, but there are still later references to Go 1.26.0+ (e.g., the go.mod bullet in the Repository Structure section and the Troubleshooting section). Please update those remaining occurrences so the document is internally consistent about the minimum Go version.

Copilot uses AI. Check for mistakes.
- `go mod download` -- ensures all dependencies are available

Expand Down Expand Up @@ -151,7 +151,7 @@ pkg/test/ -- main library package (builder.go, examples.go, factory.go, do
```go
module github.com/rios0rios0/testkit

go 1.26.0
go 1.26.2
```

### Example Application Output
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ Exceptions are acceptable depending on the circumstances (critical bug fixes tha

## [Unreleased]

### Added

- added `CLAUDE.md` with project guidance for Claude Code sessions

### Changed

- refreshed `.github/copilot-instructions.md` to reflect Go 1.26.2 version requirement
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changelog entry says .github/copilot-instructions.md was refreshed for the Go 1.26.2 requirement, but the instructions file still contains a couple of Go 1.26.0+ references. Either fully update the remaining 1.26.0 mentions in the instructions file or adjust this changelog line so it accurately reflects what changed.

Suggested change
- refreshed `.github/copilot-instructions.md` to reflect Go 1.26.2 version requirement
- refreshed `.github/copilot-instructions.md` alongside the Go `1.26.2` version update

Copilot uses AI. Check for mistakes.

## [0.1.2] - 2026-04-15

### Changed
Expand Down
46 changes: 46 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

## Project

Go testing utility library (`github.com/rios0rios0/testkit`). Provides a modular builder framework for test environment setup. Pure library -- no deployable artifacts. Requires Go 1.26.2+.

## Commands

```bash
go build ./... # build all packages
go test ./... -v # run all tests
go fmt ./... # format (required before commit)
go vet ./... # static analysis (required before commit)
golangci-lint run ./... # lint (matches CI)
go run cmd/example/main.go # run example app -- use to validate changes
```

The `Makefile` pulls shared targets from `rios0rios0/pipelines` via `$SCRIPTS_DIR`. Use `go` commands directly for local development.

## Architecture

All library code is in `pkg/test/` (Go package name: `testkit`).

| File | Purpose |
|------|---------|
| `builder.go` | `BaseBuilder` struct and `Builder` interface |
| `factory.go` | `BuilderFactory`, `BuilderConfig`, global registry |
| `examples.go` | `UserBuilder` reference implementation, `TestUser` entity |
| `doc.go` | Package-level documentation |

Tests live in the same package (`package testkit`) for internal field access.

## Conventions

- Custom builders embed `*BaseBuilder` and implement `Builder` (`Build`, `Reset`, `Clone`).
- `With*` methods return the builder (method chaining).
- Validation guards with `IsValidationEnabled()`; errors accumulate via `AddError()` and surface from `Build()`.
- `Build()` returns a defensive copy of the entity.
- Builders are not thread-safe.
- Update `CHANGELOG.md` under `[Unreleased]` for user-facing changes.

## CI

`.github/workflows/default.yaml` delegates to `rios0rios0/pipelines/.github/workflows/go-library.yaml`. Runs on push/PR to `main` and tags.
Loading