Skip to content

Commit 7866a35

Browse files
committed
feat(license): Added support to new License field of go-dep-parser's library
1 parent 9d61777 commit 7866a35

File tree

4 files changed

+133
-118
lines changed

4 files changed

+133
-118
lines changed

pkg/rpc/convert.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ func ConvertFromRPCLibraries(rpcLibs []*common.Library) []ftypes.LibraryInfo {
6565
Library: deptypes.Library{
6666
Name: l.Name,
6767
Version: l.Version,
68+
License: l.License,
6869
},
6970
})
7071
}
@@ -78,6 +79,7 @@ func ConvertToRPCLibraries(libs []deptypes.Library) []*common.Library {
7879
rpcLibs = append(rpcLibs, &common.Library{
7980
Name: l.Name,
8081
Version: l.Version,
82+
License: l.License,
8183
})
8284
}
8385
return rpcLibs
@@ -408,6 +410,7 @@ func ConvertToRPCBlobInfo(diffID string, blobInfo ftypes.BlobInfo) *cache.PutBlo
408410
libs = append(libs, &common.Library{
409411
Name: lib.Library.Name,
410412
Version: lib.Library.Version,
413+
License: lib.Library.License,
411414
})
412415
}
413416
applications = append(applications, &common.Application{

pkg/scanner/local/scan.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@ func (s Scanner) scanLibrary(apps []ftypes.Application, options types.ScanOption
210210
pkgs = append(pkgs, ftypes.Package{
211211
Name: lib.Library.Name,
212212
Version: lib.Library.Version,
213+
License: lib.Library.License,
213214
Layer: lib.Layer,
214215
})
215216
}

0 commit comments

Comments
 (0)