优化结构

This commit is contained in:
Yvan
2026-08-28 09:19:54 +08:00
parent 03a4131f6e
commit 279692375b
57 changed files with 778 additions and 799 deletions
@@ -23,6 +23,16 @@ func TestOperationQueryBodyPreservesEncodedSeparators(t *testing.T) {
}
}
func TestOperationQueryBodyRedactsSensitiveValues(t *testing.T) {
var values map[string]string
if err := json.Unmarshal(operationQueryBody("token=secret-token&name=alice"), &values); err != nil {
t.Fatal(err)
}
if values["token"] != redactedValue || values["name"] != "alice" {
t.Fatalf("unexpected redacted query body: %#v", values)
}
}
func runErrorAudit(t *testing.T, path, response string, logger *slog.Logger) {
t.Helper()
gin.SetMode(gin.TestMode)