chore: comment the code
This commit is contained in:
parent
2e8c0790a5
commit
4f99e500c0
9
spire.go
9
spire.go
@ -1,7 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
@ -26,14 +25,13 @@ func getCache() error {
|
|||||||
info, err := os.Stat(PAYLOAD)
|
info, err := os.Stat(PAYLOAD)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println("payload isn't accessible, requesting")
|
// payload isn't accessible, requesting
|
||||||
DownloadCache()
|
DownloadCache()
|
||||||
} else if !(info.ModTime().After(time.Now().Add(-2 * time.Hour))) {
|
} else if !(info.ModTime().After(time.Now().Add(-2 * time.Hour))) {
|
||||||
// download again if payload is older than 2 hours
|
// download again if payload is older than 2 hours
|
||||||
DownloadCache()
|
DownloadCache()
|
||||||
} else {
|
|
||||||
fmt.Println("payload was updated recently, won't update")
|
|
||||||
}
|
}
|
||||||
|
// else payload was updated recently, won't update
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -44,7 +42,6 @@ func installBepinex() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
// install bepinex
|
// install bepinex
|
||||||
DownloadBepinex()
|
DownloadBepinex()
|
||||||
} else {
|
|
||||||
fmt.Println("bepinex already installed")
|
|
||||||
}
|
}
|
||||||
|
// else bepinex already installed
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user