Remove buildarch from the Go styleguide and HTTP server conventions: read the architecture at run time #66

Closed
opened 2026-10-02 00:46:53 +02:00 by clawbot · 0 comments
Collaborator

Owner's words (chat, 2026-10-01 ~22:39 UTC; the rollout across repos is sneak/project-management#19):

update all repos and memories to no longer include buildarch in the makefile - the build architecture is available at runtime from the stdlib and doesn't need to be passed in.

These two documents are the canonical source. Every other repo's change follows them, so this one lands first.

What to change, on a branch cut from next:

  • prompts/CODE_STYLEGUIDE_GO.md, the item "Embed the git commit hash into the binary": remove Buildarch from the main.go example and the BUILDARCH line and -X main.Buildarch from the Makefile example. The example prints the architecture with runtime.GOARCH (importing runtime). Add one plain sentence to the item: the architecture is not passed in at build time; a program that reports it reads runtime.GOARCH at run time.
  • prompts/GO_HTTP_SERVER_CONVENTIONS.md: remove Buildarch from the main example near the top, from the globals package example (variable block, struct, New), from "Setting Globals in Main", and the BUILDARCH line and -X main.Buildarch from the Makefile in "Build-Time Variable Injection" (only -X main.Version stays). The logger's Identify logs "arch", runtime.GOARCH in place of the "buildarch" field, as sneak/pixa already does.

Definition of done:

  • git grep -i buildarch over the whole branch, templates included, finds nothing.
  • No example passes the architecture in at build time; every example that reports it reads runtime.GOARCH at run time. A Buildarch variable or field is removed, not left empty.
  • make check passes; PR to next, nothing else in these documents changes.

Model: opus-5-5

Owner's words (chat, 2026-10-01 ~22:39 UTC; the rollout across repos is https://git.eeqj.de/sneak/project-management/issues/19): > update all repos and memories to no longer include buildarch in the makefile - the build architecture is available at runtime from the stdlib and doesn't need to be passed in. These two documents are the canonical source. Every other repo's change follows them, so this one lands first. What to change, on a branch cut from `next`: - `prompts/CODE_STYLEGUIDE_GO.md`, the item "Embed the git commit hash into the binary": remove `Buildarch` from the `main.go` example and the `BUILDARCH` line and `-X main.Buildarch` from the Makefile example. The example prints the architecture with `runtime.GOARCH` (importing `runtime`). Add one plain sentence to the item: the architecture is not passed in at build time; a program that reports it reads `runtime.GOARCH` at run time. - `prompts/GO_HTTP_SERVER_CONVENTIONS.md`: remove `Buildarch` from the `main` example near the top, from the globals package example (variable block, struct, `New`), from "Setting Globals in Main", and the `BUILDARCH` line and `-X main.Buildarch` from the Makefile in "Build-Time Variable Injection" (only `-X main.Version` stays). The logger's `Identify` logs `"arch", runtime.GOARCH` in place of the `"buildarch"` field, as `sneak/pixa` already does. Definition of done: - `git grep -i buildarch` over the whole branch, templates included, finds nothing. - No example passes the architecture in at build time; every example that reports it reads `runtime.GOARCH` at run time. A `Buildarch` variable or field is removed, not left empty. - `make check` passes; PR to `next`, nothing else in these documents changes. Model: opus-5-5
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/prompts#66