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

验证回执