Thanks a lot for the tips. This repo is working out and should hold me
over, as Ian mentioned, until golang.org/x/mod/modfile is out.
On Tuesday, September 3, 2019 at 12:26:28 AM UTC-7, Paul Jolly wrote:
>
> Also note that you can run:
>
> go mod edit -json
>
> and get JSON output.
>
>
That's good news, gives me some confidence that the tooling will keep
working after 1.14.
On Tuesday, September 3, 2019 at 6:43:15 PM UTC-7, Ian Cottrell wrote:
>
> The parsing code will eventually be public, see
> https://github.com/golang/go/issues/31761
> When it is done, you would want golan
The parsing code will eventually be public, see
https://github.com/golang/go/issues/31761
When it is done, you would want golang.org/x/mod/modfile, which will be a
(possibly modified) copy of the compiler internal package of the same name.
On Tue, Sep 3, 2019 at 3:29 AM Paul Jolly wrote:
> > So
> Sorry I left out the details. So far it's two specific properties I need for
> instructions in my build process:
>
> 1) The full name of the package
go list -f {{.Name}} example.com/blah
> 2) The version of the protobuf dependency for locking the right version
> protoc-gen-go before runni
Also note that you can run:
go mod edit -json
and get JSON output.
go help mod edit
will given you the types you can then use to unmarshal the JSON.
Failing that, the code that Dan referenced has been factored out into:
https://godoc.org/github.com/rogpeppe/go-internal/modfile
On
Sorry I left out the details. So far it's two specific properties I need
for instructions in my build process:
1) The full name of the package
2) The version of the protobuf dependency for locking the right
version protoc-gen-go before running protoc (that has been asked quite a
few times, tota
Thanks. I saw the same being done by vgo - might be viable.
On Monday, September 2, 2019 at 10:52:45 PM UTC-7, kortschak wrote:
>
> Not really exposed, but there is code you could copy.
>
> https://golang.org/pkg/cmd/go/internal/modfile/#Parse
>
> On Mon, 2019-09-02 at 22:44 -0700, James Pettyjo
On Mon, Sep 2, 2019 at 10:44 PM James Pettyjohn
wrote:
> This might be a bad idea but I'm trying to parse the go.mod file for data
> as part of my build process - if at all possible I'd like to avoid
> duplicating the data that is already there in another file.
>
In this type of situation you sh
Not really exposed, but there is code you could copy.
https://golang.org/pkg/cmd/go/internal/modfile/#Parse
On Mon, 2019-09-02 at 22:44 -0700, James Pettyjohn wrote:
> Hi,
>
> This might be a bad idea but I'm trying to parse the go.mod file for
> data
> as part of my build process - if at all p
Hi,
This might be a bad idea but I'm trying to parse the go.mod file for data
as part of my build process - if at all possible I'd like to avoid
duplicating the data that is already there in another file.
Is there an exposed package that can be used for this?
- J
--
You received this message
10 matches
Mail list logo