Documentation
¶
Overview ¶
Copyright 2026 YLD Limited SPDX-License-Identifier: Apache-2.0 Package cinzelerror provides structured error types and sentinel errors for the cinzel CLI. It wraps HCL diagnostic errors into standard Go errors and attaches "open issue" guidance to user-facing messages.
Index ¶
Constants ¶
const (
OpenIssue string = "if you think this is incorrect, consider opening an issue in https://www.github.com/yldio/cinzel/issues"
)
OpenIssue is the message appended to errors suggesting users file a bug report.
Variables ¶
var ( ErrWorkflowFilenameRequired = errWorkflowFilenameRequired() ErrOnlyHclFiles = errOnlyHclFiles() ErrOnRestriction = errOnRestriction() ErrSecretsRestriction = errSecretsRestriction() ErrWorkflowEmptyOn = errWorkflowEmptyOn() ErrOpenIssue = errOpenIssue() )
Sentinel errors for workflow and HCL validation.
Functions ¶
func ErrJobEmptySteps ¶
ErrJobEmptySteps returns an error indicating the job has no steps.
func ErrWorkflowEmptyJobs ¶
ErrWorkflowEmptyJobs returns an error indicating the workflow has no jobs.
func ProcessHCLDiags ¶
func ProcessHCLDiags(diags hcl.Diagnostics) error
ProcessHCLDiags converts HCL diagnostics into a single joined error.
Types ¶
type Error ¶
type Error struct {
Err error
}
Error wraps an underlying error with additional context and issue-reporting guidance.
func New ¶
New creates an Error from err and optional context messages, appending the OpenIssue text.
func NewFromResource ¶
NewFromResource creates an Error annotated with the resource type and identifier.