From d1bf133d90fa712b5a8b21bceaffac6f3ee0271f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Schmitz?= <152157960+bahkauv70@users.noreply.github.com> Date: Tue, 11 Feb 2025 09:32:29 +0100 Subject: [PATCH 1/2] feat: upgrade to go 1.20 --- scripts/generate-sdk/languages/go.sh | 4 ++-- templates/go/go.mod.mustache | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/generate-sdk/languages/go.sh b/scripts/generate-sdk/languages/go.sh index c8e451c..cb4e83f 100644 --- a/scripts/generate-sdk/languages/go.sh +++ b/scripts/generate-sdk/languages/go.sh @@ -8,7 +8,7 @@ SDK_REPO_LOCAL_PATH="${ROOT_DIR}/sdk-repo-updated" OAS_REPO=https://github.com/stackitcloud/stackit-api-specifications -SDK_GO_VERSION="1.18" +SDK_GO_VERSION="1.20" SERVICES_FOLDER="${SDK_REPO_LOCAL_PATH}/services" EXAMPLES_FOLDER="${SDK_REPO_LOCAL_PATH}/examples" @@ -16,7 +16,7 @@ SCRIPTS_FOLDER="${SDK_REPO_LOCAL_PATH}/scripts" GENERATOR_LOG_LEVEL="error" # Must be a Java log level (error, warn, info...) -SDK_GO_VERSION="1.18" +SDK_GO_VERSION="1.20" generate_go_sdk() { # Required parameters diff --git a/templates/go/go.mod.mustache b/templates/go/go.mod.mustache index 9db6c4d..e135113 100644 --- a/templates/go/go.mod.mustache +++ b/templates/go/go.mod.mustache @@ -1,6 +1,6 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}/services{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} -go 1.18 +go 1.20 require ( {{gitHost}}/{{gitUserId}}/{{gitRepoId}}/core v0.15.1 From 409d7cebffd7ddb94458335f75bc8e97ac40d518 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Schmitz?= <152157960+bahkauv70@users.noreply.github.com> Date: Tue, 11 Feb 2025 11:21:05 +0100 Subject: [PATCH 2/2] feat: switch to go 1.21 --- README.md | 2 +- scripts/generate-sdk/languages/go.sh | 4 ++-- templates/go/go.mod.mustache | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f42bcf2..6be8002 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Currently only generation of Go libraries are supported. The output is stored in If you want to modify script or templates and you can run code locally. -Requires `Go 1.20` or higher. +Requires `Go 1.21` or higher. 1. Set up the project and tools by running ``` diff --git a/scripts/generate-sdk/languages/go.sh b/scripts/generate-sdk/languages/go.sh index cb4e83f..10d9528 100644 --- a/scripts/generate-sdk/languages/go.sh +++ b/scripts/generate-sdk/languages/go.sh @@ -8,7 +8,7 @@ SDK_REPO_LOCAL_PATH="${ROOT_DIR}/sdk-repo-updated" OAS_REPO=https://github.com/stackitcloud/stackit-api-specifications -SDK_GO_VERSION="1.20" +SDK_GO_VERSION="1.21" SERVICES_FOLDER="${SDK_REPO_LOCAL_PATH}/services" EXAMPLES_FOLDER="${SDK_REPO_LOCAL_PATH}/examples" @@ -16,7 +16,7 @@ SCRIPTS_FOLDER="${SDK_REPO_LOCAL_PATH}/scripts" GENERATOR_LOG_LEVEL="error" # Must be a Java log level (error, warn, info...) -SDK_GO_VERSION="1.20" +SDK_GO_VERSION="1.21" generate_go_sdk() { # Required parameters diff --git a/templates/go/go.mod.mustache b/templates/go/go.mod.mustache index e135113..4d781d7 100644 --- a/templates/go/go.mod.mustache +++ b/templates/go/go.mod.mustache @@ -1,6 +1,6 @@ module {{gitHost}}/{{gitUserId}}/{{gitRepoId}}/services{{#isGoSubmodule}}/{{packageName}}{{/isGoSubmodule}} -go 1.20 +go 1.21 require ( {{gitHost}}/{{gitUserId}}/{{gitRepoId}}/core v0.15.1