Skip to content

Commit

Permalink
Add check_type option to collect_and_parse_symbols
Browse files Browse the repository at this point in the history
Add check_type option to collect_and_parse_symbols to skip
checking the filetype when not needed.

Also comment print() statement

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
  • Loading branch information
pombredanne committed Apr 5, 2024
1 parent fc737eb commit 8705560
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/go_inspector/plugin.py
Expand Up @@ -104,13 +104,15 @@ def is_executable_binary(location):
return True


def collect_and_parse_symbols(location, **kwargs):

def collect_and_parse_symbols(location, check_type=True, **kwargs):
"""
Run GoReSym and return a mapping of symbols of interest for the Go binary file
at ``location``.
If ``check_type`` is True, the file is checked.
"""
if not is_executable_binary(location):
print("Not an executable binary")
if check_type and not is_executable_binary(location):
# print("Not an executable binary")
return

goresym_args = ["-p", location]
Expand Down

0 comments on commit 8705560

Please sign in to comment.