From c43b0843874b8b3d2e7785626e0094b52586cee9 Mon Sep 17 00:00:00 2001 From: Michael Sprauer Date: Wed, 27 Jul 2022 15:28:56 +0200 Subject: [PATCH 1/2] 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", From 52b10a1cfc32776d2b2dd72a6b71b1a0265f38c0 Mon Sep 17 00:00:00 2001 From: Michael Sprauer Date: Wed, 27 Jul 2022 15:30:04 +0200 Subject: [PATCH 2/2] fix error in doc --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index da69e87..595102e 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`)