-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Update Go starter template to use main.go instead of server.go
- Loading branch information
Showing
13 changed files
with
20 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
FROM golang:1.22-alpine | ||
|
||
# Ensures the container is re-built if go.mod or go.sum changes | ||
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum" | ||
|
||
WORKDIR /app | ||
|
||
COPY go.mod go.sum ./ | ||
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses | ||
COPY --exclude=.git --exclude=README.md . /app | ||
|
||
# Starting from Go 1.20, the go standard library is no loger compiled | ||
# setting the GODEBUG environment to "installgoroot=all" restores the old behavior | ||
# Starting from Go 1.20, the go standard library is no loger compiled. | ||
# Setting GODEBUG to "installgoroot=all" restores the old behavior | ||
RUN GODEBUG="installgoroot=all" go install std | ||
|
||
RUN go mod download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,16 @@ | ||
# syntax=docker/dockerfile:1.7-labs | ||
FROM golang:1.24-alpine | ||
|
||
# Ensures the container is re-built if go.mod or go.sum changes | ||
ENV CODECRAFTERS_DEPENDENCY_FILE_PATHS="go.mod,go.sum" | ||
|
||
WORKDIR /app | ||
|
||
COPY go.mod go.sum ./ | ||
# .git & README.md are unique per-repository. We ignore them on first copy to prevent cache misses | ||
COPY --exclude=.git --exclude=README.md . /app | ||
|
||
# Starting from Go 1.20, the go standard library is no loger compiled | ||
# setting the GODEBUG environment to "installgoroot=all" restores the old behavior | ||
# Starting from Go 1.20, the go standard library is no loger compiled. | ||
# Setting GODEBUG to "installgoroot=all" restores the old behavior | ||
RUN GODEBUG="installgoroot=all" go install std | ||
|
||
RUN go mod download |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
attributes: | ||
required_executable: go (1.24) | ||
user_editable_file: app/server.go | ||
user_editable_file: app/main.go |