internal

package
v0.12.3 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package internal contains miscellaneous functions and objects useful within syft but should not be used externally.

Index

Constants

View Source
const (
	// ApplicationName is the non-capitalized name of the application (do not change this)
	ApplicationName = "syft"

	// JSONSchemaVersion is the current schema version output by the JSON presenter
	// This is roughly following the "SchemaVer" guidelines for versioning the JSON schema. Please see schema/json/README.md for details on how to increment.
	JSONSchemaVersion = "1.0.1"
)

Variables

This section is empty.

Functions

func MatchCaptureGroups added in v0.4.1

func MatchCaptureGroups(regEx *regexp.Regexp, str string) map[string]string

MatchCaptureGroups takes a regular expression and string and returns all of the named capture group results in a map.

func Tprintf

func Tprintf(tmpl string, data map[string]interface{}) string

Tprintf renders a string from a given template string and field values

Types

type StringSet

type StringSet map[string]struct{}

StringSet represents a set of string types.

func NewStringSet

func NewStringSet() StringSet

NewStringSet creates a new empty StringSet.

func NewStringSetFromSlice

func NewStringSetFromSlice(start []string) StringSet

NewStringSetFromSlice creates a StringSet populated with values from the given slice.

func (StringSet) Add

func (s StringSet) Add(i string)

Add a string to the set.

func (StringSet) Contains

func (s StringSet) Contains(i string) bool

Contains indicates if the given string is contained within the set.

func (StringSet) Remove

func (s StringSet) Remove(i string)

Remove a string from the set.

func (StringSet) ToSlice

func (s StringSet) ToSlice() []string

ToSlice returns a sorted slice of strings that are contained within the set.

Directories

Path Synopsis
nolint:dupl nolint: dupl
nolint:dupl nolint: dupl
Package bus provides access to a singleton instance of an event bus (provided by the calling application).
Package bus provides access to a singleton instance of an event bus (provided by the calling application).
Package log contains the singleton object and helper functions for facilitating logging within the syft library.
Package log contains the singleton object and helper functions for facilitating logging within the syft library.
Package logger contains implementations for the syft.logger.Logger interface.
Package logger contains implementations for the syft.logger.Logger interface.
ui
etui
Package etui provides an "ephemeral" terminal user interface to display the application state dynamically.
Package etui provides an "ephemeral" terminal user interface to display the application state dynamically.
Package version contains all build time metadata (version, build time, git commit, etc).
Package version contains all build time metadata (version, build time, git commit, etc).

Jump to

Keyboard shortcuts

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