Skip to content

Commit 8fcdc57

Browse files
Passing the optional language version as parameter
1 parent 3236ef8 commit 8fcdc57

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

cli/cli.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,16 @@ func (c *Cli) migrateSyntax(cl client.Client, lang *string, langVer *string, fil
207207
}
208208

209209
func (c *Cli) process(cl client.Client, mode string, lang string, langVer string, source string) (*string, error) {
210-
// TODO pass the lang ver
211210
process, err := cl.CreateProcess(&client.CreateProcessRequest{
212211
Process: client.Process{
213212
Mode: mode,
214213
Language: lang,
215214
Input: client.Input{
216215
Source: source,
217216
},
217+
OutputOptions: &client.OutputOptions{
218+
LanguageVersion: &langVer,
219+
},
218220
},
219221
})
220222
if err != nil {
@@ -317,6 +319,7 @@ func (c *Cli) printHelp() {
317319
fmt.Printf("\n")
318320
fmt.Printf("Commands:\n")
319321
fmt.Printf(" * generate\n")
322+
fmt.Printf(" * migrate\n")
320323
fmt.Printf(" * configure\n")
321324
fmt.Printf(" * version\n")
322325
os.Exit(1)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/codemakerai/codemaker-cli
33
go 1.20
44

55
require (
6-
github.com/codemakerai/codemaker-sdk-go v0.0.2
6+
github.com/codemakerai/codemaker-sdk-go v0.0.3-0.20230322062931-ad3bd008ba77
77
github.com/joho/godotenv v1.5.1
88
go.uber.org/zap v1.24.0
99
)

go.sum

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
2-
github.com/codemakerai/codemaker-sdk-go v0.0.2 h1:UcaaQVpgWSV2nGeLJSxRwoAH1R5hG8SvpUAwsPOLteA=
3-
github.com/codemakerai/codemaker-sdk-go v0.0.2/go.mod h1:drvi/xHywQnOgWWGw3dOWZ4CV0NesAdNNuAtsVdZW2E=
2+
github.com/codemakerai/codemaker-sdk-go v0.0.3-0.20230322062523-70a6d43cfaf9 h1:lZDG+1c1tIEUCcoHODEBmGdAGCMDIXFPmHImuuZGDs8=
3+
github.com/codemakerai/codemaker-sdk-go v0.0.3-0.20230322062523-70a6d43cfaf9/go.mod h1:drvi/xHywQnOgWWGw3dOWZ4CV0NesAdNNuAtsVdZW2E=
4+
github.com/codemakerai/codemaker-sdk-go v0.0.3-0.20230322062931-ad3bd008ba77 h1:TBLLWF9zZhmmnHJFz6Io8FtBUcOI4i/YXDGjw7oXYrc=
5+
github.com/codemakerai/codemaker-sdk-go v0.0.3-0.20230322062931-ad3bd008ba77/go.mod h1:drvi/xHywQnOgWWGw3dOWZ4CV0NesAdNNuAtsVdZW2E=
46
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
57
github.com/joho/godotenv v1.5.1 h1:7eLL/+HRGLY0ldzfGMeQkb7vMd0as4CfYvUVzLqw0N0=
68
github.com/joho/godotenv v1.5.1/go.mod h1:f4LDr5Voq0i2e/R5DDNOoa2zzDfwtkZa6DnEwAbqwq4=

0 commit comments

Comments
 (0)