Fix test fixture, README provenance and remaining Windows-only polish

未关闭 适合新手
#13 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
62/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
go
领域
devtools

调研方向

从 plugin/scripts/godebugdiff_test.go 中的 TestCompareWindowsOnly 测试夹具开始,其中 winreadlinkvolume 被期望为 Changed: 26,但应为 23。通过注释 compare() 中的 c.WindowsOnly = isWindowsOnly(k) 来复现第 1 项,并检查失败信息中的 URL。当该夹具断言 23 并带有 #go-123 URL,且检查 Before、After 和 Package,同时 examples/README.md 在一处说明每个文件的工具链时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Follow-up from #12:

  1. TestCompareWindowsOnly (plugin/scripts/godebugdiff_test.go) gives winreadlinkvolume Changed: 26. The real value is 23, so the change gets the URL go.dev/doc/godebug#go-126 instead of #go-123. To reproduce: comment out c.WindowsOnly = isWindowsOnly(k) in compare() and run the test; the failure message prints URL:https://go.dev/doc/godebug#go-126. Use 23. The test also ignores the second value compare() returns and never checks Before, After or Package. Asserting them costs nothing.
  2. The WindowsOnly field comment now says "Windows-specific setting", but isWindowsOnly only checks the "win" name prefix. Make the comment match the rule, or derive the mark from an explicit list.
  3. examples/README.md line 12 still says the real outputs were made with Go 1.27.3, and the new line 24 says cobra.txt was redone with Go 1.27.4. Put the toolchain for each file in one place, for example a column in the table.
  4. Item 3 of #11 is still open, although #12 closes #11: the "No binary imports the package, so no effect" section still adds "(Windows only)". To reproduce: run from 1.22 to 1.23 on a module whose only binary is an empty func main() {}. Also, windowsOnly still uses omitempty while goCommand is always emitted, and the report does not tell Linux-only services that they can ignore the pins for Windows-only settings.

GillMacedo

主要语言
Go
星标
0
派生
3
平均合并
4 小时 55 分钟
30 天内合并 PR
4

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

GillMacedo/godebugdiff 的其他 Issue

查看 GillMacedo/godebugdiff 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。