Documentation
¶
Index ¶
- Constants
- Variables
- func Bold(msg string) string
- func BoldBlue(msg string) string
- func Emoji(emoji string) string
- func ErrCode(err error) planetscale.ErrorCode
- func MalformedError(err error) error
- func OpenBrowser(goos, url string) *exec.Cmd
- func PrintProgress(message string) func()
- func RequiredArgs(reqArgs ...string) cobra.PositionalArgs
Constants ¶
View Source
const ApplicationURL = "https://app.planetscale.com"
Variables ¶
View Source
var IsTTY = isatty.IsTerminal(os.Stdout.Fd()) || isatty.IsCygwinTerminal(os.Stdout.Fd())
Functions ¶
func ErrCode ¶ added in v0.12.0
func ErrCode(err error) planetscale.ErrorCode
ErrCode returns the code from a *planetscale.Error, if available. If the error is not of type *planetscale.Error or is nil, it returns an empty, undefined error code.
func MalformedError ¶ added in v0.12.0
MalformedError checks whether the given err is an *planetscale.Error and returns a descriptive, human readable error if the error code is of type planetscale.ErrResponseMalformed. If the error doesn't match these requirements, err is returned unmodified.
func OpenBrowser ¶
OpenBrowser opens a web browser at the specified url.
func PrintProgress ¶
func PrintProgress(message string) func()
PrintProgress starts a spinner with the relevant message.
func RequiredArgs ¶ added in v0.3.1
func RequiredArgs(reqArgs ...string) cobra.PositionalArgs
RequiredArgs returns a short and actionable error message if the given required arguments are not available.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.