From 3b212908a53f3c6554aafec08478a5ef1abfc6c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 22 May 2021 00:36:43 +0100 Subject: [PATCH] utils: Change Enum to int32 --- utils/json/enum/enum.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/json/enum/enum.go b/utils/json/enum/enum.go index 3efc74a..475d115 100644 --- a/utils/json/enum/enum.go +++ b/utils/json/enum/enum.go @@ -6,11 +6,11 @@ import "strconv" // It should never be used as a value, as it won't get serialized as such. const Null = -1 -// Enum is a nullable version of a uint8. +// Enum is a nullable version of a uint32. // Enum values should only consist of positive values, as negative values are reserved for internal constants, such as // Null. -// This also mean that only 7 of the 8 Bit will be available for storage. -type Enum int8 +// This also means that only 31 of the 32 bits will be available for storage. +type Enum int32 // Int8ToJSON converts the passed Enum to a byte slice with it's JSON representation. func ToJSON(i Enum) []byte {