-
Notifications
You must be signed in to change notification settings - Fork 25
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
"couldn't find _ in program" if -modified and file doesn't exist #24
Comments
Oddly enough, just found that |
Good catch - I had never even considered such a scenario. I'll take a look this week. |
Ever got the chance? ;D |
Sadly, as you might suspect, I did not. Would happily take a PR to fix this. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Scenario: editing a .go file that's hasn't been saved yet. (For example, for rapid greenfield prototyping of stuff via some sort of
go run
-based REPL-ish tool likegore
.) The source is sent as usual via-modified
flag and stdin archive format. When-pos
is something likeUntitled-1.go:#pos
, all documentation requests via-json
(say, hovering over thestrings.ToLower
or anything that should have docs) will always returncouldn't find Untitled-1 in program
. Or if name is empty, similarlycouldn't find in program
(2 spaces).Here's an easy-repro session:
Of course no file named
untitled.go
exists on disk, but would be awesome ifgogetdoc
could handle that, given that it read the program from stdin anyway! The given-pos
94 should be between theT
ando
ofToUpper
if my editor didn't fool me.The text was updated successfully, but these errors were encountered: