Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
x/any: make the netrc parser importable #31334
There are two implementations of a netrc parser: one lives in src/cmd/go/internal/web2/web.go and the other one lives in x/tools/cmd/auth/netrcauth/netrcauth.go.
Apart from the fact that these two implementations may differ in how they parse the spec this is a useful piece of functionality written by people with a high degree of trust and it would be nice if this library could be imported from somewhere.
CC @rogpeppe for
Note that the
Honestly, though, if you need to consume its output I would rather you just shell out to
Alright, I might push a proposed interface to github.com/kevinburke/netrc and we can see how it looks.
netrcauth seems like it would do what I want, but the goal would be to use it in API clients such as github.com/kevinburke/twilio-go or github.com/kevinburke/travis and I'm not sure I want to count on end users having a second binary - netrcauth - on their machines.