utils

package
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package utils contains miscellaneous utility code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExpandAndVerifyExists

func ExpandAndVerifyExists(filePath string, description string) (string, error)

ExpandAndVerifyExists Expand relative path to absolute, and make sure it exists. This is necessary for many arguments because Helmfile assumes paths are relative to helmfile.yaml and we want them to be relative to CWD.

func FileExists added in v0.0.29

func FileExists(file string) (bool, error)

FileExists returns true if the file exists, false otherwise, and an error if an error occurs

func Interactive added in v0.0.29

func Interactive() bool

Interactive returns true if Thelma is running in an interactive shell, false otherwise. Useful for detecting if Thelma is running in CI pipelines or on a dev laptop

func IsIPV4Address added in v0.0.24

func IsIPV4Address(addr string) bool

IsIPV4Address returns true if addr is a valid ipv4 address

func Nullable added in v0.0.63

func Nullable[T any](val T) *T

Nullable is a utility to turn a value into a pointer to that value

func QuoteJoin added in v0.0.24

func QuoteJoin(strs []string) string

QuoteJoin quotes all strings in a slice and joins them with `, ` eg. QuoteJoin([]string{`a`, `b`, `c`}, `, `) -> `"a", "b", "c"`

Types

This section is empty.

Directories

Path Synopsis
Package pool contains a generic implementation of the worker pool pattern for concurrent processing
Package pool contains a generic implementation of the worker pool pattern for concurrent processing

Jump to

Keyboard shortcuts

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