Maintain old error names for backwards compatibility

Signed-off-by: Mads Jensen <atombrella@users.noreply.github.com>
pull/31647/head
Mads Jensen 2 weeks ago
parent 314ee6db11
commit 00c6b47d99

@ -20,6 +20,11 @@ import (
"fmt"
)
// ErrNoTable exists due to compatibilty with API users
//
//nolint:errname
type ErrNoTable = NoTableError
// NoTableError indicates that a chart does not have a matching table.
type NoTableError struct {
Key string
@ -27,6 +32,11 @@ type NoTableError struct {
func (e NoTableError) Error() string { return fmt.Sprintf("%q is not a table", e.Key) }
// ErrNoValue exists due to compatibilty with API users
//
//nolint:errname
type ErrNoValue = NoValueError
// NoValueError indicates that Values does not contain a key with a value
type NoValueError struct {
Key string
@ -34,6 +44,11 @@ type NoValueError struct {
func (e NoValueError) Error() string { return fmt.Sprintf("%q is not a value", e.Key) }
// ErrInvalidChartName exists due to compatibilty with API users
//
//nolint:errname
type ErrInvalidChartName = InvalidChartNameError
type InvalidChartNameError struct {
Name string
}

@ -41,6 +41,9 @@ type Linter struct {
ChartDir string
}
//nolint:errname
type Message = LintMessageError
// Message describes an error encountered while linting.
type LintMessageError struct {
// Severity is one of the *Sev constants

@ -45,6 +45,8 @@ import (
"helm.sh/helm/v4/pkg/repo/v1"
)
type ErrRepoNotFound = RepoNotFoundError
// RepoNotFoundError indicates that chart repositories can't be found in local repo cache.
// The value of Repos is missing repos.
type RepoNotFoundError struct {

@ -550,7 +550,7 @@ func TestBuild_WithRepositoryAlias(t *testing.T) {
})
}
func TestErrRepoNotFound_Error(t *testing.T) {
func TestRepoNotFound_Error(t *testing.T) {
type fields struct {
Repos []string
}

Loading…
Cancel
Save