Metadata-Version: 2.1
Name: go-inspector
Version: 0.2.2
Summary: go-inspector is a scancode plugin to extract symbols and dependencies found in Go binaries.
Home-page: https://github.com/nexB/go-inspector
Author: nexB. Inc. and others
Author-email: info@aboutcode.org
License: Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang
Keywords: utilities
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/x-rst
License-File: apache-2.0.LICENSE
License-File: NOTICE
License-File: AUTHORS.rst
License-File: CHANGELOG.rst
License-File: CODE_OF_CONDUCT.rst
Requires-Dist: commoncode
Requires-Dist: plugincode
Requires-Dist: scancode-toolkit
Requires-Dist: typecode
Provides-Extra: testing
Requires-Dist: pytest!=7.0.0,>=6; extra == "testing"
Requires-Dist: pytest-xdist>=2; extra == "testing"
Requires-Dist: aboutcode-toolkit>=7.0.2; extra == "testing"
Requires-Dist: pycodestyle>=2.8.0; extra == "testing"
Requires-Dist: twine; extra == "testing"
Requires-Dist: black; extra == "testing"
Requires-Dist: isort; extra == "testing"
Provides-Extra: docs
Requires-Dist: Sphinx>=5.0.2; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
Requires-Dist: sphinx-reredirects>=0.1.2; extra == "docs"
Requires-Dist: doc8>=0.11.2; extra == "docs"
Requires-Dist: sphinx-autobuild; extra == "docs"
Requires-Dist: sphinx-rtd-dark-mode>=1.3.0; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"

go-inspector
================================

go-inspector is a utility to extract dependencies and symbols from Go binaries.
It is designed to work as a ScanCode Toolkit plugin and integrated in ScanCode.io

To install and use:

- Run ``pip install go-inspector``
- Use with ``scancode --json-pp - --go-symbol --verbose <PATH to a tree or file with Go binaries>``

The JSON output will contain various dependencies and symbols found in Go binaries if any.


- License: Apache-2.0 AND MIT AND BSD-3-Clause WITH LicenRef-scancode-google-patent-license-golang
- Copyright (c) nexB Inc., Mandiant, The Go Authors, Elliot Chance and others.
- Homepage: https://github.com/nexB/go-inspector/

See the src/go_inspector/bin for detailed license and credits for bundled third-party packages.


Development
----------------

- Install requirements and dependencies using ``make dev``
- Then ``source venv/bin/activate``

Testing:

- To run tests: ``pytest -vvs``
- To regen test fixtures: ``SCANCODE_REGEN_TEST_FIXTURES=yes pytest -vvs``
- To update the bundled GoReSym, see src/bin/update.sh


How to re-generate test binaries
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

These are compiled (and committed) from code in tests/data/basic :

- Run ``go tool dist list`` to get all possible pairs of OSes and arches to compile the binary.
- Then build a OS/arch pair like this to get compiled binaries:
  ``GOOS=<OS> GOARCH=<arch> go build -o ./tests/data/basic/app_<OS>_exe ./tests/data/main.go``
- Make a copy and run strip of the Linux executable as "app_lin_exe_stripped"

  
Funding and sponsoring
---------------------------

This project is funded in part through:

- NGI0 Entrust https://nlnet.nl/entrust, a fund established by NLnet with
  financial support from the European Commission's Next Generation Internet https://ngi.eu program.
  Learn more at the NLnet project page https://nlnet.nl/purl2all. 

  |nlnet| and |ngi0entrust|

- Support from nexB Inc. |nexb|

- Generous support from users like you!


.. |nlnet| image:: https://nlnet.nl/logo/banner.png
    :target: https://nlnet.nl
    :height: 50
    :alt: NLnet foundation logo

.. |ngi0entrust| image:: https://nlnet.nl/image/logos/NGI0_tag.svg
    :target: https://nlnet.nl/entrust
    :height: 50
    :alt: NGI Zero Logo

.. |nexb| image:: https://nexb.com/wp-content/uploads/2022/04/nexB.svg
    :target: https://nexb.com
    :height: 30
    :alt: nexB logo
