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

Aperta Adatta ai principianti
#13 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
go
Ambito
devtools

Direzione di ricerca

Inizia dal fixture TestCompareWindowsOnly in plugin/scripts/godebugdiff_test.go, dove winreadlinkvolume è atteso come Changed: 26 e dovrebbe essere 23. Riproduci il punto 1 commentando c.WindowsOnly = isWindowsOnly(k) in compare() e controlla l'URL nel messaggio di errore. È completato quando il fixture verifica 23 con l'URL #go-123 e controlla Before, After e Package, e examples/README.md indica in un unico punto la toolchain per ciascun file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Go
Stelle
0
Fork
3
Merge medio
4h 55m
PR unite (30g)
4

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di GillMacedo/godebugdiff

Tutte le issue di GillMacedo/godebugdiff

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.