eiamutil

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *logrus.Logger

Logger is the global logging instance

Functions

func Confirm

func Confirm(vals map[string]string)

Confirm asks the user for confirmation before running a command

func Contains

func Contains(values []string, val string) bool

func ExtractUnknownArgs

func ExtractUnknownArgs(flags *pflag.FlagSet, args []string) []string

ExtractUnknownArgs fetches unknown args passed to a command. This is used in the kubectl and gcloud commands to extract only the fields that should be used in the invoked command.

Modified from https://github.com/davidovich/summon/blob/master/cmd/run.go see https://github.com/spf13/pflag/pull/160 and https://github.com/spf13/cobra/issues/739 and https://github.com/spf13/pflag/pull/199

func FormatReason

func FormatReason(reason *string) error

FormatReason formats the reason field for logging visibility

func NewJSONFormatter

func NewJSONFormatter() *logrus.JSONFormatter

func NewLogger

func NewLogger() *logrus.Logger

NewLogger instantiates a new logging instance

func NewRuntimeFormatter

func NewRuntimeFormatter() *rt.Formatter

func NewTextFormatter

func NewTextFormatter() *logrus.TextFormatter

func Uniq

func Uniq(a []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