-
Notifications
You must be signed in to change notification settings - Fork 154
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
Process Restic stats output #263
Conversation
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.
Good to merge after minor update.
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 avoid recompiling the expressions in the while loops - it's a relatively expensive computation
|
||
// SnapshotStatsModeFromStatsLog gets the Stats mode from Stats Command log | ||
func SnapshotStatsModeFromStatsLog(output string) string { | ||
logs := regexp.MustCompile("[\n]").Split(output, -1) |
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.
Any reason you didn't use https://golang.org/pkg/strings/#Split ?
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.
Was trying to be consistent with other funcs in same file.
Change Overview
Process Restic stats output to get file count and size
Pull request type
Please check the type of change your PR introduces:
Issues
Test Plan