Change-Id: I4730673130bdfbda9987dcb5869f421082f92150
Reviewed-on: https://go-review.googlesource.com/c/go/+/435615
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
if len(s[i].Path) != len(s[j].Path) {
return len(s[i].Path) > len(s[j].Path)
}
- if !s[i].Creation.Equal(s[j].Creation) {
- return s[i].Creation.Before(s[j].Creation)
+ if ret := s[i].Creation.Compare(s[j].Creation); ret != 0 {
+ return ret < 0
}
return s[i].seqNum < s[j].seqNum
})
// The Last-Modified header truncates sub-second precision so
// the modtime needs to be truncated too.
modtime = modtime.Truncate(time.Second)
- if modtime.Before(t) || modtime.Equal(t) {
+ if ret := modtime.Compare(t); ret <= 0 {
return condTrue
}
return condFalse
// The Last-Modified header truncates sub-second precision so
// the modtime needs to be truncated too.
modtime = modtime.Truncate(time.Second)
- if modtime.Before(t) || modtime.Equal(t) {
+ if ret := modtime.Compare(t); ret <= 0 {
return condFalse
}
return condTrue