mirror of
https://github.com/MedzikUser/go-pingbot
synced 2024-08-14 23:57:07 +00:00
24 lines
339 B
Go
24 lines
339 B
Go
package main
|
|
|
|
import (
|
|
"github.com/jpillora/opts"
|
|
"gitlab.com/gaming0skar123/go/pingbot/update"
|
|
)
|
|
|
|
type CMDOptions struct {
|
|
Update bool `opts:"help=automatic updates"`
|
|
}
|
|
|
|
func init() {
|
|
cmd := CMDOptions{
|
|
Update: true,
|
|
}
|
|
|
|
opts.Parse(&cmd)
|
|
|
|
if cmd.Update {
|
|
go update.Updater()
|
|
} else {
|
|
log.Warn("Auto Update -> Disabled")
|
|
}
|
|
}
|