Skip to content

Commit be43543

Browse files
committed
Update dependencies
1 parent da68d35 commit be43543

File tree

3 files changed

+10
-14
lines changed

3 files changed

+10
-14
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/code-game-project/codegame-cli-go
33
go 1.18
44

55
require (
6-
github.com/code-game-project/codegame-cli v0.5.0
6+
github.com/code-game-project/codegame-cli v0.5.1
77
github.com/spf13/pflag v1.0.5
88
)
99

go.sum

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
github.com/AlecAivazis/survey/v2 v2.3.4 h1:pchTU9rsLUSvWEl2Aq9Pv3k0IE2fkqtGxazskAMd9Ng=
2-
github.com/AlecAivazis/survey/v2 v2.3.4/go.mod h1:hrV6Y/kQCLhIZXGcriDCUBtB3wnN7156gMXJ3+b23xM=
31
github.com/AlecAivazis/survey/v2 v2.3.5 h1:A8cYupsAZkjaUmhtTYv3sSqc7LO5mp1XDfqe5E/9wRQ=
42
github.com/AlecAivazis/survey/v2 v2.3.5/go.mod h1:4AuI9b7RjAR+G7v9+C4YSlX/YL3K3cWNXgWXOhllqvI=
53
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2 h1:+vx7roKuyA63nhn5WAunQHLTznkw5W8b1Xc0dNjp83s=
64
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2/go.mod h1:HBCaDeC1lPdgDeDbhX8XFpy1jqjK0IBG8W5K+xYqA0w=
75
github.com/adrg/xdg v0.4.0 h1:RzRqFcjH4nE5C6oTAxhBtoE2IRyjBSa62SCbyPidvls=
86
github.com/adrg/xdg v0.4.0/go.mod h1:N6ag73EX4wyxeaoeHctc1mas01KZgsj5tYiAIwqJE/E=
9-
github.com/code-game-project/codegame-cli v0.5.0 h1:1lB0lIy8JcCuOhGpUvoxr/2CaRnGZ7FV3Xpy1t0VOFE=
10-
github.com/code-game-project/codegame-cli v0.5.0/go.mod h1:EIgSdxiXvcgVuGLmhMgif+jpyPyi4o0xelpMHhRJG0I=
7+
github.com/code-game-project/codegame-cli v0.5.1 h1:6AoWoEbLQpRCnoCVY1aqSQoTJUF1Z9JW6JIEgFMT1zc=
8+
github.com/code-game-project/codegame-cli v0.5.1/go.mod h1:EIgSdxiXvcgVuGLmhMgif+jpyPyi4o0xelpMHhRJG0I=
119
github.com/creack/pty v1.1.17 h1:QeVUsEDNrLBW4tMgZHvxy18sKtr6VI492kBhUfhDJNI=
1210
github.com/creack/pty v1.1.17/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4=
1311
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -40,8 +38,6 @@ golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBc
4038
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4139
golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4240
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
43-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
44-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4541
golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68 h1:z8Hj/bl9cOV2grsOpEaQFUaly0JWN3i97mo3jXKJNp0=
4642
golang.org/x/sys v0.0.0-20220608164250-635b8c9b7f68/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
4743
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=

new/client/client.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,13 @@ func CreateNewClient(projectName, gameName, serverURL, libraryVersion string, ge
4848
}
4949
cli.Finish()
5050

51+
cgeVersion, err := util.GetCGEVersion(baseURL(serverURL, isSSL(serverURL)))
52+
if err != nil {
53+
return err
54+
}
55+
5156
cli.Begin("Creating project template...")
52-
err = createGoClientTemplate(projectName, module, gameName, serverURL, libraryURL, generateWrappers)
57+
err = createGoClientTemplate(projectName, module, gameName, serverURL, libraryURL, cgeVersion, generateWrappers)
5358
if err != nil {
5459
return err
5560
}
@@ -77,16 +82,11 @@ func CreateNewClient(projectName, gameName, serverURL, libraryVersion string, ge
7782
return nil
7883
}
7984

80-
func createGoClientTemplate(projectName, modulePath, gameName, serverURL, libraryURL string, wrappers bool) error {
85+
func createGoClientTemplate(projectName, modulePath, gameName, serverURL, libraryURL, cgeVersion string, wrappers bool) error {
8186
if !wrappers {
8287
return execGoClientMainTemplate(projectName, serverURL, libraryURL)
8388
}
8489

85-
cgeVersion, err := util.GetCGEVersion(baseURL(serverURL, isSSL(serverURL)))
86-
if err != nil {
87-
return err
88-
}
89-
9090
return execGoClientWrappersTemplate(projectName, modulePath, gameName, serverURL, libraryURL, cgeVersion)
9191
}
9292

0 commit comments

Comments
 (0)