// Handler for processing to be done when bot is terminating. func EndProc(client *mwclient.Client, stats *stats, cookieFile string) { // Cookies can change while the bot is running, so save the latest values for the next run. mwlib.WriteCookies(client.DumpCookies(), cookieFile) if stats.examined > 1 { fmt.Println() stats.print() } }