Skip to content

Commit a848ef6

Browse files
authored
[+] switch to the Green Tea Garbage Collector (#1007)
1 parent 492bdaa commit a848ef6

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

.goreleaser.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ builds:
88
- main: ./cmd/pgwatch
99
env:
1010
- CGO_ENABLED=0
11+
- GOEXPERIMENT=greenteagc
1112
goos:
1213
- linux
1314
- darwin

docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ COPY --from=webui-builder /webui/build ./internal/webui/build
5050

5151
# Generate protobuf and build the application
5252
RUN go generate ./api/pb/ && \
53-
CGO_ENABLED=0 go build -ldflags "\
53+
CGO_ENABLED=0 GOEXPERIMENT=greenteagc go build -ldflags "\
5454
-X 'main.commit=${GIT_HASH}' \
5555
-X 'main.date=${GIT_TIME}' \
5656
-X 'main.version=${VERSION}'" ./cmd/pgwatch

docker/demo/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ COPY --from=webui-builder /webui/build ./internal/webui/build
5050

5151
# Generate protobuf and build the application
5252
RUN go generate ./api/pb/ && \
53-
CGO_ENABLED=0 go build -ldflags "\
53+
CGO_ENABLED=0 GOEXPERIMENT=greenteagc go build -ldflags "\
5454
-X 'main.commit=${GIT_HASH}' \
5555
-X 'main.date=${GIT_TIME}' \
5656
-X 'main.version=${VERSION}'" ./cmd/pgwatch

internal/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ set -x
66
GIT_HASH=$(git show -s --format=%H HEAD)
77
GIT_TIME=$(git show -s --format=%cI HEAD)
88
VERSION=$(git rev-parse --abbrev-ref HEAD)
9-
go build -ldflags "-X 'main.commit=$GIT_HASH' -X 'main.date=$GIT_TIME' -X 'main.version=$VERSION'"
9+
GOEXPERIMENT=greenteagc go build -ldflags "-X 'main.commit=$GIT_HASH' -X 'main.date=$GIT_TIME' -X 'main.version=$VERSION'"

0 commit comments

Comments
 (0)