From 372d10a3e1ea01f8d03e44e6ab8be673d05c0773 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Tue, 13 Feb 2024 02:14:35 +0700 Subject: all: move example to root directory The goal is to remove duplicate code in testing and show the example on how to create Gorankusu service from godoc. Implements: https://todo.sr.ht/~shulhan/gorankusu/5 --- http_server_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'http_server_test.go') diff --git a/http_server_test.go b/http_server_test.go index 28b3086..8b08c46 100644 --- a/http_server_test.go +++ b/http_server_test.go @@ -111,12 +111,9 @@ func dummyGorankusuServe(t *testing.T, reqparams httpRequestParams) (rawResp []b body.Write(reqparams.body) - var httpreq = httptest.NewRequest( - reqparams.method, - reqparams.path, - &body) + var httpreq = httptest.NewRequest(reqparams.method, reqparams.path, &body) - dummyGorankusu.Httpd.ServeHTTP(recorder, httpreq) + exGorankusu.Httpd.ServeHTTP(recorder, httpreq) var ( httpres = recorder.Result() -- cgit v1.3-5-g9baa