helpers

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cat

func Cat(filePath string)

func CreateConfigFile

func CreateConfigFile(homePath string)

func ExecuteJsonPath

func ExecuteJsonPath(data interface{}, jsonPathTemplate string)

func Exists

func Exists(path string) (bool, error)

func ExtractLabel

func ExtractLabel(_labels map[string]string, _label string) string

func ExtractLabels

func ExtractLabels(_labels map[string]string) string

func FormatDiffTime

func FormatDiffTime(diff time.Duration) string

func GetAge

func GetAge(resourcefilePath string, resourceCreationTimeStamp v1.Time) string

func GetData

func GetData(data [][]string, allNamespacesFlag bool, showLabels bool, labels string, outputFlag string, column int32, _list []string) [][]string

func GetJsonTemplate

func GetJsonTemplate(outputStringVar string) string

func IsDirectory

func IsDirectory(path string) (bool, error)

func MatchLabels added in v1.3.0

func MatchLabels(labels string, selector string) bool

func PrintOutput

func PrintOutput(resource interface{}, columns int16, outputFlag string, resourceName string, allNamespacesFlag bool, showLabels bool, _headers []string, data [][]string, jsonPathTemplate string) bool

func PrintTable

func PrintTable(headers []string, data [][]string)

func RandString

func RandString(length int) string

func ReadYaml

func ReadYaml(YamlPath string) []byte

doing this because of a bug who append three characthers to the first node yaml file

func StringInSlice added in v1.3.0

func StringInSlice(a string, list []string) bool

func StringWithCharset

func StringWithCharset(length int, charset string) string

FUNCS

Types

type Contexts

type Contexts []types.Context

TYPES

Jump to

Keyboard shortcuts

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