Something went wrong. Try again.
A command-line interface for tangled, the decentralized Git collaboration platform built on the AT Protocol. eric-wien.tngl.io/tng-cli
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455package cmdutil
import "errors"
// SilentError is an error that should not be printed to stderr.// The command's exit code will still be non-zero.type SilentError struct { Err error}
func (e *SilentError) Error() string { return e.Err.Error()}
func (e *SilentError) Silent() bool { return true}
func (e *SilentError) Unwrap() error { return e.Err}
// CancelError indicates the user cancelled an operation.type CancelError struct{}
func (e *CancelError) Error() string { return "operation cancelled"}
// AuthError indicates an authentication failure.type AuthError struct { Err error}
func (e *AuthError) Error() string { if e.Err != nil { return e.Err.Error() } return "authentication required: run 'tng auth login'"}
func (e *AuthError) Unwrap() error { return e.Err}
func IsAuthError(err error) bool { var ae *AuthError return errors.As(err, &ae)}
func IsCancelError(err error) bool { var ce *CancelError return errors.As(err, &ce)}