Show github link in --version
This commit is contained in:
parent
68d9ab7859
commit
f6b92ee8bd
23
.gitignore
vendored
23
.gitignore
vendored
@ -1,20 +1,3 @@
|
|||||||
/blib/
|
dau-linux
|
||||||
/.build/
|
dau-mac
|
||||||
_build/
|
dau-win.exe
|
||||||
cover_db/
|
|
||||||
inc/
|
|
||||||
Build
|
|
||||||
!Build/
|
|
||||||
Build.bat
|
|
||||||
.last_cover_stats
|
|
||||||
/Makefile
|
|
||||||
/Makefile.old
|
|
||||||
/MANIFEST.bak
|
|
||||||
/META.yml
|
|
||||||
/META.json
|
|
||||||
/MYMETA.*
|
|
||||||
nytprof.out
|
|
||||||
/pm_to_blib
|
|
||||||
*.o
|
|
||||||
*.bs
|
|
||||||
/_eumm/
|
|
||||||
|
4
dau.go
4
dau.go
@ -16,7 +16,7 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
)
|
)
|
||||||
|
|
||||||
var current_version = "0.4"
|
const current_version = "0.4"
|
||||||
|
|
||||||
var last_check = time.Now()
|
var last_check = time.Now()
|
||||||
var new_last_check = time.Now()
|
var new_last_check = time.Now()
|
||||||
@ -93,7 +93,6 @@ func check_updates() {
|
|||||||
func parse_options() (webhook_url string, path string, watch int, username string) {
|
func parse_options() (webhook_url string, path string, watch int, username string) {
|
||||||
|
|
||||||
// Declare the flags to be used
|
// Declare the flags to be used
|
||||||
// helpFlag := getopt.Bool('h', "display help")
|
|
||||||
webhookFlag := getopt.StringLong("webhook", 'w', "", "discord webhook URL")
|
webhookFlag := getopt.StringLong("webhook", 'w', "", "discord webhook URL")
|
||||||
pathFlag := getopt.StringLong("directory", 'd', "", "directory to scan, optional, defaults to current directory")
|
pathFlag := getopt.StringLong("directory", 'd', "", "directory to scan, optional, defaults to current directory")
|
||||||
watchFlag := getopt.Int16Long ("watch", 's', 10, "time between scans")
|
watchFlag := getopt.Int16Long ("watch", 's', 10, "time between scans")
|
||||||
@ -110,6 +109,7 @@ func parse_options() (webhook_url string, path string, watch int, username strin
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (*versionFlag) {
|
if (*versionFlag) {
|
||||||
|
fmt.Println("dau - https://github.com/tardisx/discord-auto-upload")
|
||||||
fmt.Printf("Version: %s\n", current_version)
|
fmt.Printf("Version: %s\n", current_version)
|
||||||
os.Exit(0)
|
os.Exit(0)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user