package cache var monitorCache map[string]bool = map[string]bool{} func CheckMonitor(url string, err error) bool { willNotice := monitorCache[url] != (err != nil) monitorCache[url] = err != nil return willNotice }