From 5c146e7c5f73ac3204d0a0c9daa511f47d067ea7 Mon Sep 17 00:00:00 2001 From: Michael Sprauer Date: Wed, 27 Jul 2022 15:28:06 +0200 Subject: [PATCH] fix error in doc --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 36ee00e..da69e87 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ go get github.com/migueleliasweb/go-github-mock - Create mocks for successive calls for the same endpoint - Pagination support -- Mock error returns + - High level abstraction helps writing readabe unittests (see `mock.WithRequestMatch`) - Lower level abstraction for advanced uses (see `mock.WithRequestMatchHandler`) @@ -129,7 +129,7 @@ mockedHTTPClient := mock.NewMockedHTTPClient( mock.WithRequestMatchHandler( mock.GetUsersByUsername, http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - WriteError( + mock.WriteError( w, http.StatusInternalServerError, "github went belly up or something",