Documentation
¶
Overview ¶
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ERROR_PREFIX = color.New(color.Bold, color.FgRed, color.ReverseVideo).Sprint(" ERROR ")
var InfoPrefix = color.New(color.Bold, color.FgWhite, color.ReverseVideo).Sprint(" INFO ")
InfoPrefix is a colored string for warning level log messages
var IsCI = !IsTTY || os.Getenv("CI") != "" || os.Getenv("BUILD_NUMBER") != "" || os.Getenv("TEAMCITY_VERSION") != ""
IsCI is true when we appear to be running in a non-interactive context.
var IsTTY = isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd())
IsTTY is true when stdout appears to be a tty
var WARNING_PREFIX = color.New(color.Bold, color.FgYellow, color.ReverseVideo).Sprint(" WARNING ")
Functions ¶
func BuildColoredUi ¶
func Rainbow ¶
Rainbow function returns a formated colorized string ready to print it to the shell/terminal
Adapted from go-rainbow Copyright (c) 2017 Raphael Amorim Source: https://github.com/raphamorim/go-rainbow SPDX-License-Identifier: MIT
Types ¶
type Spinner ¶
type Spinner struct {
// contains filtered or unexported fields
}
Spinner represents an indicator that an asynchronous operation is taking place.
For short operations, less than 4 seconds, display only the spinner with the Start and Stop methods. For longer operations, display intermediate progress events using the Events method.
func NewSpinner ¶
NewSpinner returns a spinner that outputs to w.