aboutsummaryrefslogtreecommitdiff
path: root/lib/http/endpoint_response_example_test.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2024-03-08 01:42:11 +0700
committerShulhan <ms@kilabit.info>2024-03-09 01:10:24 +0700
commit8007793b86bac3ca0bf937fe246deae5ac46a503 (patch)
treef9297531956f219223b56b5d6730690af64a428c /lib/http/endpoint_response_example_test.go
parent6653805a0949eafc4a478749842d61b12ef5916a (diff)
downloadpakakeh.go-8007793b86bac3ca0bf937fe246deae5ac46a503.tar.xz
lib/http: refactor of RegisterEndpoint and RegisterSSE to non-pointer
Once the endpoint registered, the caller should not able to changes any values on endpoint again.
Diffstat (limited to 'lib/http/endpoint_response_example_test.go')
-rw-r--r--lib/http/endpoint_response_example_test.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/http/endpoint_response_example_test.go b/lib/http/endpoint_response_example_test.go
index e9944edb..40e9d6d7 100644
--- a/lib/http/endpoint_response_example_test.go
+++ b/lib/http/endpoint_response_example_test.go
@@ -30,7 +30,7 @@ func ExampleEndpointResponse() {
// myData as JSON format.
// If the parameter "id" is missing or empty it will return an HTTP
// status code with message as defined in EndpointResponse.
- err = server.RegisterEndpoint(&Endpoint{
+ err = server.RegisterEndpoint(Endpoint{
Method: RequestMethodGet,
RequestType: RequestTypeQuery,
ResponseType: ResponseTypeJSON,