helper

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoolPointerOrBackup

func BoolPointerOrBackup(val *bool, backupValue bool) *bool

BoolPointerOrBackup returns the val attribute unless nil, else an pointer to the backupValue

func BoolToPointer

func BoolToPointer(val bool) *bool

BoolToPointer returns a given bool value as pointer

func CleanEmptyEntriesFromStringSlice

func CleanEmptyEntriesFromStringSlice(slice []string) []string

CleanEmptyEntriesFromStringSlice removes empty strings from specified slice

func CommandExecutionPathFromContext

func CommandExecutionPathFromContext(ctx context.Context) string

CommandExecutionPathFromContext returns the commandExecutionPath in ctx, if any

func FileExists

func FileExists(filename string) bool

FileExists checks if a file exists and is not a directory

func NewContextWithCommandExecutionPath

func NewContextWithCommandExecutionPath(ctx context.Context, path string) context.Context

NewContextWithCommandExecutionPath sets the given path argument as value into a new context.Context

func RemoveElementFromStringSlice

func RemoveElementFromStringSlice(slice []string, el int) []string

RemoveElementFromStringSlice removes an element at the specific index

func StringPointerOrBackup

func StringPointerOrBackup(val *string, backupValue string) *string

StringPointerOrBackup returns the val attribute unless nil, else an pointer to the backupValue

func StringSliceIncludesElement

func StringSliceIncludesElement(list []string, element string) bool

StringSliceIncludesElement checks if a given slice of String includes the specified element

func StringSliceWithValuesOrBackup

func StringSliceWithValuesOrBackup(list []string, backupValue []string) []string

StringSliceWithValuesOrBackup returns the list if not empty or the backup value

func StringToPointer

func StringToPointer(str string) *string

StringToPointer returns a given string as pointer

Types

This section is empty.

Jump to

Keyboard shortcuts

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