utils

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultResourceReadyWaitTimeoutMin   = 3
	DefaultResourceReadyCheckIntervalSec = 3
)

Variables

This section is empty.

Functions

func BoolPtr

func BoolPtr(val bool) *bool

func Contains

func Contains[E comparable](s []E, v E) bool

Contains reports whether v is present in s.

func GetVulnerabilityTotalsPerSeverity

func GetVulnerabilityTotalsPerSeverity(vulnerabilities *[]models.Vulnerability) *models.VulnerabilityScanSummary

func Index

func Index[E comparable](s []E, v E) int

Index returns the index of the first occurrence of v in s, or -1 if not present.

func PointerTo

func PointerTo[T any](value T) *T

func RunCommand

func RunCommand(cmd *exec.Cmd) ([]byte, error)

func StringKeyMapToArray

func StringKeyMapToArray[T any](m map[string]T) []T

func StringPtr

func StringPtr(val string) *string

Types

type CmdRunError

type CmdRunError struct {
	Cmd    *exec.Cmd
	Err    error
	Stdout []byte
	Stderr string
}

func (CmdRunError) Error

func (r CmdRunError) Error() string

Jump to

Keyboard shortcuts

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