Skip to content

Commit

Permalink
fctx: fix comment with incorrect arguments order
Browse files Browse the repository at this point in the history
  • Loading branch information
the-goodies authored and Southclaws committed Jul 3, 2023
1 parent 4ecc121 commit f02308e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fctx/fctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@ func WithMeta(ctx context.Context, kv ...string) context.Context {
//
// user, err := database.GetUser(ctx, userID)
// if err != nil {
// return nil, fctx.Wrap(ctx, err, "role", "admin")
// return nil, fctx.Wrap(err, ctx, "role", "admin")
// }
//
// This library aims to be simple so there is no stack trace collection or
// additional message parameter. If you need this functionality, use pkg/errors.
//
// user, err := database.GetUser(ctx, userID)
// if err != nil {
// return nil, fctx.Wrap(ctx,
// errors.Wrap(err, "failed to get user data"),
// return nil, fctx.Wrap(errors.Wrap(err, "failed to get user data"),
// ctx,
// "role", "admin")
// }
func Wrap(err error, ctx context.Context, kv ...string) error {
Expand Down

0 comments on commit f02308e

Please sign in to comment.