diff options
| author | Shulhan <ms@kilabit.info> | 2023-11-22 03:23:46 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-11-22 13:01:49 +0700 |
| commit | b6f055e1a1612a99cba3fd11a1060b41a730ec91 (patch) | |
| tree | 4b241891d1f773785016e8dc14f6614ec7d55fef | |
| parent | f71065d116172550f2ebd99ce3fe77ffcaf37b31 (diff) | |
| download | pakakeh.go-b6f055e1a1612a99cba3fd11a1060b41a730ec91.tar.xz | |
lib/http: update comment on Callback type
| -rw-r--r-- | lib/http/callback.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/http/callback.go b/lib/http/callback.go index 6fbe4a4a..dc44c80c 100644 --- a/lib/http/callback.go +++ b/lib/http/callback.go @@ -7,14 +7,14 @@ package http // Callback define a type of function for handling registered handler. // // The function will have the query URL, request multipart form data, -// and request body ready to be used in EndpointRequest.HttpRequest and -// EndpointRequest.RequestBody fields. +// and request body ready to be used in [EndpointRequest.HttpRequest] and +// [EndpointRequest.RequestBody] fields. // -// The EndpointRequest.HttpWriter can be used to write custom header or to +// The [EndpointRequest.HttpWriter] can be used to write custom header or to // write cookies but should not be used to write response body. // // The error return type should be an instance of *errors.E, with E.Code // define the HTTP status code. -// If error is not nil and not *errors.E, server will response with -// internal-server-error status code. +// If error is not nil and not *[liberrors.E], server will response with +// [http.StatusInternalServerError] status code. type Callback func(req *EndpointRequest) (resBody []byte, err error) |
