actually load flag
This commit is contained in:
parent
d98bead842
commit
b4e00b3d11
4
main.go
4
main.go
@ -97,6 +97,8 @@ func main() {
|
|||||||
sourcePtr := flag.String("url", "https://www.dota2.com/datafeed/patchnoteslist", "url to fetch patchnotes from")
|
sourcePtr := flag.String("url", "https://www.dota2.com/datafeed/patchnoteslist", "url to fetch patchnotes from")
|
||||||
patch_list := PatchList{}
|
patch_list := PatchList{}
|
||||||
var current_patch Patch
|
var current_patch Patch
|
||||||
|
|
||||||
|
flag.Parse()
|
||||||
LoadPatches(&patch_list, *sourcePtr)
|
LoadPatches(&patch_list, *sourcePtr)
|
||||||
|
|
||||||
current_patch = patch_list.Patches[len(patch_list.Patches)-1]
|
current_patch = patch_list.Patches[len(patch_list.Patches)-1]
|
||||||
@ -104,6 +106,8 @@ func main() {
|
|||||||
log.Printf("Starting on patch %v", current_patch.PatchNumber)
|
log.Printf("Starting on patch %v", current_patch.PatchNumber)
|
||||||
if *hookPtr == "" {
|
if *hookPtr == "" {
|
||||||
log.Println("No webhook set, not notifying")
|
log.Println("No webhook set, not notifying")
|
||||||
|
} else {
|
||||||
|
log.Printf("Notifying %v", *hookPtr)
|
||||||
}
|
}
|
||||||
Notify(Patch{}, "")
|
Notify(Patch{}, "")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user