undo CL 107160049 / 9abbb23a14f6

This method was deemed unfit for the API.  See the original CL for discussion.

««« original CL description
go.tools/go/loader: Add Program.FilePath convenience method for getting the full path of a source file.

LGTM=gri
R=gri, adonovan
CC=golang-codereviews
https://golang.org/cl/107160049

»»»

LGTM=gri
R=gri, adonovan
CC=golang-codereviews
https://golang.org/cl/107570043
This commit is contained in:
Gordon Klaus 2014-07-07 14:02:32 -07:00 committed by Robert Griesemer
parent 3e7bc48329
commit 3abe688aea
1 changed files with 0 additions and 10 deletions

View File

@ -460,16 +460,6 @@ func (prog *Program) InitialPackages() []*PackageInfo {
return infos
}
// FilePath returns the full path to the specified file. It returns the empty
// string if the file does not belong to one of this Program's packages.
//
func (prog *Program) FilePath(file *ast.File) string {
if f := prog.Fset.File(file.Package); f != nil {
return f.Name()
}
return ""
}
// ---------- Implementation ----------
// importer holds the working state of the algorithm.