codesamplex

サンプル

Middleware order changes whether a trailing-slash suffixed extension route matches when combining URLFormat and StripSlashes.

sha256:927db3ceea28b745375befa8e666fa49cd4bd8f3d81e6fecb501212db5ab541b

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
Middleware order changes whether a trailing-slash suffixed extension route matches when combining URLFormat and StripSlashes. HOW
パッケージ
github.com/go-chi/chi/v5 5.3.1
環境
go
作成日
2026-08-16T13:24:50Z

よくある思い込み

Registering middleware.URLFormat and middleware.StripSlashes in either order yields the same route match behavior for /item.json/.

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート