Skip to content

Commit

Permalink
CC-853 updated go starter to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
libmartinito committed Dec 11, 2023
1 parent 4b6360e commit 5448af2
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 0 deletions.
11 changes: 11 additions & 0 deletions compiled_starters/go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// DON'T EDIT THIS!
//
// Codecrafters relies on this file being intact to run tests successfully. Any changes
// here will not reflect when CodeCrafters tests your code, and might even cause build
// failures.
//
// DON'T EDIT THIS!

module github.com/codecrafters-io/docker-starter-go

go 1.19
Empty file added compiled_starters/go/go.sum
Empty file.
9 changes: 9 additions & 0 deletions dockerfiles/go-1.19.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ RUN apk add curl
ARG docker_explorer_version=v18
RUN curl --fail -Lo /usr/local/bin/docker-explorer https://github.com/codecrafters-io/docker-explorer/releases/download/${docker_explorer_version}/${docker_explorer_version}_linux_amd64
RUN chmod +x /usr/local/bin/docker-explorer

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

WORKDIR /app

COPY go.mod go.sum ./

RUN go mod graph | awk '{if ($1 !~ "@") print $2}' | xargs -r go get

11 changes: 11 additions & 0 deletions solutions/go/01-init/code/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// DON'T EDIT THIS!
//
// Codecrafters relies on this file being intact to run tests successfully. Any changes
// here will not reflect when CodeCrafters tests your code, and might even cause build
// failures.
//
// DON'T EDIT THIS!

module github.com/codecrafters-io/docker-starter-go

go 1.19
Empty file.
4 changes: 4 additions & 0 deletions starter-repository-definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
target: codecrafters.yml
- source: starter_templates/go/app/main.go
target: app/main.go
- source: starter_templates/go/go.mod
target: go.mod
- source: starter_templates/go/go.sum
target: go.sum
- source: starter_templates/go/Dockerfile
target: Dockerfile
- source: starter_templates/go/your_docker.sh
Expand Down
11 changes: 11 additions & 0 deletions starter_templates/go/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// DON'T EDIT THIS!
//
// Codecrafters relies on this file being intact to run tests successfully. Any changes
// here will not reflect when CodeCrafters tests your code, and might even cause build
// failures.
//
// DON'T EDIT THIS!

module github.com/codecrafters-io/docker-starter-go

go 1.19
Empty file added starter_templates/go/go.sum
Empty file.

0 comments on commit 5448af2

Please sign in to comment.