From 8dc997b7d1732902ee4df61bee7e5d866f8ad68e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Hern=C3=A1ndez?= Date: Sun, 5 May 2024 20:14:19 +0200 Subject: [PATCH 1/2] bump support go version to 1.22 --- docs/pages/docs/providers/go.md | 3 ++- src/providers/go.rs | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/pages/docs/providers/go.md b/docs/pages/docs/providers/go.md index e5ae8479f3..e865238102 100644 --- a/docs/pages/docs/providers/go.md +++ b/docs/pages/docs/providers/go.md @@ -17,7 +17,8 @@ The following Go versions are available: - `1.18` - `1.19` - `1.20` -- `1.21` (default) +- `1.21` +- `1.22` (default) The version is parsed from the `go.mod` file. diff --git a/src/providers/go.rs b/src/providers/go.rs index 5b3d6c3068..9a4d3a43f6 100644 --- a/src/providers/go.rs +++ b/src/providers/go.rs @@ -8,7 +8,7 @@ use crate::nixpacks::{ BuildPlan, }, }; -use anyhow::Result; +use anyhow::{Ok, Result}; pub struct GolangProvider {} @@ -29,10 +29,15 @@ const AVAILABLE_GO_VERSIONS: &[(&str, &str, &str)] = &[ "go_1_20", "1f13eabcd6f5b00fe9de9575ac52c66a0e887ce6", ), - ("1.21", "go", "1f13eabcd6f5b00fe9de9575ac52c66a0e887ce6"), + ( + "1.21", + "go_1_21", + "1f13eabcd6f5b00fe9de9575ac52c66a0e887ce6", + ), + ("1.22", "go", "e89cf1c932006531f454de7d652163a9a5c86668"), ]; const DEFAULT_GO_PKG_NAME: &str = "go"; -const DEFAULT_ARCHIVE: &str = "1f13eabcd6f5b00fe9de9575ac52c66a0e887ce6"; +const DEFAULT_ARCHIVE: &str = "e89cf1c932006531f454de7d652163a9a5c86668"; const GO_BUILD_CACHE_DIR: &str = "/root/.cache/go-build"; From 4f26813b01718f0230699e44850536a194e898c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Hern=C3=A1ndez?= Date: Sun, 5 May 2024 20:20:00 +0200 Subject: [PATCH 2/2] clean PR --- src/providers/go.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/providers/go.rs b/src/providers/go.rs index 9a4d3a43f6..50f90275bb 100644 --- a/src/providers/go.rs +++ b/src/providers/go.rs @@ -8,7 +8,7 @@ use crate::nixpacks::{ BuildPlan, }, }; -use anyhow::{Ok, Result}; +use anyhow::Result; pub struct GolangProvider {}