helper

package
v1.8.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultImageTag string = "latest"
	ImageSeparator  string = ":"
)

Variables

This section is empty.

Functions

func AddFileExtension

func AddFileExtension(filename, outputType string) string

func FormatImage

func FormatImage(image string) string

FormatImage set default image tag if not provided

func GetComponentType added in v1.8.3

func GetComponentType(props *[]cyclonedx.Property) *string

GetComponentType returns the type of a component.

func IsFileExists

func IsFileExists(path string) (bool, error)

IsFileExists checks if a file exists and is valid.

func SaveToFile

func SaveToFile(data interface{}, path, format string) error

func SplitCpe added in v1.8.3

func SplitCpe(cpe string) []string

SplitCpe splits a CPE string into its parts.

func ToJSON

func ToJSON(t interface{}) ([]byte, error)

func ToXML

func ToXML(data interface{}) ([]byte, error)

func ToYAML

func ToYAML(t interface{}) ([]byte, error)

func WriteFile

func WriteFile(data []byte, path string) error

WriteFile writes data to a file.

func WriteYAML

func WriteYAML(t interface{}, path string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL