Documentation ¶
Index ¶
- Constants
- func AppName(name string) string
- func Append[T any](target []T, src []T) []T
- func Dedup[T any](objs []T) []T
- func EstimateNumberOfLines(text string) int
- func HomeDir() string
- func IsInCluster() bool
- func IsRunningAsRoot() bool
- func IsURL(str string) bool
- func PromptYesNo(question string) bool
- func RenderTemplate(tpl string, data interface{}) (string, error)
- func SplitYAML(doc string) []string
Constants ¶
View Source
const HOST_COLLECTORS_RUN_AS_ROOT_PROMPT = "Some host collectors need to be run as root.\nDo you want to exit and rerun the command using sudo?"
Variables ¶
This section is empty.
Functions ¶
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 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 IsRunningAsRoot ¶ added in v0.85.0
func IsRunningAsRoot() bool
func PromptYesNo ¶ added in v0.85.0
func RenderTemplate ¶ added in v0.81.0
RenderTemplate renders a template and returns the result as a string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.