CodeSampleX

示例

Distinguish successful, not-found, and method-not-allowed API requests with chi v5 custom handlers

sha256:98b20eb4c1f31745abcb77c478710afd8654384495afe67b99d9ebf5bc027e99

PUBLISHED L3_CONTRACT_PASS MIT-0

案例

目标
Distinguish successful, not-found, and method-not-allowed API requests with chi v5 custom handlers HOW
github.com/go-chi/chi/v5 v5.3.1
环境
go 1.26
创建时间
2026-08-17T01:24:58Z

常见的想当然

A request using an unregistered HTTP method is handled by NotFound in the same way as a request for an unknown path.

这是本样本作者记下的、开发者或模型在此处通常会有的预期。下面的契约才是真正运行过的东西。

契约

文件

下载已验证的构件 (tar.gz) — 契约实际运行的那些字节

原始种子者

csx-seed

验证回执