refactor: remove deprecated errors package

- Replace errors.Wrap with fmt.Errorf and %w verb
This commit is contained in:
GLEF1X
2024-07-30 05:22:45 -04:00
parent 18aac6508b
commit 273fd6c98f
3 changed files with 1 additions and 4 deletions

View File

@@ -12,7 +12,6 @@ import (
"github.com/Infisical/infisical-merge/packages/models"
"github.com/Infisical/infisical-merge/packages/util"
"github.com/pkg/errors"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
@@ -234,7 +233,7 @@ func formatAsYaml(envs []models.SingleEnvironmentVariable) (string, error) {
yamlBytes, err := yaml.Marshal(m)
if err != nil {
return "", errors.Wrap(err, "unable to format env variables as yaml")
return "", fmt.Errorf("failed to format environment variables as YAML: %w", err)
}
return string(yamlBytes), nil