Add notice about no self-restarts on windows

This commit is contained in:
Harvey Tindall
2020-09-05 21:52:23 +01:00
parent d31254b18e
commit f5f2a0f190
5 changed files with 33 additions and 2 deletions
+10 -1
View File
@@ -14,6 +14,7 @@ import (
"os"
"os/signal"
"path/filepath"
"runtime"
"time"
"github.com/gin-contrib/pprof"
@@ -95,6 +96,8 @@ func setGinLogger(router *gin.Engine, debugMode bool) {
}
}
var PLATFORM string = runtime.GOOS
func main() {
fmt.Printf("jfa-go version: %s (%s)\n", VERSION, COMMIT)
// app encompasses essentially all useful functions.
@@ -362,8 +365,14 @@ func main() {
}
app.info.Printf("Starting router @ %s", address)
} else {
windows := false
if PLATFORM == "windows" {
windows = true
}
router.GET("/", func(gc *gin.Context) {
gc.HTML(200, "setup.html", gin.H{})
gc.HTML(200, "setup.html", gin.H{
"windows": windows,
})
})
router.POST("/testJF", app.TestJF)
router.POST("/modifyConfig", app.ModifyConfig)