Browse Source

更新获取工作路径代码,修改go.mod的go版本为1.14

main
SliverHorn 4 years ago
parent
commit
030abc7039
  1. 4
      server/cmd/gva/run.go
  2. 2
      server/go.mod

4
server/cmd/gva/run.go

@ -18,6 +18,7 @@ package gva
import ( import (
"gin-vue-admin/utils" "gin-vue-admin/utils"
"github.com/spf13/cobra" "github.com/spf13/cobra"
"os"
) )
// runCmd represents the run command // runCmd represents the run command
@ -31,7 +32,8 @@ var runCmd = &cobra.Command{
Run: func(cmd *cobra.Command, args []string) { Run: func(cmd *cobra.Command, args []string) {
w := utils.NewWatch() w := utils.NewWatch()
t := utils.NewT() t := utils.NewT()
go w.Watch("./", t)
path, _ := os.Getwd()
go w.Watch(path, t)
t.RunTask() t.RunTask()
}, },
} }

2
server/go.mod

@ -1,6 +1,6 @@
module gin-vue-admin module gin-vue-admin
go 1.12
go 1.14
require ( require (
github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d // indirect

Loading…
Cancel
Save