From 3abe688aea0bcfc7e434bb7e2244257c3bbdfb95 Mon Sep 17 00:00:00 2001 From: Gordon Klaus Date: Mon, 7 Jul 2014 14:02:32 -0700 Subject: [PATCH] undo CL 107160049 / 9abbb23a14f6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- go/loader/loader.go | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/go/loader/loader.go b/go/loader/loader.go index 37181f26..2a15359a 100644 --- a/go/loader/loader.go +++ b/go/loader/loader.go @@ -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.