Added version as separate column in CSV, licenses detection and complete Go dep parser.

This commit is contained in:
2020-02-07 20:37:42 +05:00
parent 392702f34d
commit 633aa28ef1
6 changed files with 195 additions and 3 deletions

View File

@@ -12,7 +12,7 @@ import (
)
var (
headers = []string{"Module", "License", "Repository URL", "License URL", "Project", "Copyrights"}
headers = []string{"Module", "Version", "License", "Repository URL", "License URL", "Project", "Copyrights"}
)
// Responsible for pushing passed data into CSV file.
@@ -40,7 +40,7 @@ func (o *outputter) Write(deps []*structs.Dependency, outFile string) {
// Write dependencies information.
for _, dep := range deps {
_ = writer.Write([]string{dep.Name, dep.License.Name, dep.VCS.VCSPath, dep.License.URL, dep.Parent, dep.License.Copyrights})
_ = writer.Write([]string{dep.Name, dep.Version, dep.License.Name, dep.VCS.VCSPath, dep.License.URL, dep.Parent, dep.License.Copyrights})
}
writer.Flush()