1
0
Fork 0
mirror of https://github.com/MedzikUser/go-cdn synced 2024-08-15 03:19:36 +00:00
go-cdn/update/checkUpdates.go
Medzik c77de68966 Simple Changes
- Added github workflows and dependabot
- Added goreleaser
- The Automatic Update system has been changed
- Changed DB connect from init to Connect()
2021-07-15 10:47:44 +02:00

28 lines
320 B
Go

package update
import (
"time"
"gitlab.com/gaming0skar123/go/cdn/config"
)
func CheckUpdates() {
// 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
}
}
}