1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
package _generated
import "time"
//go:generate msgp -v
//msgp:newtime
type NewTime struct {
T time.Time
Array []time.Time
Map map[string]time.Time
}
func (t1 NewTime) Equal(t2 NewTime) bool {
if !t1.T.Equal(t2.T) {
return false
}
if len(t1.Array) != len(t2.Array) {
return false
}
for i := range t1.Array {
if !t1.Array[i].Equal(t2.Array[i]) {
return false
}
}
if len(t1.Map) != len(t2.Map) {
return false
}
for k, v := range t1.Map {
if !t2.Map[k].Equal(v) {
return false
}
}
return true
}
|