mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 18:30:16 +00:00
Add: shortuuid check, new date layout found
This commit is contained in:

committed by
Sveta Smirnova

parent
3eaf60bd88
commit
580ccb7428
@@ -17,6 +17,7 @@ import (
|
||||
var DateLayouts = []string{
|
||||
"2006-01-02T15:04:05.000000Z", // 5.7
|
||||
"2006-01-02T15:04:05.000000-07:00", // 5.7
|
||||
"2006-01-02T15:04:05Z", // found in some crashes
|
||||
"060102 15:04:05", // 5.5
|
||||
"2006-01-02 15:04:05", // 5.6
|
||||
"2006-01-02 15:04:05", // 10.3, yes the extra space is needed
|
||||
|
@@ -110,6 +110,9 @@ func StringsReplaceReversed(s, old, new string, n int) string {
|
||||
|
||||
func UUIDToShortUUID(uuid string) string {
|
||||
splitted := strings.Split(uuid, "-")
|
||||
if len(splitted) != 5 {
|
||||
return uuid
|
||||
}
|
||||
return splitted[0] + "-" + splitted[3]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user