Documentation ¶
Index ¶
- Variables
- func Confirm(vals map[string]string)
- func Contains(values []string, val string) bool
- func DownloadAndExtract(url, tmpDir, token string) error
- func ExtractUnknownArgs(flags *pflag.FlagSet, args []string) []string
- func FormatReason(reason *string) error
- func GetLatestRelease(repoOwner, repoName, token string) (*github.RepositoryRelease, error)
- func GetReleaseDownloadURL(r *github.RepositoryRelease, isPlugin bool) (string, error)
- func MoveFile(src, dst string) error
- func NewJSONFormatter() *logrus.JSONFormatter
- func NewLogger() *logrus.Logger
- func NewRuntimeFormatter() *rt.Formatter
- func NewTextFormatter() *logrus.TextFormatter
- func SelectToken(tokenConfig map[string]string) (string, error)
- func Uniq(a []string) []string
Constants ¶
This section is empty.
Variables ¶
var Logger *logrus.Logger
Logger is the global logging instance.
Functions ¶
func DownloadAndExtract ¶ added in v0.0.16
func ExtractUnknownArgs ¶
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 ¶
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 NewJSONFormatter ¶
func NewJSONFormatter() *logrus.JSONFormatter
NewJSONFormatter creates a new JSONFormatter logrus instance.
func NewRuntimeFormatter ¶
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
SelectToken prompts the user to select an existing Github personal access token.
Types ¶
This section is empty.