go-pingbot/update/ticker.go
Medzik bd660f5427 v1.1.0: Change error msg, Changes 2 files name to ticker.go...
- Change error messages
- backend and update: changed files name to ticker.go
- Update README, Makefile
- Added nodemon
- website: URL type now is database.URL
- backend: Remove unused http info
- Upgrade deps
2021-07-19 14:24:33 +00:00

29 lines
318 B
Go

package update
import (
"time"
"gitlab.com/gaming0skar123/go/pingbot/config"
)
func Ticker() {
// Check on start
Update()
ticker := time.NewTicker(config.Latest_Version_Check)
quit := make(chan struct{})
for {
select {
case <-ticker.C:
Update()
case <-quit:
ticker.Stop()
return
}
}
}