-
-
Notifications
You must be signed in to change notification settings - Fork 15
Allow standard input too #5
Comments
This occurred to me too, but I'm not sure how to go about it. The tool uses And, when you don't give any arguments, On the other hand, We could always go with the slightly hacky I'm also not clear on how we could support arbitrary portions of Go code. Surely those can't always type-check properly. Are you saying that we would ignore typechecking in that scenario? |
Yeah, maybe As for type checking, I'd drop typechecking when reading stdin unless the input represents a complete Go package file. It could print an error if a type was specified in the pattern. |
Well, Dropping typechecking sounds like something we have to do one way or another. For example, typechecking a single file out of an entire package could very easily not typecheck. I'll open a separate issue. |
@rogpeppe feel free to work on this if you'd like, since I have little use for partial source code parsing (I assume you do because of Acme).
|
Sometimes it's useful to be able to search an arbitrary
portion of a Go program (for example to see where any
identifiers named "a" are within a given function).
It would be nice if gogrep could do this.
The text was updated successfully, but these errors were encountered: