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

goimpl: inputRegex not match interface name expected #1670

Closed
yinheli opened this issue Aug 7, 2021 · 3 comments
Closed

goimpl: inputRegex not match interface name expected #1670

yinheli opened this issue Aug 7, 2021 · 3 comments

Comments

@yinheli
Copy link
Contributor

yinheli commented Aug 7, 2021

https://github.com/golang/vscode-go/blob/master/src/goImpl.ts#L18

// Supports only passing interface, see TODO in implCursor to finish
const inputRegex = /^(\w+\ \*?\w+\ )?([\w./]+)$/;
// matched
t *MyFile io.Closer

// not matched
t *MyFile github.com/example/pkg/name-with-line/iox.FileAdapter
@gopherbot gopherbot added this to the Untriaged milestone Aug 7, 2021
@stamblerre stamblerre modified the milestones: Untriaged, Backlog Aug 12, 2021
@yinheli
Copy link
Contributor Author

yinheli commented Aug 12, 2021

@stamblerre Can I try to fix this issue? Just modify the inputRegex ?

@stamblerre
Copy link
Contributor

Sure, please give it a try if you would like to send a fix. Thanks!

@gopherbot
Copy link
Collaborator

Change https://golang.org/cl/343829 mentions this issue: src/goImpl: allow - as an acceptable char for interface names (package/variable)

@golang golang locked and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants