Skip to content

[refactor][P3] webhook.NewGiteeSigner godoc 引用不存在的选项名 SignerWithClock——照文档写编译不过 #392

Closed

Description

@zy84338719

来源:2026-11-11 全矩阵深度代码审查(6 路并行扫描约 24 万行 Go)。判定已复核;行号基于 2026-11-11 的 main,动手前请核对现场。
归档索引:#372(本仓重构 backlog)

位置

pkg/webhook/platforms.go:116-117(对照 sign_timestamp.go:56、sign_hmac.go:138,已人工复核两符号实名)

证据

:116-117 "opts 透传 SignerWithMessage / SignerWithClock / SignerWithURLEncoded(须与收端同配)"。但 NewGiteeSigner 收的是 TimestampSignerOption,时钟选项实名是 TimestampSignerWithClock(sign_timestamp.go:56);SignerWithClock 是 HMACSigner 家族的选项(sign_hmac.go:138,返回 HMACSignerOption),传给 NewGiteeSigner 直接类型错误。文档把读者引向一个在该调用点不存在的符号。

建议

platforms.go 该行改为 TimestampSignerWithClock;顺带全包 grep 一次「选项名跨家族引用」,SignerWith* 前缀族与 With* 族在注释里多次互指,一次性对齐。

Activity

  1. moved this from Todo to In Progress in oekit Issue 大盘on Nov 12, 2026
  2. added a commit that references this issue on Nov 12, 2026
  3. moved this from In Progress to Done in oekit Issue 大盘on Nov 12, 2026
  4. zy84338719 commented on Nov 12, 2026

    @zy84338719
    ContributorAuthor

    已合入修复 ✅(无 SemVer 发布:本次改动不发版本)

    变更内容

    NewGiteeSigner godoc 选项实名改 TimestampSignerWithClock(跨家族引用消除)

    合入:PR #423(https://github.com/oekit/pkg/pull/423),merge commit 53135ccf,2026-11-12T17:13:18Z

    CI:link ✅ / Lint & Test / Test ✅ / Lint & Test / Lint ✅ / Zero Third-Party Deps ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactor重构机会(代码审查产出)

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions