Skip to content

Commit

Permalink
CC-1121: Go 1.22 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-gang committed Apr 8, 2024
1 parent 1678a22 commit 2abc7c4
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
4 changes: 2 additions & 2 deletions compiled_starters/go/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Go version used to run your code
# on Codecrafters.
#
# Available versions: go-1.21
language_pack: go-1.21
# Available versions: go-1.22
language_pack: go-1.22
13 changes: 13 additions & 0 deletions dockerfiles/go-1.22.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM golang:1.22-alpine

ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum"

WORKDIR /app

COPY go.mod go.sum ./

# Starting from Go 1.20, the go standard library is no loger compiled
# setting the GODEBUG environment to "installgoroot=all" restores the old behavior
RUN GODEBUG="installgoroot=all" go install std

RUN ash -c "set -exo pipefail; go mod graph | awk '{if (\$1 !~ \"@\") {print \$2}}' | xargs -r go get"
4 changes: 2 additions & 2 deletions solutions/go/01-init/code/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ debug: false
# Use this to change the Go version used to run your code
# on Codecrafters.
#
# Available versions: go-1.21
language_pack: go-1.21
# Available versions: go-1.22
language_pack: go-1.22
4 changes: 2 additions & 2 deletions starter_templates/codecrafters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ language_pack: python-3.12
language_pack: swift-5.1
{{/ language_is_swift }}
{{# language_is_go }}
# Available versions: go-1.21
language_pack: go-1.21
# Available versions: go-1.22
language_pack: go-1.22
{{/ language_is_go }}
{{# language_is_php }}
# Available versions: php-7.4
Expand Down

0 comments on commit 2abc7c4

Please sign in to comment.