Skip to content
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

Feature Request: read go.sum file from stdio #9

Open
hankei6km opened this issue Sep 22, 2019 · 0 comments
Open

Feature Request: read go.sum file from stdio #9

hankei6km opened this issue Sep 22, 2019 · 0 comments

Comments

@hankei6km
Copy link

Background

  • go.sum has been contains modules that are used for testing also.

  • go version -m can print modules that are embedded into binary files(built with go 1.13) on go 1.13.

The -m flag causes go version to print each executable's embedded
module version information, when available. In the output, the module
information consists of multiple lines following the version line, each
indented by a leading tab character.

Therefore, I developing helper library to create CREDITS files(s) from pruned go.sum file by using go version -m and gocredits.
https://github.com/hankei6km/go-ac

However, It pass a pruned go.sum file to gocredits via a temporary file, I felt this is redundant.

Description

I want to pass a pruned go.sum file to gocredits directly, as following.

$ cat puruned_go.sum | gocredits

or

r, w := io.Pipe()

go func(w io.Writer){

  // run go version -m /path/to/binary > w

}(w)

err := gocredits.Run(args, r, outStream, errStream)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant