I have not used it personally but I believe this is what you are
looking for: https://godoc.org/golang.org/x/tools/go/buildutil#ExpandPatterns

On Mon, Oct 9, 2017 at 11:17 PM,  <mattmue...@gmail.com> wrote:
> I'm looking for a library or function that implements the same logic that
> many of Go's CLI tools do:
>
> go build ./...
> go install ./...
>
> Where it will return a list of matched packages.
>
> I noticed that the code for this package matching is here:
> https://golang.org/src/cmd/go/internal/load/search.go
>
> I tried yanking it out, but there's additional internal dependencies that
> make it not as trivial as I would have liked. I'm wondering if anyone has
> already done this work or if there's support in the standard library
> somewhere.
>
> Thanks!
>
> Matt
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to