x/mod/modfile: crash on AddGoStmt
for an empty File
#62457
Labels
FixPending
Issues that have a fix which has not yet been reviewed or submitted.
FrozenDueToAge
help wanted
modules
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Run this program w/ golang.org/x/mod@v0.12.0:
https://go.dev/play/p/G0zKRp7VvSf
What did you expect to see?
No crash
What did you see instead?
Crash
The text was updated successfully, but these errors were encountered: