Skip to content

Commit

Permalink
fix: time ptr query parameter (#1880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Codelax authored Oct 17, 2023
1 parent ed3a11e commit 7f7ef70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/parameter/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"net/url"
"reflect"
"time"

"github.com/scaleway/scaleway-sdk-go/scw"
)

Expand Down Expand Up @@ -34,7 +35,7 @@ func AddToQuery(query url.Values, key string, value interface{}) {
query.Add(key, fmt.Sprint(elemValue.Index(i).Interface()))
}
case elemType == reflect.TypeOf(time.Time{}):
query.Add(key, value.(time.Time).Format(time.RFC3339))
query.Add(key, value.(*time.Time).Format(time.RFC3339))
default:
query.Add(key, fmt.Sprint(elemValue.Interface()))
}
Expand Down

0 comments on commit 7f7ef70

Please sign in to comment.