u 3 years ago
parent
commit
ad9e4a5d63
  1. 20
      core.go

20
core.go

@ -133,16 +133,16 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool {
tmp, err := json.Marshal(ta.TimesOnDay)
mainKey := fmt.Sprintf("[%s][%s]", tfdate, string(tmp))
value, ok := isInTimeOfDayCacheBool.Load(mainKey)
if ok && err == nil {
ret := value.(int)
if ret == 3 {
// return true
}
if ret == 4 {
return false
}
}
// value, ok := isInTimeOfDayCacheBool.Load(mainKey)
// if ok && err == nil {
// ret := value.(int)
// if ret == 3 {
// // return true
// }
// if ret == 4 {
// return false
// }
// }
parseInLocationCache := map[string]time.Time{}
for k := range ta.TimesOnDay {

Loading…
Cancel
Save