)]}'
{
  "commit": "2b4da687bc20917b10f08f6d2dabf7667717170f",
  "tree": "d0c60fbc6ce7e78806c82b436755fa3e815484ed",
  "parents": [
    "e227a53e73a48e01ef35342a18a1d7db44bb26ef"
  ],
  "author": {
    "name": "cuishuang",
    "email": "imcusg@gmail.com",
    "time": "Mon Jul 13 22:25:55 2026 +0800"
  },
  "committer": {
    "name": "Gopher Robot",
    "email": "gobot@golang.org",
    "time": "Mon Jul 13 08:02:15 2026 -0700"
  },
  "message": "go/analysis/passes/modernize: avoid errorsastype panic on package variables\n\nThe errorsastype analyzer assumes that the GenDecl containing an\nerrors.As target variable is always part of a local DeclStmt.\n\nFor a package-level variable, the GenDecl is instead a child of an\nast.File. Passing that cursor to refactor.DeleteStmt causes a panic\nbecause an ast.File is not an ast.Stmt.\n\nRequire the declaration to be part of a local DeclStmt before offering\nthe rewrite, and add a regression test for a package-level errors.As\ntarget.\n\nFixes golang/go#80383\n\nChange-Id: Ia842ca0232a1683cc1bcd87b12c0972eca084a67\nReviewed-on: https://go-review.googlesource.com/c/tools/+/800140\nReviewed-by: Alan Donovan \u003cadonovan@google.com\u003e\nLUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com \u003cgolang-scoped@luci-project-accounts.iam.gserviceaccount.com\u003e\nAuto-Submit: Alan Donovan \u003cadonovan@google.com\u003e\nReviewed-by: Madeline Kalil \u003cmkalil@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0e3f17fbcc07a17d109797b1dfa218431b1b8527",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/modernize/errorsastype.go",
      "new_id": "618e180cf4a6aaf5a46737f5fe7c6f6d8b0c55f3",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/modernize/errorsastype.go"
    },
    {
      "type": "modify",
      "old_id": "2e840b7b2aba20bce3e7724192aa7166e5239d5b",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/modernize/testdata/src/errorsastype/errorsastype.go",
      "new_id": "a7aa2a5e68722952f8631ac89f035244de74b65c",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/modernize/testdata/src/errorsastype/errorsastype.go"
    },
    {
      "type": "modify",
      "old_id": "35a1728524759181717f93484dfca6ac96a9e060",
      "old_mode": 33188,
      "old_path": "go/analysis/passes/modernize/testdata/src/errorsastype/errorsastype.go.golden",
      "new_id": "9628fe879dfb2841a0d4bdc9a3cb1c2afca0f712",
      "new_mode": 33188,
      "new_path": "go/analysis/passes/modernize/testdata/src/errorsastype/errorsastype.go.golden"
    }
  ]
}
