Skip to content

Conversation

@jhoward-lm
Copy link
Contributor

Import command

Description

Add import sub command that stores SBOM data from stdin or a file on the local filesystem.

Import SBOM file(s) from stdin or local filesystem

Usage:
  bomctl import [flags] { - | FILE...}

Flags:
  -h, --help   help for import

Global Flags:
      --cache-dir string   cache directory [defaults:
                                Unix:    $HOME/.cache/bomctl
                                Darwin:  $HOME/Library/Caches/bomctl
                                Windows: %LocalAppData%\bomctl]
      --config string      config file [defaults:
                                Unix:    $HOME/.config/bomctl/bomctl.yaml
                                Darwin:  $HOME/Library/Application Support/bomctl/bomctl.yml
                                Windows: %AppData%\bomctl\bomctl.yml]
  -v, --verbose count      Enable debug output

Miscellaneous

  • Refactor to extract CacheDir, ConfigFile, Debug, and Logger options shared by all commands' options types into base Options type
  • Implement functional options pattern and builder patterns for setting options for commands and backend

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings

@jhoward-lm jhoward-lm self-assigned this Aug 1, 2024
@jhoward-lm jhoward-lm requested a review from a team as a code owner August 1, 2024 18:11
@idunbarh
Copy link
Member

idunbarh commented Aug 1, 2024

What are your thoughts on docs? I'm happy to help work on them separately.

Copy link
Member

@idunbarh idunbarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spent about 10 minutes playing with this new command. Looks good!

Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
Signed-off-by: Jonathan Howard <jonathan.w.howard@lmco.com>
@jhoward-lm jhoward-lm merged commit 381c9bf into main Aug 7, 2024
@jhoward-lm jhoward-lm deleted the import-command branch August 7, 2024 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants