From 6aee66c35a84544ab8ed4034395f88cd59c9ee24 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Sun, 19 Sep 2021 20:00:20 +1000 Subject: [PATCH] [v2] Template fixes - update to Go 1.17 --- .../generate/template/base/go.mod.tmpl | 32 ++++++++++++++++++- ...plate.tmpl.json => template.template.json} | 0 .../commands/generate/template/template.go | 2 +- v2/go.mod | 2 +- v2/go.sum | 4 +-- 5 files changed, 35 insertions(+), 5 deletions(-) rename v2/cmd/wails/internal/commands/generate/template/base/{template.tmpl.json => template.template.json} (100%) diff --git a/v2/cmd/wails/internal/commands/generate/template/base/go.mod.tmpl b/v2/cmd/wails/internal/commands/generate/template/base/go.mod.tmpl index 4f29d12d9..fc0370cce 100644 --- a/v2/cmd/wails/internal/commands/generate/template/base/go.mod.tmpl +++ b/v2/cmd/wails/internal/commands/generate/template/base/go.mod.tmpl @@ -2,8 +2,38 @@ module test go 1.17 +require github.com/wailsapp/wails/v2 v2.0.0-alpha + require ( -github.com/wailsapp/wails/v2 v2.0.0-alpha +github.com/andybalholm/brotli v1.0.2 // indirect +github.com/davecgh/go-spew v1.1.1 // indirect +github.com/fasthttp/websocket v0.0.0-20200320073529-1554a54587ab // indirect +github.com/gabriel-vasile/mimetype v1.3.1 // indirect +github.com/go-ole/go-ole v1.2.5 // indirect +github.com/gofiber/fiber/v2 v2.17.0 // indirect +github.com/gofiber/websocket/v2 v2.0.8 // indirect +github.com/google/uuid v1.1.2 // indirect +github.com/imdario/mergo v0.3.12 // indirect +github.com/jchv/go-winloader v0.0.0-20200815041850-dec1ee9a7fd5 // indirect +github.com/klauspost/compress v1.12.2 // indirect +github.com/leaanthony/debme v1.2.1 // indirect +github.com/leaanthony/go-ansi-parser v1.0.1 // indirect +github.com/leaanthony/go-common-file-dialog v1.0.3 // indirect +github.com/leaanthony/go-webview2 v0.0.0-20210914103035-f00aa774a934 // indirect +github.com/leaanthony/slicer v1.5.0 // indirect +github.com/leaanthony/webview2runtime v1.1.0 // indirect +github.com/leaanthony/winc v0.0.0-20210906113646-fd400754f6ba // indirect +github.com/pkg/browser v0.0.0-20210706143420-7d21f8c997e2 // indirect +github.com/pkg/errors v0.9.1 // indirect +github.com/savsgio/gotils v0.0.0-20200117113501-90175b0fbe3f // indirect +github.com/tkrajina/go-reflector v0.5.4 // indirect +github.com/tkrajina/typescriptify-golang-structs v0.1.6 // indirect +github.com/valyala/bytebufferpool v1.0.0 // indirect +github.com/valyala/fasthttp v1.28.0 // indirect +github.com/valyala/tcplisten v1.0.0 // indirect +golang.org/x/net v0.0.0-20210510120150-4163338589ed // indirect +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf // indirect ) + replace github.com/wailsapp/wails/v2 v2.0.0-alpha => {{.WailsDirectory}} diff --git a/v2/cmd/wails/internal/commands/generate/template/base/template.tmpl.json b/v2/cmd/wails/internal/commands/generate/template/base/template.template.json similarity index 100% rename from v2/cmd/wails/internal/commands/generate/template/base/template.tmpl.json rename to v2/cmd/wails/internal/commands/generate/template/base/template.template.json diff --git a/v2/cmd/wails/internal/commands/generate/template/template.go b/v2/cmd/wails/internal/commands/generate/template/template.go index 8534cad5e..398bbdf99 100644 --- a/v2/cmd/wails/internal/commands/generate/template/template.go +++ b/v2/cmd/wails/internal/commands/generate/template/template.go @@ -72,7 +72,7 @@ func AddSubCommand(app *clir.Cli, parent *clir.Command, w io.Writer) { return err } g := gosod.New(baseTemplate) - g.SetTemplateFilters([]string{".tmpl"}) + g.SetTemplateFilters([]string{".template"}) err = os.Chdir(templateDir) if err != nil { diff --git a/v2/go.mod b/v2/go.mod index d85f5ace4..f95142fe6 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -21,7 +21,7 @@ require ( github.com/leaanthony/go-ansi-parser v1.0.1 github.com/leaanthony/go-common-file-dialog v1.0.3 github.com/leaanthony/go-webview2 v0.0.0-20210914103035-f00aa774a934 - github.com/leaanthony/gosod v1.0.1 + github.com/leaanthony/gosod v1.0.2 github.com/leaanthony/idgen v1.0.0 github.com/leaanthony/slicer v1.5.0 github.com/leaanthony/webview2runtime v1.1.0 diff --git a/v2/go.sum b/v2/go.sum index 762a95c0a..10e2053e0 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -115,8 +115,8 @@ github.com/leaanthony/go-common-file-dialog v1.0.3 h1:O0uGjKnWtdEADGrkg+TyAAbZyl github.com/leaanthony/go-common-file-dialog v1.0.3/go.mod h1:TGhEc9eSJgRsupZ+iH1ZgAOnEo9zp05cRH2j08RPrF0= github.com/leaanthony/go-webview2 v0.0.0-20210914103035-f00aa774a934 h1:nK/JTPyJi5QRqYjVZjXgtN4/dhg2qtngoLxLDVn429k= github.com/leaanthony/go-webview2 v0.0.0-20210914103035-f00aa774a934/go.mod h1:lS5ds4bruPk9d7lzdF/OH31Z0YCerI6MmHNFGsWoUnM= -github.com/leaanthony/gosod v1.0.1 h1:F+4c3DmEBfigi7oAswCV2RpQ+k4DcNbhuCZUGdBHacQ= -github.com/leaanthony/gosod v1.0.1/go.mod h1:W8RyeSFBXu7RpIxPGEJfW4moSyGGEjlJMLV25wEbAdU= +github.com/leaanthony/gosod v1.0.2 h1:LtjqaIoHuoXiQXbzMPq0isjNfltSyHKhWeiU/JbmP0w= +github.com/leaanthony/gosod v1.0.2/go.mod h1:W8RyeSFBXu7RpIxPGEJfW4moSyGGEjlJMLV25wEbAdU= github.com/leaanthony/idgen v1.0.0 h1:IZreR+JGEzFV4yeVuBZA25gM0keUoFy+RDUldncQ+Jw= github.com/leaanthony/idgen v1.0.0/go.mod h1:4nBZnt8ml/f/ic/EVQuLxuj817RccT2fyrUaZFxrcVA= github.com/leaanthony/slicer v1.5.0 h1:aHYTN8xbCCLxJmkNKiLB6tgcMARl4eWmH9/F+S/0HtY=