feat:add bs query snapshot#2943
Conversation
|
cicheck |
2 similar comments
|
cicheck |
|
cicheck |
| row[cobrautil.ROW_STATUS] = fmt.Sprintf("%d", item.Status) | ||
| row[cobrautil.ROW_SNAPSHOT_SEQNUM] = fmt.Sprintf("%d", item.SeqNum) | ||
| row[cobrautil.ROW_FILE_LENGTH] = fmt.Sprintf("%d", item.FileLength) | ||
| row[cobrautil.ROW_PROGRESS] = fmt.Sprintf("%v", item.Progress) | ||
| row[cobrautil.ROW_CREATE_TIME] = time.Unix(int64(item.Time/1000000), 0).Format("2006-01-02 15:04:05") |
There was a problem hiding this comment.
convert int to string has better method?
|
cicheck |
|
cicheck |
13 similar comments
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
1 similar comment
|
cicheck |
|
cicheck |
1 similar comment
|
cicheck |
|
cicheck |
14 similar comments
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
cicheck |
|
|
||
| ```shell | ||
| curve bs query snapshot --path /test/test111 --snapshotstatus done | ||
| (other status: "in-progess" "deleting" "errorDeleteing" "canceling" "error") |
There was a problem hiding this comment.
Maybe ## is better than ().
There was a problem hiding this comment.
Thanks for your comment, but I don't understand the ##, any example?
There was a problem hiding this comment.
for example,
curve bs query snapshot --path /test/test111 --snapshotstatus done # other status: "in-progess" "deleting" "errorDeleteing" "canceling" "error"There was a problem hiding this comment.
It looks like done is a keyword in shell, is that a problem?
There was a problem hiding this comment.
It seems to be fine in the tests, and done should work only with for or while etc.
|
|
||
| const ( | ||
| snapshotExample = `$ curve bs query snapshot --path /test/test111 --snapshotstatus done | ||
| (other status: "in-progress" "deleting" "errorDeleteing" "canceling" "error")` |
There was a problem hiding this comment.
ditto. And extra space will be shown if call help.
There was a problem hiding this comment.
PTAL, thanks@montaguelhz
|
cicheck |
2 similar comments
|
cicheck |
|
cicheck |
|
|
||
| const ( | ||
| snapshotExample = `$ curve bs query snapshot --path /test/test111 --snapshotstatus done | ||
| (other status: "in-progress" "deleting" "errorDeleteing" "canceling" "error")` |
There was a problem hiding this comment.
Sorry, maybe I didn't make myself clear, please keep the README and the example consistent, all use #. this is the last suggestion.
There was a problem hiding this comment.
Understand, that has been corrected.
Signed-off-by: ZackSoul <2269713951@qq.com>
|
cicheck |
2 similar comments
|
cicheck |
|
cicheck |
|
cicheck |
1 similar comment
|
cicheck |
|
@caoxianfei1 it can be merged. |

What problem does this PR solve?
Issue Number: #2582
Problem Summary:
What is changed and how it works?
add curve bs query snapshot
What's Changed:
How it Works:

Side effects(Breaking backward compatibility? Performance regression?):
Check List