1
0
mirror of https://github.com/golang/go synced 2024-09-30 18:08:33 -06:00
go/refactor/rename
Alan Donovan e211dfb000 refactor/rename: fix crash with "." as -from package
Cause: the absolute cwd, not ".", must be passed to build.Import.

Also: simplify the lookup logic in findFromObjects, and handle nil
gracefully.

(No unit test---not worth faking os.Getwd.)

Fixes issue #13866

Change-Id: I7e8eede55bc83d98e2ef5e42609c287e74c04501
Reviewed-on: https://go-review.googlesource.com/18453
Reviewed-by: Michael Matloob <matloob@golang.org>
2016-01-08 19:32:44 +00:00
..
check14.go x/tools/...: fork and tag !1.5 all files that use go/types et al 2016-01-06 20:40:09 +00:00
check.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
go-rename.el refactor/rename: emacs: set up autoloading of go-rename function 2015-10-27 13:38:02 +00:00
mvpkg_test.go cmd/gorename: -d flag prints diffs instead of rewriting files 2015-12-30 15:25:00 +00:00
mvpkg.go cmd/gorename: -d flag prints diffs instead of rewriting files 2015-12-30 15:25:00 +00:00
rename14.go x/tools/...: fork and tag !1.5 all files that use go/types et al 2016-01-06 20:40:09 +00:00
rename_test.go refactor/rename: skip Diff test on Windows (build fix attempt) 2016-01-08 00:30:52 +00:00
rename.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00
spec14.go refactor/rename: fix crash with "." as -from package 2016-01-08 19:32:44 +00:00
spec.go refactor/rename: fix crash with "." as -from package 2016-01-08 19:32:44 +00:00
util14.go x/tools/...: fork and tag !1.5 all files that use go/types et al 2016-01-06 20:40:09 +00:00
util.go tools: switch to standard go/types at tip 2016-01-06 22:15:26 +00:00