Skip to content

Commit 74b7278

Browse files
committed
Add support for Go binary package scanning
Reference: aboutcode-org/go-inspector#15 Reference: aboutcode-org/go-inspector#13 Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
1 parent 2b09be1 commit 74b7278

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

requirements-linux.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
packagedcode-msitools==0.101.210706
22
regipy==3.1.0
33
rpm-inspector-rpm==4.16.1.3.210404
4+
go-inspector

setup.cfg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ packages =
150150
rpm_inspector_rpm >= 4.16.1.3; platform_system == 'Linux'
151151
regipy >= 3.1.0; platform_system == 'Linux'
152152
packagedcode_msitools >= 0.101.210706; platform_system == 'Linux'
153+
go-inspector ; platform_system == 'Linux'
153154

154155

155156
[options.entry_points]

src/packagedcode/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,12 @@
247247
win_reg.InstalledProgramFromDockerUtilityvmSoftwareHandler,
248248
]
249249

250+
try:
251+
from go_inspector.binary import get_go_binary_handler
252+
APPLICATION_PACKAGE_DATAFILE_HANDLERS.append(get_go_binary_handler())
253+
except ImportError:
254+
pass
255+
250256
ALL_DATAFILE_HANDLERS = (
251257
APPLICATION_PACKAGE_DATAFILE_HANDLERS + [
252258
p for p in SYSTEM_PACKAGE_DATAFILE_HANDLERS

0 commit comments

Comments
 (0)