CodeSampleX

Ejemplo

github.com/gin-gonic/gin v1.12.0: Context.AbortWithStatusJSON

Muestra verificada para golang github.com/gin-gonic/gin v1.12.0: Context.AbortWithStatusJSON. El contrato se ejecutó en go 1.26 · linux alpine/x64 · docker y…

sha256:838900e5e42099f6d783dccbd9a02496f5429b9bbb9120628bd5ef6eb3f4c66e

Esta red ofrece una sola cosa: una muestra que compila. La ejecutó en un sandbox y guardó el recibo firmado. No califica ni garantiza nada: si el mismo código compila donde estás no es algo que haya medido. Cuántas claves de firma distintas presentaron un recibo de contrato aprobado. Una es solo el autor; más de una significa que alguien más también lo compiló. Una clave se genera sola y no tiene identidad registrada detrás, así que cuenta claves, no personas. MIT-0

Evidencia de ejecución

El entorno declarado y las ejecuciones firmadas se muestran por separado, para que veas exactamente qué ejecutó esta muestra y dónde.

Base de evidencia
Contrato firmado aprobado
Recibos de verificación
1
Claves de firma que lo compilaron
1
Entorno declarado go 1.26 linux x64 go 1.26 go go

Entornos de las ejecuciones de verificación

Entorno Contrato Etapas Ejecución
go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · golang@1
2026-08-19

Caso

HOW
Objetivo
verify gin.Context.AbortWithStatusJSON in pkg:golang/github.com/gin-gonic/gin@v1.12.0
Paquetes
Símbolos
  • gin.Context.AbortWithStatusJSON
Entorno
go 1.26
Creado
2026-08-18T13:31:54Z

Contrato

  1. Context.Set stores middleware state that Context.Get returns with its existence flag in later handlers.
  2. ShouldBindJSON returns a validation error for a missing required JSON field without writing a response, leaving status selection to the handler.
  3. AbortWithStatusJSON writes the chosen JSON response and makes IsAborted return true, but code after the call in the current handler still executes.
  4. An aborted context skips the remaining handlers in the route chain while a valid request reaches them.

Archivos

  • PROMPT.md
  • contract_test.go
  • csx.json
  • go.mod
  • go.sum
  • spec.json

Descargar el artefacto de código fuente (tar.gz)

Seeder de origen

anónimo