utils

package
v0.0.0-...-d7aa82b Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendToFile

func AppendToFile(file string, text string, args ...any) error

func BackupFile

func BackupFile(file string) string

func CopyEmbedderFolderToTempDir

func CopyEmbedderFolderToTempDir(embedFolder embed.FS, folderName string) (string, error)

func FileContains

func FileContains(file string, text string) bool

func GetLogger

func GetLogger(debug bool) *logrus.Logger

func PrettyPrint

func PrettyPrint(logger *logrus.Logger, message string, obj any)

func ReplaceInFile

func ReplaceInFile(file string, original string, replacement string)

func RunCommand

func RunCommand(logger *logrus.Logger, name string, options ...string) error

func RunCommandAndLog

func RunCommandAndLog(logger *logrus.Logger, name string, options ...string) error

func SystemNameForSA

func SystemNameForSA(namespace string, serviceAccount string) string

Types

type ResponseStatus

type ResponseStatus int64
const (
	Ok ResponseStatus = iota
	Failed
)

func (ResponseStatus) String

func (s ResponseStatus) String() string

Jump to

Keyboard shortcuts

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