This should resolve #228 , it adds the ability to parse that type of output, and streamlines the code a tiny bit (at the expense of stronger typing, sadly)
For others edification:
scanning a project with go list -json -m all includes every dependency you are using, on paper, and includes info on replace blocks, etc... so this is the recipe
scanning a project with go list -json -deps tells go to let us know about ONLY the dependencies that end up in the final product, so this the cake, what got built with the recipe. This excludes test deps best I can tell, although they are reference in some of the json we end up with (only to the point where we see that a package has test dependencies)
This pull request makes the following changes:
Adds a test in parse_test.go
Rethinks a few things in parse.go around how we parse json, using a map[string]interface{} as what we originally parse in to, such that we can just check if keys exist
Removes dead code
Updates docs, etc...
It relates to the following issue #s:
Fixes #228
cc @bhamail / @DarthHater
A nice bow to @SirMaster who got the groundwork laid, too!
This should resolve #228 , it adds the ability to parse that type of output, and streamlines the code a tiny bit (at the expense of stronger typing, sadly)
For others edification:
go list -json -m all
includes every dependency you are using, on paper, and includes info on replace blocks, etc... so this is the recipego list -json -deps
tells go to let us know about ONLY the dependencies that end up in the final product, so this the cake, what got built with the recipe. This excludes test deps best I can tell, although they are reference in some of the json we end up with (only to the point where we see that a package has test dependencies)This pull request makes the following changes:
parse_test.go
parse.go
around how we parse json, using amap[string]interface{}
as what we originally parse in to, such that we can just check if keys existIt relates to the following issue #s:
cc @bhamail / @DarthHater
A nice bow to @SirMaster who got the groundwork laid, too!