go/packages: fix json struct tag on driverRequest.Command
Fixes golang/go#31181
Change-Id: I99bceb66809ed66393cc8e8deb5b82b8429ca337
Reviewed-on: https://go-review.googlesource.com/c/tools/+/170477
Run-TryBot: Michael Matloob <matloob@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/go/packages/external.go b/go/packages/external.go
index 860c3ec..22ff769 100644
--- a/go/packages/external.go
+++ b/go/packages/external.go
@@ -18,7 +18,7 @@
// Driver
type driverRequest struct {
- Command string `json "command"`
+ Command string `json:"command"`
Mode LoadMode `json:"mode"`
Env []string `json:"env"`
BuildFlags []string `json:"build_flags"`
diff --git a/go/packages/packages.go b/go/packages/packages.go
index 7d0198f..b0e827f 100644
--- a/go/packages/packages.go
+++ b/go/packages/packages.go
@@ -137,7 +137,7 @@
BuildFlags []string
// Fset provides source position information for syntax trees and types.
- // If Fset is nil, the loader will create a new FileSet.
+ // If Fset is nil, Load will use a new fileset, but preserve Fset's value.
Fset *token.FileSet
// ParseFile is called to read and parse each file