util

package
v4.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2020 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AskForConfirmation

func AskForConfirmation(NoPrompt bool, msg string) bool

AskForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user. Typically, you should use fmt to print out a question before calling AskForConfirmation. E.g. fmt.Println("WARNING: Are you sure? (yes/no)")

func IsValidForResourceName

func IsValidForResourceName(target string) bool

validates whether a string meets requirements for a valid resource name for kubernetes. It can consist of lowercase alphanumeric characters, '-' and '.', per

https://kubernetes.io/docs/concepts/overview/working-with-objects/names/

func Lpad

func Lpad(value, wid string) string

func Rpad

func Rpad(value, pad string, plen int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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