util

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ParserNames = []string{
	"apk",
	"deb",
	"java",
	"npm",
	"pnpm",
	"php",
	"python",
	"gem",
	"rpm",
	"dart",
	"nuget",
	"go",
	"rust-crate",
	"conan",
	"hackage",
	"pod",
	"hex",
	"portage",
	"alpm",
	"gradle",
	"nix",
}

ParserNames slice of supported parser names

Functions

func CleanUp

func CleanUp(path string)

CleanUp clears temp files

func FormatLockKeyVal

func FormatLockKeyVal(kv string) string

FormatLockKeyVal formats .lock Key Value Data String

func IndexOf

func IndexOf(array []string, s string) int

IndexOf returns index of a string from a slice

func ParserEnabled

func ParserEnabled(parser string, enabledParsers *[]string) bool

ParserEnabled checks if all or a specific parser is enabled

func SplitContentsByEmptyLine added in v1.5.0

func SplitContentsByEmptyLine(contents string) []string

func StringSliceContains

func StringSliceContains(s []string, e string) bool

StringSliceContains checks if a string slice contains specified string

func ToTitle added in v1.5.0

func ToTitle(str string) string

func TrimUntilLayer

func TrimUntilLayer(location model.Location) string

TrimUntilLayer Returns file path without layer hash

Types

This section is empty.

Jump to

Keyboard shortcuts

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