计数警告 计数警告器,当计数大于限制时,将触发警告事件 API w := warner . NewWarner ( time . Second , 10 ) w . ResetOnWarn = true w . On ( func ( key string , c Count ) { fmt . Println ( key ) }) w . Inc ( "abcd" , 1 )