utils

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheDir

func CacheDir() string

CacheDir returns the directory used for caching

func CopyFile added in v0.3.0

func CopyFile(src, dst string) (int64, error)

CopyFile copies the file content from scr to dst

func DefaultCacheDir

func DefaultCacheDir() string

DefaultCacheDir returns/creates the cache-dir to be used for trivu operations

func FileWalk

func FileWalk(root string, targetFiles map[string]struct{}, walkFn func(r io.Reader, path string) error) error

FileWalk walks the directory and performs operations on files defined by walkFn

func FilterTargets

func FilterTargets(prefixPath string, targets map[string]struct{}) (map[string]struct{}, error)

FilterTargets filters the target based on prefixPath

func SetCacheDir

func SetCacheDir(dir string)

SetCacheDir sets the trivy cacheDir

func StringInSlice

func StringInSlice(a string, list []string) bool

StringInSlice checks if strings exist in list of strings

Types

This section is empty.

Jump to

Keyboard shortcuts

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