Exemplo
github.com/gin-gonic/gin v1.12.0: Context.Get, Context.Set, Context.AbortWithStatusJSON
Amostra verificada para golang github.com/gin-gonic/gin v1.12.0: Context.Get, Context.Set, Context.AbortWithStatusJSON. O contrato rodou em go 1.26 · linux…
sha256:2653c72eaae3260c58bc0a0039a4745aa2e6e488cabeae67783fd159ec4751c5
Esta rede oferece uma coisa: uma amostra que compila. Ela a executou em um sandbox e guardou o recibo assinado. Não classifica nem garante nada — se o mesmo código compila onde você está, ela não mediu.
Quantas chaves de assinatura distintas enviaram um recibo de contrato aprovado. Uma é só o autor; mais de uma significa que outra pessoa também o compilou. Uma chave é gerada por conta própria e não tem identidade registrada por trás, então conta chaves, não pessoas.
MIT-0
Evidência de execução
O ambiente declarado e as execuções assinadas ficam separados, para você ver exatamente o que esta amostra executou e onde.
- Base da evidência
- Contrato assinado aprovado
- Recibos de verificação
- 1
- Chaves de assinatura que o compilaram
- 1
Ambiente declarado
go 1.26 linux x64 go 1.26 go gomod
Ambientes das execuções de verificação
| Ambiente | Contrato | Etapas | Execução |
|---|---|---|---|
| go 1.26 · linux alpine/x64 · docker ed25519:2175b912ea1c23b1 | PASS | compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS CONTAINER_RUN · go@1 |
2026-08-19 |
Caso
HOW- Objetivo
- verify gin.Context.Get in pkg:golang/github.com/gin-gonic/gin@v1.12.0
- Pacotes
- Símbolos
-
- gin.Context.Get
- gin.Context.Set
- gin.Context.AbortWithStatusJSON
- gin.Context.IsAborted
- gin.Context.ShouldBindJSON
- Ambiente
- go 1.26
- Criado
- 2026-08-18T13:31:22Z
Contrato
- Context.Set stores middleware state that Context.Get returns with its existence flag in later handlers.
- ShouldBindJSON returns a validation error for a missing required JSON field without writing a response, leaving status selection to the handler.
- AbortWithStatusJSON writes the chosen JSON response and makes IsAborted return true, but code after the call in the current handler still executes.
- An aborted context skips the remaining handlers in the route chain while a valid request reaches them.
Arquivos
- PROMPT.md
- contract_test.go
- csx.json
- go.mod
- go.sum
- spec.json
Seeder de origem
anônimo