Documentation
¶
Index ¶
- func BuildEvalContext(variables map[string]cty.Value) *hcl.EvalContext
- func CollectVariables(flaggedVariables []string) (map[string]cty.Value, error)
- func ContainsDiagnostic(field string, value cty.Value, list []string) hcl.Diagnostics
- func DirectoryDiagnostic(field string, value cty.Value) hcl.Diagnostics
- func ExpandPath(path string) string
- func FileDiagnostic(field string, value cty.Value) hcl.Diagnostics
- func FileExists(path string) bool
- func IsInsideTmux() bool
- func IsInstalled() (bool, string)
- func JoinWithAnd(choices []string) string
- func JoinWithOr(choices []string) string
- func Prettier(values ...any)
- func ResolveProfilePath(profilePath string) (string, error)
- func WrongAttributeDiagnostic(field, have, want string) hcl.Diagnostic
- type DiagnosticsManager
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEvalContext ¶
func CollectVariables ¶
func ContainsDiagnostic ¶
func DirectoryDiagnostic ¶
func ExpandPath ¶
ExpandPath expands the given path. If the path starts with "~/", we replace it with the absolute path to the user's home directory.
func FileDiagnostic ¶
func FileExists ¶
func IsInsideTmux ¶
func IsInsideTmux() bool
IsInsideTmux checks if we are inside a tmux session. We assume we are in a tmux session when the `$TMUX` environment variable is set.
func IsInstalled ¶
IsInstalled returns true if tmux is installed on the system and also returns the path to the associated binary.
func JoinWithAnd ¶
func JoinWithOr ¶
func ResolveProfilePath ¶
func WrongAttributeDiagnostic ¶
func WrongAttributeDiagnostic(field, have, want string) hcl.Diagnostic
Types ¶
type DiagnosticsManager ¶
type DiagnosticsManager struct { Diagnostics hcl.Diagnostics DiagnosticWriter hcl.DiagnosticWriter }
func NewDiagnosticsManager ¶
func NewDiagnosticsManager(filePath string) *DiagnosticsManager
func (*DiagnosticsManager) Append ¶
func (dm *DiagnosticsManager) Append(diag *hcl.Diagnostic) hcl.Diagnostics
func (*DiagnosticsManager) Extend ¶
func (dm *DiagnosticsManager) Extend(diags hcl.Diagnostics) hcl.Diagnostics
func (*DiagnosticsManager) HasErrors ¶
func (dm *DiagnosticsManager) HasErrors() bool
func (*DiagnosticsManager) Write ¶
func (dm *DiagnosticsManager) Write() error
Click to show internal directories.
Click to hide internal directories.