File tree Expand file tree Collapse file tree 3 files changed +8
-4
lines changed
Expand file tree Collapse file tree 3 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ require (
1717 github.com/ghodss/yaml v1.0.0
1818 github.com/gorilla/websocket v1.5.0
1919 github.com/hashicorp/go-version v1.6.0
20- github.com/karrick/tparse v2.4.2+incompatible
20+ github.com/karrick/tparse/v2 v2.8.2
2121 github.com/kubernetes-client/go-base v0.0.0-20190205182333-3d0e39759d98
2222 github.com/mattn/go-colorable v0.1.13
2323 github.com/mattn/go-isatty v0.0.19
Original file line number Diff line number Diff line change @@ -381,8 +381,8 @@ github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfC
381381mygithub.libinneed.workers.dev/jpillora/backoff v0.0.0-20180909062703-3050d21c67d7 /go.mod h1:2iMrUgbbvHEiQClaW2NsSzMyGHqN+rDFqY705q49KG0 =
382382mygithub.libinneed.workers.dev/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024 /go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU =
383383mygithub.libinneed.workers.dev/jstemmer/go-junit-report v0.9.1 /go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk =
384- github.com/karrick/tparse v2.4.2+incompatible h1:+cW306qKAzrASC5XieHkgN7/vPaGKIuK62Q7nI7DIRc =
385- github.com/karrick/tparse v2.4.2+incompatible /go.mod h1:ASPA+vrIcN1uEW6BZg8vfWbzm69ODPSYZPU6qJyfdK0 =
384+ github.com/karrick/tparse/v2 v2.8.2 h1:NhvrrB7nXYa0VLn0JKn9L3oG/GZN+LB/+g5QfWE30rU =
385+ github.com/karrick/tparse/v2 v2.8.2 /go.mod h1:OzmKMqNal7LYYHaO/Ie1f/wXmLWAaGKwJmxUFNQCVxg =
386386mygithub.libinneed.workers.dev/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4 =
387387mygithub.libinneed.workers.dev/kevinburke/ssh_config v1.2.0 /go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM =
388388mygithub.libinneed.workers.dev/kisielk/errcheck v1.5.0 /go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8 =
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import (
1414 "time"
1515
1616 "github.com/dustin/go-humanize"
17- "github.com/karrick/tparse"
17+ "github.com/karrick/tparse/v2 "
1818 "github.com/scaleway/scaleway-sdk-go/scw"
1919 "github.com/scaleway/scaleway-sdk-go/strcase"
2020)
@@ -69,6 +69,10 @@ var unmarshalFuncs = map[reflect.Type]UnmarshalFunc{
6969 return nil
7070 }
7171
72+ if len (value ) == 0 {
73+ return fmt .Errorf ("empty time given" )
74+ }
75+
7276 // Handle relative time
7377 if value [0 ] != '+' && value [0 ] != '-' {
7478 value = "+" + value
You can’t perform that action at this time.
0 commit comments