Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/refactor/rename: could update godoc as well #13000

tessr opened this issue Oct 20, 2015 · 2 comments

x/tools/refactor/rename: could update godoc as well #13000

tessr opened this issue Oct 20, 2015 · 2 comments


Copy link

tessr commented Oct 20, 2015

When I run gorename -from '"package".Foo' -to 'Bar' on the following:

// Foo does some things.
func Foo() {}

gorename currently leaves the comment untouched, but it would be nice if the comment updated as well, to:

// Bar does some things.
func Bar() {}
Copy link

rakyll commented Oct 20, 2015

/cc @alandonovan

@rakyll rakyll added this to the Unreleased milestone Oct 20, 2015
Copy link

It would be nice, but algorithmic approaches can do a partial job at best. Heuristics might be able to identify the subject of the first sentence of the doc comment, but the name might appear many times within the doc comment (and other comments), capitalized or not, and it's impossible to distinguish identifiers from technical terms in comments.

For these reasons, I'd rather not touch it.

@golang golang locked and limited conversation to collaborators Oct 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants