From 289a0f27c6e0f94fc10013c917f1a677fc769c6f Mon Sep 17 00:00:00 2001 From: papasavvas Date: Fri, 25 Mar 2022 14:50:32 +0100 Subject: [PATCH] Update documentation and replace the deprecated function Wrap with Augment --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1eab3a3..862c16e 100644 --- a/README.md +++ b/README.md @@ -11,10 +11,11 @@ Terrors is built and used at [Monzo](https://monzo.com/). ## Usage -Terrors can be used to wrap any object that satisfies the error interface: +Terrors can be used to add context to an existing error that satisfies the error interface: + ```go -terr := terrors.Wrap(err, map[string]string{"context": "my_context"}) +terr := terrors.Augment(err, "Message", map[string]string{"context": "my_context"}) ``` Terrors can be instantiated directly: