サンプル
github.com/gin-gonic/gin v1.12.0: Context.AbortWithStatusJSON
検証済みサンプル — golang github.com/gin-gonic/gin v1.12.0: Context.AbortWithStatusJSON. go 1.26 · linux alpine/x64 · docker で contract を実行し、成功しました: Context.Set…
sha256:838900e5e42099f6d783dccbd9a02496f5429b9bbb9120628bd5ef6eb3f4c66e
このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。
合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。
MIT-0
実行証拠
宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。
- 証拠の基準
- 署名済みコントラクト合格
- 検証レシート
- 1
- ビルドした署名鍵
- 1
宣言された環境
go 1.26 linux x64 go 1.26 go go
検証実行環境
| 環境 | コントラクト | ステージ | 実行日 |
|---|---|---|---|
| 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 |
ケース
HOW- ゴール
- verify gin.Context.AbortWithStatusJSON in pkg:golang/github.com/gin-gonic/gin@v1.12.0
- シンボル
-
- gin.Context.AbortWithStatusJSON
- 環境
- go 1.26
- 作成日
- 2026-08-18T13:31:54Z
コントラクト
- 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.
ファイル
- PROMPT.md
- contract_test.go
- csx.json
- go.mod
- go.sum
- spec.json
オリジンシーダー
匿名