internal/imports: don't set Context.WorkingDir, which was renamed
This field was renamed to Dir during the 1.14 development cycle. We
don't need to look for it anymore.
For golang/go#34860
Change-Id: I313a931f070e3dc5a711233e7523c309995fe655
Reviewed-on: https://go-review.googlesource.com/c/tools/+/255397
Run-TryBot: Jay Conrod <jayconrod@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
diff --git a/internal/imports/fix.go b/internal/imports/fix.go
index 613afc4..e54692e 100644
--- a/internal/imports/fix.go
+++ b/internal/imports/fix.go
@@ -920,11 +920,6 @@
// Populate it only if present.
rc := reflect.ValueOf(&ctx).Elem()
dir := rc.FieldByName("Dir")
- if !dir.IsValid() {
- // Working drafts of Go 1.14 named the field "WorkingDir" instead.
- // TODO(bcmills): Remove this case after the Go 1.14 beta has been released.
- dir = rc.FieldByName("WorkingDir")
- }
if dir.IsValid() && dir.Kind() == reflect.String {
dir.SetString(e.WorkingDir)
}