aboutsummaryrefslogtreecommitdiff
path: root/src/server/response.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-08-20 13:13:26 +0200
committerDaniel Gavin <danielgavin5@hotmail.com>2022-08-20 13:13:26 +0200
commitf6f2eb760d4b11630dc0719c8893383bed20cd9a (patch)
treef3738e1fa057671d182a7161f9ff02ffa7b56020 /src/server/response.odin
parent8e8360dba88feb0334a222e9f990250cf65f32bf (diff)
Finally make the move to use odinfmt in ols.
Diffstat (limited to 'src/server/response.odin')
-rw-r--r--src/server/response.odin9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/server/response.odin b/src/server/response.odin
index e42f9ae..d31b3cd 100644
--- a/src/server/response.odin
+++ b/src/server/response.odin
@@ -3,7 +3,10 @@ package server
import "core:fmt"
import "core:encoding/json"
-send_notification :: proc (notification: Notification, writer: ^Writer) -> bool {
+send_notification :: proc(
+ notification: Notification,
+ writer: ^Writer,
+) -> bool {
data, error := json.marshal(notification, {}, context.temp_allocator)
header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data))
@@ -23,7 +26,7 @@ send_notification :: proc (notification: Notification, writer: ^Writer) -> bool
return true
}
-send_response :: proc (response: ResponseMessage, writer: ^Writer) -> bool {
+send_response :: proc(response: ResponseMessage, writer: ^Writer) -> bool {
data, error := json.marshal(response, {}, context.temp_allocator)
header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data))
@@ -43,7 +46,7 @@ send_response :: proc (response: ResponseMessage, writer: ^Writer) -> bool {
return true
}
-send_error :: proc (response: ResponseMessageError, writer: ^Writer) -> bool {
+send_error :: proc(response: ResponseMessageError, writer: ^Writer) -> bool {
data, error := json.marshal(response, {}, context.temp_allocator)
header := fmt.tprintf("Content-Length: %v\r\n\r\n", len(data))