eiamutil

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 24 Imported by: 0 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

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

Contains checks if val is an item in the values slice.

func DownloadAndExtract added in v0.0.16

func DownloadAndExtract(url, tmpDir, token string) error

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 GetLatestRelease added in v0.0.16

func GetLatestRelease(repoOwner, repoName, token string) (*github.RepositoryRelease, error)

func GetReleaseDownloadURL added in v0.0.16

func GetReleaseDownloadURL(r *github.RepositoryRelease, isPlugin bool) (string, error)

func MoveFile added in v0.0.16

func MoveFile(src, dst string) error

func NewJSONFormatter

func NewJSONFormatter() *logrus.JSONFormatter

NewJSONFormatter creates a new JSONFormatter logrus instance.

func NewLogger

func NewLogger() *logrus.Logger

NewLogger instantiates a new logging instance.

func NewRuntimeFormatter

func NewRuntimeFormatter() *rt.Formatter

NewRuntimeFormatter creates a new logrus formatter that contains extra debugging information.

func NewTextFormatter

func NewTextFormatter() *logrus.TextFormatter

NewTextFormatter creates a new TextFormatter logrus instance.

func SelectToken added in v0.0.17

func SelectToken(tokenConfig map[string]string) (string, error)

SelectToken prompts the user to select an existing Github personal access token.

func Uniq

func Uniq(a []string) []string

Uniq removes duplicate items from the input slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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