init: ops-assistant codebase
This commit is contained in:
17
internal/core/ecode/codes.go
Normal file
17
internal/core/ecode/codes.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package ecode
|
||||
|
||||
const (
|
||||
ErrPermissionDenied = "ERR_PERMISSION_DENIED"
|
||||
ErrConfirmRequired = "ERR_CONFIRM_REQUIRED"
|
||||
ErrFeatureDisabled = "ERR_FEATURE_DISABLED"
|
||||
ErrStepFailed = "ERR_STEP_FAILED"
|
||||
ErrJobCancelled = "ERR_JOB_CANCELLED"
|
||||
ErrStepTimeout = "ERR_STEP_TIMEOUT"
|
||||
)
|
||||
|
||||
func Tag(code, msg string) string {
|
||||
if code == "" {
|
||||
return msg
|
||||
}
|
||||
return "[" + code + "] " + msg
|
||||
}
|
||||
Reference in New Issue
Block a user