Maintain old error names for backwards compatibility

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

@ -20,6 +20,11 @@ import (
"fmt" "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. // NoTableError indicates that a chart does not have a matching table.
type NoTableError struct { type NoTableError struct {
Key string Key string
@ -27,6 +32,11 @@ type NoTableError struct {
func (e NoTableError) Error() string { return fmt.Sprintf("%q is not a table", e.Key) } 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 // NoValueError indicates that Values does not contain a key with a value
type NoValueError struct { type NoValueError struct {
Key string Key string
@ -34,6 +44,11 @@ type NoValueError struct {
func (e NoValueError) Error() string { return fmt.Sprintf("%q is not a value", e.Key) } 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 { type InvalidChartNameError struct {
Name string Name string
} }

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

@ -45,6 +45,8 @@ import (
"helm.sh/helm/v4/pkg/repo/v1" "helm.sh/helm/v4/pkg/repo/v1"
) )
type ErrRepoNotFound = RepoNotFoundError
// RepoNotFoundError indicates that chart repositories can't be found in local repo cache. // RepoNotFoundError indicates that chart repositories can't be found in local repo cache.
// The value of Repos is missing repos. // The value of Repos is missing repos.
type RepoNotFoundError struct { 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 { type fields struct {
Repos []string Repos []string
} }

Loading…
Cancel
Save