diff options
| author | Mathias Magnusson <mathias@magnusson.space> | 2026-01-23 20:02:21 +0100 |
|---|---|---|
| committer | Mathias Magnusson <mathias@magnusson.space> | 2026-01-24 00:32:51 +0100 |
| commit | 8f29959b87b68e76aadbc32dfa00f938604b1f6d (patch) | |
| tree | 90ee7cad39e141332cbdc37bc89aa6511479a95b | |
| parent | 3d113f41cacc9e1f04e453d04fcab6af6a72fbf4 (diff) | |
| download | hh-8f29959b87b68e76aadbc32dfa00f938604b1f6d.tar.gz | |
add AGENTS.md
| -rw-r--r-- | AGENTS.md | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..8992a8c --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,25 @@ +# hh + +This projects is a code generation tool and library for creating wrapper functions around web +request handlers that parse data out of the request. + +The code generator tool is located at `./cmd/generate` and the library which shall be included is +located at `.`. In `./examples`, there are usage examples available. + +The tool, when invoked on a go module (a directory) goes through all go files and finds functions +with `//hh:route` directives. For each of these functions (which shall be route handlers), it +creates a wrapper function. To do this, it looks at a parameter defined as an inline struct which +specifies which fields should be retrieved from the request. + +## Commands + +To test the project, run these commands in order: + +- Run the code generation tool: `go generate ./examples` +- Compile the output: `go build -o /dev/null ./examples` + +## Tests + +This project only have integration tests, which also serve as examples. These are located in the +`./examples/` directory. They should test all available functionality of hh. Running `go test` is +therefore never relevant. |
