mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
refactor/rename: add line number to ambiguityError
Updates golang/go#19906 Change-Id: If13c828541cdb3937e5e970dd8add7615d36d866 Reviewed-on: https://go-review.googlesource.com/40171 Reviewed-by: David R. Jenni <david.r.jenni@gmail.com> Reviewed-by: Robert Griesemer <gri@golang.org> Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
parent
1dbffd0798
commit
aaeb897338
@ -558,8 +558,8 @@ func ambiguityError(fset *token.FileSet, objects []types.Object) error {
|
|||||||
buf.WriteString(", ")
|
buf.WriteString(", ")
|
||||||
}
|
}
|
||||||
posn := fset.Position(obj.Pos())
|
posn := fset.Position(obj.Pos())
|
||||||
fmt.Fprintf(&buf, "%s at %s:%d",
|
fmt.Fprintf(&buf, "%s at %s:%d:%d",
|
||||||
objectKind(obj), filepath.Base(posn.Filename), posn.Column)
|
objectKind(obj), filepath.Base(posn.Filename), posn.Line, posn.Column)
|
||||||
}
|
}
|
||||||
return fmt.Errorf("ambiguous specifier %s matches %s",
|
return fmt.Errorf("ambiguous specifier %s matches %s",
|
||||||
objects[0].Name(), buf.String())
|
objects[0].Name(), buf.String())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user