mirror of
https://github.com/anchore/syft.git
synced 2026-07-04 18:18:26 +02:00
fix: correct typos and update examples README (#4703)
Signed-off-by: Artem Muterko <artem@sopho.tech>
This commit is contained in:
parent
956858fc11
commit
1746e96ad3
@ -11,7 +11,7 @@
|
|||||||
<a href="https://goreportcard.com/report/github.com/anchore/syft" target="_blank"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/anchore/syft"></a>
|
<a href="https://goreportcard.com/report/github.com/anchore/syft" target="_blank"><img alt="Go Report Card" src="https://goreportcard.com/badge/github.com/anchore/syft"></a>
|
||||||
<a href="https://github.com/anchore/syft/releases/latest" target="_blank"><img alt="GitHub release" src="https://img.shields.io/github/release/anchore/syft.svg"></a>
|
<a href="https://github.com/anchore/syft/releases/latest" target="_blank"><img alt="GitHub release" src="https://img.shields.io/github/release/anchore/syft.svg"></a>
|
||||||
<a href="https://github.com/anchore/syft" target="_blank"><img alt="GitHub go.mod Go version" src="https://img.shields.io/github/go-mod/go-version/anchore/syft.svg"></a>
|
<a href="https://github.com/anchore/syft" target="_blank"><img alt="GitHub go.mod Go version" src="https://img.shields.io/github/go-mod/go-version/anchore/syft.svg"></a>
|
||||||
<a href="" target="_blank"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
|
<a href="https://github.com/anchore/syft/blob/main/LICENSE" target="_blank"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/License-Apache%202.0-blue.svg"></a>
|
||||||
<a href="https://anchore.com/discourse" target="_blank"><img alt="Join our Discourse" src="https://img.shields.io/badge/Discourse-Join-blue?logo=discourse"/></a>
|
<a href="https://anchore.com/discourse" target="_blank"><img alt="Join our Discourse" src="https://img.shields.io/badge/Discourse-Join-blue?logo=discourse"/></a>
|
||||||
<a rel="me" href="https://fosstodon.org/@syft"><img alt="Follow on Mastodon" src="https://img.shields.io/badge/Mastodon-Follow-blue?logoColor=white&logo=mastodon"/></a>
|
<a rel="me" href="https://fosstodon.org/@syft"><img alt="Follow on Mastodon" src="https://img.shields.io/badge/Mastodon-Follow-blue?logoColor=white&logo=mastodon"/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -100,7 +100,7 @@ func (m *UI) Teardown(force bool) error {
|
|||||||
})
|
})
|
||||||
|
|
||||||
// it may be tempting to use Kill() however it has been found that this can cause the terminal to be left in
|
// it may be tempting to use Kill() however it has been found that this can cause the terminal to be left in
|
||||||
// a bad state (where Ctrl+C and other control characters no longer works for future processes in that terminal).
|
// a bad state (where Ctrl+C and other control characters no longer work for future processes in that terminal).
|
||||||
m.program.Quit()
|
m.program.Quit()
|
||||||
|
|
||||||
_ = runWithTimeout(250*time.Millisecond, func() error {
|
_ = runWithTimeout(250*time.Millisecond, func() error {
|
||||||
|
|||||||
@ -5,8 +5,10 @@ This directory contains examples of how to use the Syft API.
|
|||||||
- `create_simple_sbom`: Create a simple SBOM from scratch
|
- `create_simple_sbom`: Create a simple SBOM from scratch
|
||||||
- `create_custom_sbom`: Create an SBOM using as much custom configuration as possible, including a custom cataloger implementation
|
- `create_custom_sbom`: Create an SBOM using as much custom configuration as possible, including a custom cataloger implementation
|
||||||
- `decode_sbom`: Take an existing SBOM file (of arbitrary format) and decode it into a Syft SBOM object
|
- `decode_sbom`: Take an existing SBOM file (of arbitrary format) and decode it into a Syft SBOM object
|
||||||
|
- `select_catalogers`: Example demonstrating how to select specific catalogers to run
|
||||||
- `source_detection`: Shows how to detect what to catalog automatically from a user string (e.g. container image vs directory)
|
- `source_detection`: Shows how to detect what to catalog automatically from a user string (e.g. container image vs directory)
|
||||||
- `source_from_image`: Construct a source from a only a container image
|
- `source_from_image`: Construct a source from only a container image
|
||||||
|
- `source_from_registry`: Construct a source directly from a container registry
|
||||||
|
|
||||||
You can run any of these examples from this directory with:
|
You can run any of these examples from this directory with:
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ func parseDotnetPackagesLock(_ context.Context, _ file.Resolver, _ *generic.Envi
|
|||||||
for depNameVersion, dep := range allDependencies {
|
for depNameVersion, dep := range allDependencies {
|
||||||
parentPkg, ok := pkgMap[depNameVersion]
|
parentPkg, ok := pkgMap[depNameVersion]
|
||||||
if !ok {
|
if !ok {
|
||||||
log.Debugf("package \"%s\" not found in map of all pacakges", depNameVersion)
|
log.Debugf("package \"%s\" not found in map of all packages", depNameVersion)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user