aboutsummaryrefslogtreecommitdiff
path: root/example.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-02-16 00:40:17 +0700
committerShulhan <ms@kilabit.info>2024-02-16 01:38:51 +0700
commita79914376206191870fbd19992de32dd60daad0b (patch)
tree5ca7ed2db54bb799da2d119a29f6989f706ab887 /example.go
parent2deaf8c4cc0f941e9c0f2c9fc079d86c1d6a8d61 (diff)
downloadgorankusu-a79914376206191870fbd19992de32dd60daad0b.tar.xz
all: change the signature of default request/response dumper
Instead of function that use the signature of HTTPRequestDumper/ HTTPResponseDumper; change it to function that _return_ HTTPRequestDumper/ HTTPResponseDumper. In this way, the documentation can show the clear relation between function and its type.
Diffstat (limited to 'example.go')
-rw-r--r--example.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/example.go b/example.go
index 5a34632..73c97f3 100644
--- a/example.go
+++ b/example.go
@@ -699,10 +699,10 @@ func (ex *Example) runWebSocketGet(rr *RunRequest) (res interface{}, err error)
func requestDumperWithoutDate(req *http.Request) ([]byte, error) {
req.Header.Del(libhttp.HeaderDate)
- return DumpHTTPRequest(req)
+ return DefaultRequestDumper()(req)
}
func responseDumperWithoutDate(resp *http.Response) ([]byte, error) {
resp.Header.Del(libhttp.HeaderDate)
- return DumpHTTPResponse(resp)
+ return DefaultResponseDumper()(resp)
}