Remove github.com/pkg/errors with appropriate replacements (#3172)

* errors.Wrap* removal

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* remove errors.Errorf

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Remove remaining calls

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Few more errors

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

* Fix golint errors

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
This commit is contained in:
Sanket Sudake
2025-02-20 08:58:37 +05:30
committed by GitHub
parent 2fd44174ce
commit caffed92f4
113 changed files with 585 additions and 588 deletions
+2 -3
View File
@@ -19,7 +19,6 @@ package function
import (
"fmt"
"github.com/pkg/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"github.com/fission/fission/pkg/fission-cli/cliwrapper/cli"
@@ -38,12 +37,12 @@ func GetMeta(input cli.Input) error {
func (opts *GetMetaSubCommand) do(input cli.Input) error {
_, namespace, err := opts.GetResourceNamespace(input, flagkey.NamespaceFunction)
if err != nil {
return errors.Wrap(err, "error in getting meta function ")
return fmt.Errorf("error in getting meta function : %w", err)
}
fn, err := opts.Client().FissionClientSet.CoreV1().Functions(namespace).Get(input.Context(), input.String(flagkey.FnName), metav1.GetOptions{})
if err != nil {
return errors.Wrap(err, "error getting function")
return fmt.Errorf("error getting function: %w", err)
}
fmt.Printf("Name: %v\n", fn.ObjectMeta.Name)