Skip to content

Commit

Permalink
fix(domains): replace errgo with errors
Browse files Browse the repository at this point in the history
  • Loading branch information
EtienneM committed Mar 5, 2024
1 parent 6aeca04 commit 0cd34f1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions domains/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"os"

"github.com/olekukonko/tablewriter"
"gopkg.in/errgo.v1"

"github.com/Scalingo/cli/config"
scalingo "github.com/Scalingo/go-scalingo/v6"
"github.com/Scalingo/go-utils/errors/v2"
)

var letsencryptStatusString = map[string]string{
Expand All @@ -23,11 +23,12 @@ var letsencryptStatusString = map[string]string{
func List(ctx context.Context, app string) error {
c, err := config.ScalingoClient(ctx)
if err != nil {
return errgo.Notef(err, "fail to get Scalingo client")
return errors.Wrapf(ctx, err, "get Scalingo client to list domains")
}

domains, err := c.DomainsList(ctx, app)
if err != nil {
return errgo.Mask(err)
return errors.Wrapf(ctx, err, "list domains")
}

t := tablewriter.NewWriter(os.Stdout)
Expand Down

0 comments on commit 0cd34f1

Please sign in to comment.