Documentation
¶
Overview ¶
Package tips provides utilities for displaying helpful tips to users during specific workflows. Tips are informational messages that can help users troubleshoot issues or learn about features.
Tips can be disabled globally using --no-tips or individually using --no-tip <tip-name>.
Index ¶
Constants ¶
const ( // DebuggingDocs is the tip that points users to the debugging documentation. DebuggingDocs = "debugging-docs" // WindowsSymlinkWarning is the tip that warns Windows users about symlinks. WindowsSymlinkWarning = "windows-symlink-warning" // WindowsSymlinkWarningMessage is the default message for the Windows symlink warning tip. WindowsSymlinkWarningMessage = "Windows users may encounter silent fallback behavior to provider copying " + "instead of symlinking in OpenTofu/Terraform. " + "See https://github.com/gruntwork-io/terragrunt/issues/5061 for more information." // WindowsSymlinkWarningOpenTofuMessage is the OpenTofu-specific message for the Windows symlink warning tip, // shown when the user is running OpenTofu >= 1.12.0. WindowsSymlinkWarningOpenTofuMessage = "Windows users may encounter silent fallback from symlinking to " + "copying for provider plugins. " + "Set TF_LOG=warn to check if OpenTofu is falling back to copying. " + "See https://github.com/gruntwork-io/terragrunt/issues/5061 for more information." )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InvalidTipNameError ¶
type InvalidTipNameError struct {
// contains filtered or unexported fields
}
InvalidTipNameError is an error that is returned when an invalid tip name is requested.
func NewInvalidTipNameError ¶
func NewInvalidTipNameError(requestedName string, allowedNames []string) *InvalidTipNameError
func (InvalidTipNameError) Error ¶
func (err InvalidTipNameError) Error() string
func (InvalidTipNameError) Is ¶
func (err InvalidTipNameError) Is(target error) bool
type Tip ¶
type Tip struct {
// Name is a unique identifier for the tip
Name string
// Message is the message to display when the tip is triggered
Message string
// OnceShow is a sync.Once to ensure the tip is only shown once per session
OnceShow sync.Once
// contains filtered or unexported fields
}
Tip represents a helpful tip displayed to users.
type Tips ¶
type Tips []*Tip
Tips is a collection of Tip pointers.
func NewTips ¶
func NewTips() Tips
NewTips returns a new Tips collection with all available tips.
Never remove any of these tips, as removing them will cause a breaking change for users using an invocation of `--no-tip` pointing to a non-existent tip.
e.g. `terragrunt run --no-tip=debugging-docs`
If you want to programmatically document that a tip should no longer be used after removing it from the codebase, just set `disabled` to `1` here for that tip.
func (Tips) DisableAll ¶
func (t Tips) DisableAll()
DisableAll disables all tips such that they aren't shown.
func (Tips) DisableTip ¶
DisableTip validates that the specified tip name is valid and disables this tip.