util

package
v0.84.1 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppName

func AppName(name string) string

func Append added in v0.78.1

func Append[T any](target []T, src []T) []T

Append appends elements in src to target. We have this function because of how the builtin append() function works. It treats target nil slices the same as empty slices.

func EstimateNumberOfLines added in v0.69.2

func EstimateNumberOfLines(text string) int

func HomeDir

func HomeDir() string

func IsInCluster added in v0.79.0

func IsInCluster() bool

IsInCluster returns true if the code is running within a process inside a kubernetes pod

func IsURL

func IsURL(str string) bool

func RenderTemplate added in v0.81.0

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

RenderTemplate renders a template and returns the result as a string

func SplitYAML

func SplitYAML(doc string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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