utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandString

func RandString(n int) string

func RenderTemplate

func RenderTemplate(input string, data interface{}) (string, error)

func Retry

func Retry(logger *Logger, fn func() error) error

func RetrySlow

func RetrySlow(logger *Logger, fn func() error) error

func YamlSplit

func YamlSplit(yamlBytes []byte) ([][]byte, error)

func YamlSplitMany

func YamlSplitMany(yamlBytes ...[]byte) ([][]byte, error)

Types

type Logger

type Logger struct {
	Debug *log.Logger
	Info  *log.Logger
	Warn  *log.Logger
	Error *log.Logger
}

func NewLogger

func NewLogger(withDebug bool) Logger

Jump to

Keyboard shortcuts

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