diff --git a/client/client.go b/client/client.go index e6681b403..28fc2784b 100644 --- a/client/client.go +++ b/client/client.go @@ -36,8 +36,8 @@ import ( type status int const ( - deactivated status = 0 - activated status = 1 + deactivated status = iota + activated ) var ( diff --git a/pkg/document/internal_document.go b/pkg/document/internal_document.go index 3024db576..278fbfba7 100644 --- a/pkg/document/internal_document.go +++ b/pkg/document/internal_document.go @@ -31,11 +31,11 @@ type stateType int const ( // Detached means that the document is not attached to the client. // The actor of the ticket is created without being assigned. - Detached stateType = 0 + Detached stateType = iota // Attached means that this document is attached to the client. // The actor of the ticket is created with being assigned by the client. - Attached stateType = 1 + Attached ) // InternalDocument represents a document in MongoDB and contains logical clocks. diff --git a/pkg/document/json/primitive.go b/pkg/document/json/primitive.go index 7e8156e28..8fc1b3308 100644 --- a/pkg/document/json/primitive.go +++ b/pkg/document/json/primitive.go @@ -28,14 +28,14 @@ import ( type ValueType int const ( - Null ValueType = 0 - Boolean ValueType = 1 - Integer ValueType = 2 - Long ValueType = 3 - Double ValueType = 4 - String ValueType = 5 - Bytes ValueType = 6 - Date ValueType = 7 + Null ValueType = iota + Boolean + Integer + Long + Double + String + Bytes + Date ) // ValueFromBytes parses the given bytes into value.