mirror of
https://github.com/MedzikUser/go-cdn
synced 2024-08-15 03:19:36 +00:00
- Added github workflows and dependabot - Added goreleaser - The Automatic Update system has been changed - Changed DB connect from init to Connect()
24 lines
340 B
Go
24 lines
340 B
Go
package main
|
|
|
|
import (
|
|
"github.com/jpillora/opts"
|
|
"gitlab.com/gaming0skar123/go/cdn/update"
|
|
)
|
|
|
|
type CMDOptions struct {
|
|
Update bool `opts:"help=automatic updates"`
|
|
}
|
|
|
|
func init() {
|
|
cmd := CMDOptions{
|
|
Update: true,
|
|
}
|
|
|
|
opts.Parse(&cmd)
|
|
|
|
if cmd.Update {
|
|
go update.CheckUpdates()
|
|
} else {
|
|
log.Warn("Auto Update -> Disabled")
|
|
}
|
|
}
|