File tree Expand file tree Collapse file tree 20 files changed +45
-26
lines changed Expand file tree Collapse file tree 20 files changed +45
-26
lines changed Original file line number Diff line number Diff line change 88
99set -e # Exit on failure
1010
11- go build -o /tmp/codecrafters-build-grep-go cmd/mygrep/main .go
11+ go build -o /tmp/codecrafters-build-grep-go app/ * .go
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ expressions are evaluated.
1717
1818# Passing the first stage
1919
20- The entry point for your ` grep ` implementation is in ` cmd/mygrep/ main.go` . Study
21- and uncomment the relevant code, and push your changes to pass the first stage:
20+ The entry point for your ` grep ` implementation is in ` app/ main.go` . Study and
21+ uncomment the relevant code, and push your changes to pass the first stage:
2222
2323``` sh
2424git commit -am " pass 1st stage" # any msg
@@ -31,8 +31,8 @@ Time to move on to the next stage!
3131
3232Note: This section is for stages 2 and beyond.
3333
34- 1 . Ensure you have ` go (1.19 ) ` installed locally
34+ 1 . Ensure you have ` go (1.24 ) ` installed locally
35351 . Run ` ./your_program.sh ` to run your program, which is implemented in
36- ` cmd/mygrep /main.go` .
36+ ` app /main.go` .
37371 . Commit your changes and run ` git push origin master ` to submit your solution
3838 to CodeCrafters. Test output will be streamed to your terminal.
File renamed without changes.
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.22
11- language_pack : go-1.22
10+ # Available versions: go-1.24
11+ language_pack : go-1.24
Original file line number Diff line number Diff line change 88
99module github.com/codecrafters-io/grep-starter-go
1010
11- go 1.22
11+ go 1.24.0
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ set -e # Exit early if any commands fail
1414# - Edit .codecrafters/compile.sh to change how your program compiles remotely
1515(
1616 cd " $( dirname " $0 " ) " # Ensure compile steps are run within the repository directory
17- go build -o /tmp/codecrafters-build-grep-go cmd/mygrep/main .go
17+ go build -o /tmp/codecrafters-build-grep-go app/ * .go
1818)
1919
2020# Copied from .codecrafters/run.sh
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1.7-labs
12FROM golang:1.22-alpine
23
4+ # Ensures the container is re-built if go.mod or go.sum changes
35ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum"
46
57WORKDIR /app
68
7- COPY go.mod go.sum ./
9+ # .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
10+ COPY --exclude=.git --exclude=README.md . /app
811
9- # Starting from Go 1.20, the go standard library is no loger compiled
10- # setting the GODEBUG environment to "installgoroot=all" restores the old behavior
12+ # Starting from Go 1.20, the go standard library is no loger compiled.
13+ # Setting GODEBUG to "installgoroot=all" restores the old behavior
1114RUN GODEBUG="installgoroot=all" go install std
1215
1316RUN go mod download
Original file line number Diff line number Diff line change 1+ # syntax=docker/dockerfile:1.7-labs
2+ FROM golang:1.24-alpine
3+
4+ # Ensures the container is re-built if go.mod or go.sum changes
5+ ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum"
6+
7+ WORKDIR /app
8+
9+ # .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses
10+ COPY --exclude=.git --exclude=README.md . /app
11+
12+ # Starting from Go 1.20, the go standard library is no loger compiled.
13+ # Setting GODEBUG to "installgoroot=all" restores the old behavior
14+ RUN GODEBUG="installgoroot=all" go install std
15+
16+ RUN go mod download
Original file line number Diff line number Diff line change 88
99set -e # Exit on failure
1010
11- go build -o /tmp/codecrafters-build-grep-go cmd/mygrep/main .go
11+ go build -o /tmp/codecrafters-build-grep-go app/ * .go
Original file line number Diff line number Diff line change @@ -17,8 +17,8 @@ expressions are evaluated.
1717
1818# Passing the first stage
1919
20- The entry point for your ` grep ` implementation is in ` cmd/mygrep/ main.go` . Study
21- and uncomment the relevant code, and push your changes to pass the first stage:
20+ The entry point for your ` grep ` implementation is in ` app/ main.go` . Study and
21+ uncomment the relevant code, and push your changes to pass the first stage:
2222
2323``` sh
2424git commit -am " pass 1st stage" # any msg
@@ -31,8 +31,8 @@ Time to move on to the next stage!
3131
3232Note: This section is for stages 2 and beyond.
3333
34- 1 . Ensure you have ` go (1.19 ) ` installed locally
34+ 1 . Ensure you have ` go (1.24 ) ` installed locally
35351 . Run ` ./your_program.sh ` to run your program, which is implemented in
36- ` cmd/mygrep /main.go` .
36+ ` app /main.go` .
37371 . Commit your changes and run ` git push origin master ` to submit your solution
3838 to CodeCrafters. Test output will be streamed to your terminal.
You can’t perform that action at this time.
0 commit comments