File tree Expand file tree Collapse file tree 4 files changed +25
-6
lines changed
solutions/go/01-init/code Expand file tree Collapse file tree 4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ debug: false
77# Use this to change the Go version used to run your code
88# on Codecrafters.
99#
10- # Available versions: go-1.19
11- language_pack : go-1.19
10+ # Available versions: go-1.21
11+ language_pack : go-1.21
Original file line number Diff line number Diff line change 1+ FROM golang:1.19-alpine
2+
3+ COPY go.mod /app/go.mod
4+ COPY go.sum /app/go.sum
5+
6+ WORKDIR /app
7+
8+ RUN go mod download
9+
10+ # Starting from Go 1.20, the go standard library is no loger compiled
11+ # setting the GODEBUG environment to "installgoroot=all" restores the old behavior
12+ RUN GODEBUG="installgoroot=all" go install std
13+
14+ # Even though modules are downloaded, building them could take a while.
15+ # Let's run go get on each module so that they're built ahead of time.
16+ # Ref: https://github.com/montanaflynn/golang-docker-cache
17+ RUN ash -c "set -exo pipefail; go mod graph | awk '{if (\$ 1 !~ \" @\" ) {print \$ 2}}' | xargs -r go get"
18+
19+ ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum"
Original file line number Diff line number Diff line change @@ -7,5 +7,5 @@ debug: false
77# Use this to change the Go version used to run your code
88# on Codecrafters.
99#
10- # Available versions: go-1.19
11- language_pack : go-1.19
10+ # Available versions: go-1.21
11+ language_pack : go-1.21
Original file line number Diff line number Diff line change @@ -16,8 +16,8 @@ language_pack: python-3.12
1616language_pack : swift-5.7
1717{{/ language_is_swift }}
1818{{# language_is_go }}
19- # Available versions: go-1.19
20- language_pack : go-1.19
19+ # Available versions: go-1.21
20+ language_pack : go-1.21
2121{{/ language_is_go }}
2222{{# language_is_php }}
2323# Available versions: php-7.4
You can’t perform that action at this time.
0 commit comments