Skip to content

Commit 5cd502c

Browse files
committed
user: require go1.21 or higher
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent a40602b commit 5cd502c

File tree

2 files changed

+13
-7
lines changed

2 files changed

+13
-7
lines changed

Diff for: Makefile

+12-6
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ clean:
1616
test: test-local
1717
set -eu; \
1818
for p in $(PACKAGES); do \
19-
(cd $$p; go test $(RUN_VIA_SUDO) -v .); \
19+
if $p = user && go version | grep -qv go1.18; then \
20+
(cd $$p; go test $(RUN_VIA_SUDO) -v .); \
21+
fi \
2022
done
2123

2224
.PHONY: tidy
2325
tidy:
2426
set -eu; \
25-
for p in $(PACKAGES); do \
26-
(cd $$p; go mod tidy); \
27+
for p in $(PACKAGES); do \
28+
if $p = user && go version | grep -qv go1.18; then \
29+
(cd $$p; go mod tidy); \
30+
fi \
2731
done
2832

2933
# Test the mount module against the local mountinfo source code instead of the
@@ -42,9 +46,11 @@ lint: $(BINDIR)/golangci-lint
4246
$(BINDIR)/golangci-lint version
4347
set -eu; \
4448
for p in $(PACKAGES); do \
45-
(cd $$p; \
46-
go mod download; \
47-
../$(BINDIR)/golangci-lint run); \
49+
if $p = user && go version | grep -qv go1.18; then \
50+
(cd $$p; \
51+
go mod download; \
52+
../$(BINDIR)/golangci-lint run); \
53+
fi \
4854
done
4955

5056
$(BINDIR)/golangci-lint: $(BINDIR)

Diff for: user/go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/moby/sys/user
22

3-
go 1.18
3+
go 1.21
44

55
require golang.org/x/sys v0.1.0

0 commit comments

Comments
 (0)