@testingai/pkg-golang 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Returns a handle for a **fresh** Go modules preset. The fixture app is vendored under `stub/`
3
+ * (minimal `cmd/hello` module); see `stub/STUB_PROVENANCE.md`.
4
+ */
5
+ export declare function golangProject(): import("@testingai/testai").TestProject;
6
+ export type { CreateProjectInput, CreateProjectOptions, TestProject, } from "@testingai/testai";
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,aAAa,4CAE5B;AAED,YAAY,EACV,kBAAkB,EAClB,oBAAoB,EACpB,WAAW,GACZ,MAAM,mBAAmB,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ import { createPresetProject } from "@testingai/testai";
2
+ /**
3
+ * Returns a handle for a **fresh** Go modules preset. The fixture app is vendored under `stub/`
4
+ * (minimal `cmd/hello` module); see `stub/STUB_PROVENANCE.md`.
5
+ */
6
+ export function golangProject() {
7
+ return createPresetProject({ kind: "golang" });
8
+ }
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD;;;GAGG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO,mBAAmB,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC;AACjD,CAAC"}
package/package.json ADDED
@@ -0,0 +1,31 @@
1
+ {
2
+ "name": "@testingai/pkg-golang",
3
+ "version": "0.1.0",
4
+ "description": "Go modules fixture preset for @testingai/testai (see `stub/` vendored cmd/hello module).",
5
+ "type": "module",
6
+ "sideEffects": false,
7
+ "engines": {
8
+ "node": ">=20"
9
+ },
10
+ "files": ["dist", "stub"],
11
+ "main": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/index.d.ts",
16
+ "import": "./dist/index.js"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "build": "tsc -p tsconfig.build.json",
21
+ "clean": "rm -rf dist",
22
+ "typecheck": "tsc --noEmit -p tsconfig.json",
23
+ "test": "node --import tsx --test test/*.test.ts"
24
+ },
25
+ "dependencies": {
26
+ "@testingai/testai": "0.1.0"
27
+ },
28
+ "publishConfig": {
29
+ "access": "public"
30
+ }
31
+ }
package/stub/README.md ADDED
@@ -0,0 +1,11 @@
1
+ # stub-golang
2
+
3
+ Minimal Go module fixture (`cmd/hello`) for `@testingai/pkg-golang` harness presets.
4
+
5
+ See [STUB_PROVENANCE.md](./STUB_PROVENANCE.md) for origin and version pins.
6
+
7
+ ```bash
8
+ go test ./...
9
+ go build -o bin/hello ./cmd/hello
10
+ ./bin/hello
11
+ ```
@@ -0,0 +1,15 @@
1
+ # Stub provenance
2
+
3
+ This directory is a **vendored application fixture** (Go modules layout for harness presets).
4
+
5
+ ## Origin
6
+
7
+ - **Template:** [Create a Go module](https://go.dev/doc/tutorial/create-module) (`cmd/` + root `go.mod` layout), trimmed to a single `cmd/hello` command with one unit test.
8
+ - **Module path:** `github.com/testingai/stub-golang` (fixture-only; not published).
9
+ - **Go toolchain pin:** `go 1.22` in `go.mod` (2026-05-17).
10
+
11
+ ## Commands
12
+
13
+ - `go test ./...`
14
+ - `go build -o bin/hello ./cmd/hello`
15
+ - `./bin/hello` (prints `hello, world`)
@@ -0,0 +1,11 @@
1
+ package main
2
+
3
+ import "fmt"
4
+
5
+ func main() {
6
+ fmt.Println(greet("world"))
7
+ }
8
+
9
+ func greet(name string) string {
10
+ return "hello, " + name
11
+ }
@@ -0,0 +1,9 @@
1
+ package main
2
+
3
+ import "testing"
4
+
5
+ func TestGreet(t *testing.T) {
6
+ if got := greet("world"); got != "hello, world" {
7
+ t.Errorf("greet() = %q, want %q", got, "hello, world")
8
+ }
9
+ }
package/stub/go.mod ADDED
@@ -0,0 +1,3 @@
1
+ module github.com/testingai/stub-golang
2
+
3
+ go 1.22