modify name

This commit is contained in:
MaysWind
2020-11-08 20:01:35 +08:00
parent 69798b88df
commit 234b5a7465
3 changed files with 17 additions and 17 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ const (
NORMAL_SUBCATEGORY_TOKEN = 2
NORMAL_SUBCATEGORY_TWOFACTOR = 3
NORMAL_SUBCATEGORY_ACCOUNT = 4
NORMAL_SUBCATEGORY_JOURNAL = 5
NORMAL_SUBCATEGORY_TRANSACTION = 5
NORMAL_SUBCATEGORY_CATEGORY = 6
NORMAL_SUBCATEGORY_TAG = 7
)
@@ -73,6 +73,6 @@ func Or(err error, defaultErr *Error) *Error {
}
func IsCustomError(err error) bool {
_, ok := err.(*Error);
_, ok := err.(*Error)
return ok
}
+2 -2
View File
@@ -14,7 +14,7 @@ import (
func TestGenerateUuid(t *testing.T) {
expectedUnixTime := time.Now().Unix()
expectedUuidServerId := uint8(90)
expectedUuidType := UUID_TYPE_JOURNAL
expectedUuidType := UUID_TYPE_TRANSACTION
generator, _ := NewInternalUuidGenerator(&settings.Config{UuidServerId: expectedUuidServerId})
uuid := generator.GenerateUuid(expectedUuidType)
@@ -48,7 +48,7 @@ func TestGenerateUuid_MultiType(t *testing.T) {
actualSeqId = uuidInfo.SequentialId
assert.Equal(t, uint32(expectedSeqId), actualSeqId)
uuid = generator.GenerateUuid(UUID_TYPE_JOURNAL)
uuid = generator.GenerateUuid(UUID_TYPE_TRANSACTION)
uuidInfo = generator.ParseUuidInfo(uuid)
actualSeqId = uuidInfo.SequentialId
assert.Equal(t, uint32(expectedSeqId), actualSeqId)
+1 -1
View File
@@ -6,7 +6,7 @@ const (
UUID_TYPE_DEFAULT UuidType = 0
UUID_TYPE_USER UuidType = 1
UUID_TYPE_ACCOUNT UuidType = 2
UUID_TYPE_JOURNAL UuidType = 3
UUID_TYPE_TRANSACTION UuidType = 3
UUID_TYPE_CATEGORY UuidType = 4
UUID_TYPE_TAG UuidType = 5
)