From 2b5618714c5f1c31e04ad6aa53cc86725843a6d0 Mon Sep 17 00:00:00 2001 From: Matthias Fulz Date: Tue, 22 Oct 2019 15:36:14 +0200 Subject: [PATCH] Added type aliases for response values --- server.go | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/server.go b/server.go index 54e59af..bb31a05 100644 --- a/server.go +++ b/server.go @@ -4,22 +4,26 @@ import ( "sync" ) -const ( - AIN uint8 = 0 - AOUT uint8 = 1 - AINOUT uint8 = 2 -) +type argumentType uint8 const ( - OK uint8 = 0 - ERR uint8 = 1 + AIN argumentType = 0 + AOUT argumentType = 1 + AINOUT argumentType = 2 +) + +type responseStatus uint8 + +const ( + OK responseStatus = 0 + ERR responseStatus = 1 ) var RESPONSE_HEADER_SIZE = int32(9) type responseHeader struct { size int64 - status uint8 + status responseStatus } type Server struct {