Skip to content

Commit 415dff8

Browse files
committed
drop vendor
1 parent 057a05d commit 415dff8

File tree

544 files changed

+59
-266860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

544 files changed

+59
-266860
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
/.git/
33
/.github/
44
/.tools/
5-
/.tools/
65
/.vscode/
76
/.idea/
87
/cover.out

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*.out
1818

1919
# Dependency directories (remove the comment below to include it)
20-
# vendor/
20+
vendor/
2121

2222
# Go workspace file
2323
go.work

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"editor.insertSpaces": false,
1919
"editor.formatOnSave": true
2020
},
21+
2122
"go.disableConcurrentTests": true,
2223
"go.formatTool": "default",
2324
"go.lintTool": "golangci-lint",
@@ -31,7 +32,7 @@
3132
"go.lintOnSave": "package",
3233
"go.testTags": "test-e2e",
3334
"go.testFlags": [
34-
"-mod=vendor",
35+
//"-mod=vendor",
3536
"-count=1",
3637
"-p=1",
3738
"-v",

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ env:
2424
@echo ""
2525

2626
@echo -e "\e[0;90m>>>\e[0m \e[0;94m Go env \e[0m \e[0;90m<<<\e[0m"
27-
$(GO_EXEC) env
27+
go env
2828
@echo ""
2929

3030
@echo -e "\e[0;90m>>>\e[0m \e[0;94m Packages \e[0m \e[0;90m<<<\e[0m"

deployments/compose.local.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# yaml-language-server: $schema=https://raw.githubusercontent.com/compose-spec/compose-spec/master/schema/compose-spec.json
2+
3+
services:
4+
goboilerplate:
5+
build:
6+
context: ../
7+
dockerfile: ./build/docker/debug.Dockerfile
8+
volumes:
9+
- type: bind
10+
source: ../
11+
target: /wd
12+
- type: volume
13+
source: buildcache
14+
target: /root/.cache/go-build
15+
volume:
16+
nocopy: true # https://docs.docker.com/engine/storage/volumes/ data at the destination isn't copied into the volume if the volume is empty. By default, content at the target destination gets copied into a mounted volume if empty.
17+
- type: volume
18+
source: go-pkg
19+
target: /go/pkg
20+
volume:
21+
nocopy: true
22+
tmpfs:
23+
- /run
24+
- /tmp
25+
ports:
26+
- "8888:8888"
27+
- "2345:2345"
28+
restart: on-failure
29+
# https://github.com/go-delve/delve/blob/master/Documentation/usage/dlv_debug.md
30+
command: ["air", "-c", ".air.toml"]
31+
environment:
32+
- APP_HTTP_PORT=8888
33+
- APP_HTTP_INBOUND_TRAFFIC_LOG_LEVEL=2
34+
- APP_HTTP_OUTBOUND_TRAFFIC_LOG_LEVEL=2
35+
- APP_HTTP_READ_HEADER_TIMEOUT=3s
36+
- APP_SHUTDOWN_TIMEOUT=6s
37+
- APP_LOG_LEVEL=DEBUG
38+
39+
volumes:
40+
buildcache: {}
41+
go-pkg: {}

deployments/local/compose.local.yml

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/makefile_targets.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
| Target | Description |
44
| -------------------- | ----------- |
55
| `mod` | Runs go mod [tidy](https://go.dev/ref/mod#go-mod-tidy) and [verify](https://go.dev/ref/mod#go-mod-verify). |
6-
| `vendor` | Runs [go mod vendor](https://go.dev/ref/mod#go-mod-vendor) that downloads all dependencies into `./vendor` folder. |
76
| `go-deps-upgrade` | Runs updates all `go.mod` dependencies. |
87
| `env` | Prints information regarding the local environment. More specifically: go env, all go packages and folders, and the specified tools bin directory. |
98
| `git-reset` | Full hard reset to HEAD. Cleans up all untracked files and restore all staged and un-staged changes. |

scripts/go.mk

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
GO_EXEC ?= go
2-
export GO_EXEC
3-
41
REPO_GIT_BRANCH = $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null || true)
52
REPO_GIT_COMMIT = $(shell git rev-parse HEAD 2>/dev/null || true)
63
REPO_GIT_COMMIT_SHORT = $(shell git rev-parse --short HEAD 2>/dev/null || true)
@@ -13,8 +10,8 @@ X_FLAGS = \
1310
-X '$(MODULE)/build.CommitShort=$(REPO_GIT_COMMIT_SHORT)' \
1411
-X '$(MODULE)/build.Tag=$(REPO_GIT_TAG)'
1512

16-
GO_PACKAGES = $(GO_EXEC) list -tags='$(TAGS)' -mod=vendor ./...
17-
GO_FOLDERS = $(GO_EXEC) list -tags='$(TAGS)' -mod=vendor -f '{{ .Dir }}' ./...
13+
GO_PACKAGES = go list -tags='$(TAGS)' ./...
14+
GO_FOLDERS = go list -tags='$(TAGS)' -f '{{ .Dir }}' ./...
1815
GO_FILES = find . -type f -name '*.go' -not -path './vendor/*'
1916

2017
export GO111MODULE := on
@@ -26,36 +23,29 @@ BUILD_OUTPUT ?= $(CURDIR)/output
2623

2724
.PHONY: mod
2825
mod:
29-
$(GO_EXEC) mod tidy -go=1.23
30-
$(GO_EXEC) mod verify
31-
32-
.PHONY: vendor
33-
vendor:
34-
$(GO_EXEC) mod vendor
26+
go mod tidy -go=1.23
27+
go mod verify
3528

3629
# https://go.dev/ref/mod#go-get
3730
# -u flag tells go get to upgrade modules
3831
# -t flag tells go get to consider modules needed to build tests of packages named on the command line.
3932
# When -t and -u are used together, go get will update test dependencies as well.
4033
.PHONY: go-deps-upgrade
4134
go-deps-upgrade:
42-
$(GO_EXEC) get -u -t ./...
43-
$(GO_EXEC) mod tidy -go=1.23
44-
$(GO_EXEC) mod vendor
35+
go get -u -t ./...
36+
go mod tidy -go=1.23
4537

4638
# https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies
4739
# https://pkg.go.dev/cmd/compile
4840
# https://pkg.go.dev/cmd/link
4941

5042
#BUILD_FLAGS := -mod=vendor -a -ldflags "-s -w $(X_FLAGS) -extldflags='-static'" -tags '$(TAGS)'
51-
BUILD_FLAGS := -mod=vendor -a -ldflags '-s -w $(X_FLAGS)' -tags '$(TAGS)'
52-
BUILD_FLAGS_DEBUG := -mod=vendor -ldflags '$(X_FLAGS)' -tags '$(TAGS)'
43+
BUILD_FLAGS := -a -ldflags '-s -w $(X_FLAGS)' -tags '$(TAGS)'
44+
BUILD_FLAGS_DEBUG := -ldflags '$(X_FLAGS)' -tags '$(TAGS)'
5345

5446
cmd.%: CMDNAME=$*
5547
cmd.%:
56-
$(GO_EXEC) env
57-
@echo ''
58-
CGO_ENABLED=0 $(GO_EXEC) build $(BUILD_FLAGS) -o $(BUILD_OUTPUT)/$(CMDNAME) ./cmd/$(CMDNAME)
48+
CGO_ENABLED=0 go build $(BUILD_FLAGS) -o $(BUILD_OUTPUT)/$(CMDNAME) ./cmd/$(CMDNAME)
5949

6050
dbg.%: BUILD_FLAGS=$(BUILD_FLAGS_DEBUG)
6151
dbg.%: cmd.%
@@ -70,10 +60,10 @@ clean:
7060

7161
.PHONY: test
7262
test:
73-
CGO_ENABLED=1 $(GO_EXEC) test -timeout 60s -race -tags="$(TAGS)" -coverprofile cover.out -covermode atomic ./...
74-
@$(GO_EXEC) tool cover -func cover.out
63+
CGO_ENABLED=1 go test -timeout 60s -race -tags="$(TAGS)" -coverprofile cover.out -covermode atomic ./...
64+
@go tool cover -func cover.out
7565
@rm cover.out
7666

7767
.PHONY: run
7868
run:
79-
$(GO_EXEC) run -mod=vendor ./cmd/goboilerplate
69+
go run ./cmd/goboilerplate

scripts/tools.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ $(TOOLS_DB)/%.ver: | $(TOOLS_DB)
4141

4242
define go_install
4343
@echo -e "Installing \e[1;36m$(1)\e[0m@\e[1;36m$(3)\e[0m using \e[1;36m$(GO_VER)\e[0m"
44-
GOBIN="$(TOOLS_BIN)" CGO_ENABLED=0 $(GO_EXEC) install -trimpath -ldflags '-s -w -extldflags "-static"' "$(2)@$(3)"
44+
GOBIN="$(TOOLS_BIN)" CGO_ENABLED=0 go install -trimpath -ldflags '-s -w -extldflags "-static"' "$(2)@$(3)"
4545
@echo ""
4646
endef
4747

4848
.PHONY: vet
4949
vet:
50-
$(GO_EXEC) vet `$(GO_PACKAGES)`
50+
go vet `$(GO_PACKAGES)`
5151
@echo ""
5252

5353
## <staticcheck>

vendor/github.com/davecgh/go-spew/LICENSE

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)