mirror of
https://github.com/minio/minio.git
synced 2025-11-07 12:52:58 -05:00
fix: [minor] Avoid unnecessary typecasting. (#4828)
We don't need to typecast identifiers from their base to type to same type again. This is not a bug and compiler is fine to skip it but it is better to avoid if not needed.
This commit is contained in:
committed by
Dee Koder
parent
7505bac037
commit
2e6ee68409
@@ -238,13 +238,13 @@ func doesPresignedSignatureMatch(hashedPayload string, r *http.Request, region s
|
||||
return ErrRequestNotReadyYet
|
||||
}
|
||||
|
||||
if UTCNow().Sub(pSignValues.Date) > time.Duration(pSignValues.Expires) {
|
||||
if UTCNow().Sub(pSignValues.Date) > pSignValues.Expires {
|
||||
return ErrExpiredPresignRequest
|
||||
}
|
||||
|
||||
// Save the date and expires.
|
||||
t := pSignValues.Date
|
||||
expireSeconds := int(time.Duration(pSignValues.Expires) / time.Second)
|
||||
expireSeconds := int(pSignValues.Expires / time.Second)
|
||||
|
||||
// Construct the query.
|
||||
query.Set("X-Amz-Date", t.Format(iso8601Format))
|
||||
|
||||
Reference in New Issue
Block a user