Commit d72fb46d authored by sellskin's avatar sellskin Committed by GitHub

refactor: Optimize code by using built-in constants in the standard library (#9963)

Signed-off-by: default avatarsellskin <mydesk@yeah.net>
parent 4c974298
......@@ -269,8 +269,7 @@ func TestSlidingWindow_CustomBucket(t *testing.T) {
// ts is a convenient method that must parse a time.Time from a string in format `"2006-01-02 15:04:05"`
func ts(s string) time.Time {
format := "2006-01-02 15:04:05"
t, err := time.Parse(format, s)
t, err := time.Parse(time.DateTime, s)
if err != nil {
panic(err)
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment