forked from loafle/openapi-generator-original
fix cache-expires-ineffassign (#466)
This commit is contained in:
@@ -427,8 +427,9 @@ func CacheExpires(r *http.Response) time.Time {
|
||||
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||
if err != nil {
|
||||
expires = now
|
||||
} else {
|
||||
expires = now.Add(lifetime)
|
||||
}
|
||||
expires = now.Add(lifetime)
|
||||
} else {
|
||||
expiresHeader := r.Header.Get("Expires")
|
||||
if expiresHeader != "" {
|
||||
|
||||
@@ -438,8 +438,9 @@ func CacheExpires(r *http.Response) time.Time {
|
||||
lifetime, err := time.ParseDuration(maxAge + "s")
|
||||
if err != nil {
|
||||
expires = now
|
||||
} else {
|
||||
expires = now.Add(lifetime)
|
||||
}
|
||||
expires = now.Add(lifetime)
|
||||
} else {
|
||||
expiresHeader := r.Header.Get("Expires")
|
||||
if expiresHeader != "" {
|
||||
|
||||
Reference in New Issue
Block a user