diff --git a/result.go b/result.go index d427a6d..d6852b2 100644 --- a/result.go +++ b/result.go @@ -2,7 +2,6 @@ package models import ( "errors" - "git.sch9.ru/new_gate/ms-tester/internal/lib" ) type Result int32 @@ -10,12 +9,12 @@ type Result int32 const ( NotTested Result = 1 // change only with schema change Accepted Result = 2 - WrongAnswer Result = 3 - PresentationError Result = 4 + WrongAnswer Result = 3 + PresentationError Result = 4 CompilationError Result = 5 MemoryLimitExceeded Result = 6 TimeLimitExceeded Result = 7 - RuntimeError Result = 8 + RuntimeError Result = 8 SystemFailDuringTesting Result = 9 Testing Result = 10 ) @@ -27,5 +26,5 @@ func (result Result) Valid() error { case NotTested, Accepted, TimeLimitExceeded, MemoryLimitExceeded, CompilationError, SystemFailDuringTesting: return nil } - return lib.ServiceError(ErrBadResult, lib.ErrValidationFailed, "bad result") + return ErrBadResult } diff --git a/role.go b/role.go index a48cca8..d978058 100644 --- a/role.go +++ b/role.go @@ -2,7 +2,6 @@ package models import ( "errors" - "git.sch9.ru/new_gate/ms-tester/internal/lib" ) type Role int32 @@ -45,7 +44,7 @@ func (role Role) Valid() error { case RoleSpectator, RoleParticipant, RoleModerator, RoleAdmin: return nil } - return lib.ServiceError(ErrBadRole, lib.ErrValidationFailed, "bad role") + return ErrBadRole } func (role Role) AsPointer() *Role { diff --git a/testgroup.go b/testgroup.go index f102a0c..f48e587 100644 --- a/testgroup.go +++ b/testgroup.go @@ -2,7 +2,6 @@ package models import ( "errors" - "git.sch9.ru/new_gate/ms-tester/internal/lib" ) type TestingStrategy int32 @@ -30,5 +29,5 @@ func (ts TestingStrategy) Valid() error { case EachTestTS, CompleteGroupTS: return nil } - return lib.ServiceError(ErrBadTestingStrategy, lib.ErrValidationFailed, "bad testing strategy") + return ErrBadTestingStrategy }