u 3 years ago
parent
commit
a13fad6dde
  1. 24
      core.go

24
core.go

@ -129,18 +129,18 @@ func isInTimeOfDay(t time.Time, ta TimeArrow) bool {
tfdate := t.Format("2006-01-02")
mainKey := fmt.Sprintf("[%s][%s]", tfdate, strings.Join(ta.TimesOnDay, "|"))
value, ok := isInTimeOfDayCacheBool.Load(mainKey)
if ok {
ret, ok := value.(int)
if ok {
if ret == 1 {
return true
}
if ret == 2 {
return false
}
}
}
// value, ok := isInTimeOfDayCacheBool.Load(mainKey)
// if ok {
// ret, ok := value.(int)
// if ok {
// if ret == 1 {
// return true
// }
// if ret == 2 {
// return false
// }
// }
// }
parseInLocationCache := map[string]time.Time{}
var err error

Loading…
Cancel
Save