Skip to content

Commit fc5d5c1

Browse files
authored
Merge pull request #22 from Clever/INFRANG-6876
[INFRANG-6876] Upgrade to go 1.24
2 parents 569d8b0 + d96ba2c commit fc5d5c1

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ jobs:
33
build:
44
working_directory: ~/go/src/github.com/Clever/mgohttp
55
docker:
6-
- image: cimg/go:1.21
6+
- image: cimg/go:1.24
77
- image: circleci/mongo:3.2.20-jessie-ram
88
environment:
99
GOPRIVATE: github.com/Clever/*

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include golang.mk
44
.PHONY: test $(PKGS)
55
SHELL := /bin/bash
66
PKGS = $(shell go list ./... | grep -v /vendor)
7-
$(eval $(call golang-version-check,1.21))
7+
$(eval $(call golang-version-check,1.24))
88

99
test: $(PKGS)
1010

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/Clever/mgohttp
22

3-
go 1.21
3+
go 1.24
44

55
require (
66
github.com/opentracing/opentracing-go v1.1.0

golang.mk

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This is the default Clever Golang Makefile.
22
# It is stored in the dev-handbook repo, github.com/Clever/dev-handbook
33
# Please do not alter this file directly.
4-
GOLANG_MK_VERSION := 1.2.1
4+
GOLANG_MK_VERSION := 1.3.1
55

66
SHELL := /bin/bash
77
SYSTEM := $(shell uname -a | cut -d" " -f1 | tr '[:upper:]' '[:lower:]')
@@ -48,7 +48,7 @@ golang-ensure-curl-installed:
4848
# We pin its version because an update could add a new lint check which would make
4949
# previously passing tests start failing without changing our code.
5050
# this package is deprecated and frozen
51-
# Infra recomendation is to eventaully move to https://github.com/golangci/golangci-lint so don't fail on linting error for now
51+
# Infra recommendation is to eventually move to https://github.com/golangci/golangci-lint so don't fail on linting error for now
5252
GOLINT := $(GOPATH)/bin/golint
5353
$(GOLINT):
5454
go install -mod=readonly golang.org/x/lint/golint@738671d3881b9731cc63024d5d88cf28db875626
@@ -159,17 +159,28 @@ $(call golang-vet,$(1))
159159
$(call golang-test-strict-cover,$(1))
160160
endef
161161

162-
# golang-build: builds a golang binary. ensures CGO build is done during CI. This is needed to make a binary that works with a Docker alpine image.
162+
# golang-build: builds a golang binary
163163
# arg1: pkg path
164164
# arg2: executable name
165165
define golang-build
166166
@echo "BUILDING $(2)..."
167-
@if [ -z "$$CI" ]; then \
168-
go build -o bin/$(2) $(1); \
169-
else \
170-
echo "-> Building CGO binary"; \
171-
CGO_ENABLED=0 go build -installsuffix cgo -o bin/$(2) $(1); \
172-
fi;
167+
@CGO_ENABLED=0 go build -o bin/$(2) $(1);
168+
endef
169+
170+
# golang-debug-build: builds a golang binary with debugging capabilities
171+
# arg1: pkg path
172+
# arg2: executable name
173+
define golang-debug-build
174+
@echo "BUILDING $(2) FOR DEBUG..."
175+
@CGO_ENABLED=0 go build -gcflags="all=-N -l" -o bin/$(2) $(1);
176+
endef
177+
178+
# golang-cgo-build: builds a golang binary with CGO
179+
# arg1: pkg path
180+
# arg2: executable name
181+
define golang-cgo-build
182+
@echo "BUILDING $(2) WITH CGO ..."
183+
@CGO_ENABLED=1 go build -installsuffix cgo -o bin/$(2) $(1);
173184
endef
174185

175186
# golang-setup-coverage: set up the coverage file

0 commit comments

Comments
 (0)