-
Notifications
You must be signed in to change notification settings - Fork 522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat]tools-v2: optimize bs delete volume xxx and define result code … #2777
Conversation
cicheck |
if err.TypeCode() != cmderror.CODE_SUCCESS { | ||
item["Result"] = "fail" | ||
item["Result"] = cobrautil.ROW_VALUE_FAILED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Result" Please define it as a constant
} | ||
item["Result"] = cobrautil.ROW_VALUE_SUCCESS | ||
rCmd.TableNew.Append([]string{item["User"], item["Src"], item["UUID"], item["File"], item["Result"]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please define it as a constant
item["Result"] = "success" | ||
payload := map[string]any{} | ||
if err := json.Unmarshal([]byte(result), &payload); err != nil { | ||
item["Result"] = cobrautil.ROW_VALUE_FAILED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
item["Result"] = cobrautil.ROW_VALUE_FAILED | ||
} else { | ||
if payload[cobrautil.ResultCode] != cobrautil.ResultSuccess { | ||
item["Result"] = cobrautil.ROW_VALUE_FAILED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto
…as constant Signed-off-by: baytan0720 <baytan2@hotmail.com>
cicheck |
2 similar comments
cicheck |
cicheck |
…as constant
What problem does this PR solve?
Issue Number: #xxx
Problem Summary:
optimize use sync.WaitGroup, define result status code as constant
What is changed and how it works?
What's Changed:
How it Works:
Side effects(Breaking backward compatibility? Performance regression?):
Check List