Skip to content

Add go fix to CI, rm old build tags#148

Merged
thaJeztah merged 2 commits into
moby:mainfrom
kolyshkin:build
Sep 17, 2024
Merged

Add go fix to CI, rm old build tags#148
thaJeztah merged 2 commits into
moby:mainfrom
kolyshkin:build

Conversation

@kolyshkin
Copy link
Copy Markdown
Collaborator

@kolyshkin kolyshkin commented Aug 13, 2024

This removes old (Go < 1.17) build tags, and makes sure CI runs go fix (which, unfortunately, is not part of any linter).

@kolyshkin kolyshkin marked this pull request as ready for review August 13, 2024 19:18
To not repeat shell's for loop for multiple targets, add "foreach"
target and use it.

It can also be used from the command line:

$ make foreach
Usage: make foreach CMD="commands to run for every package"
make: *** [Makefile:17: foreach] Error 1

$ make foreach CMD="gofmt -w ."
set -eu; \
for p in mountinfo mount sequential signal symlink user userns ; do \
	(cd $p; gofmt -w .;) \
done

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Add running "go fix" to CI.

Also, remove tidy target from the Makefile (developers hardly use it),
replacing it with

	make foreach CMD="go mod tidy"

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Copy Markdown
Collaborator Author

@thaJeztah PTAL

Copy link
Copy Markdown
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thaJeztah thaJeztah merged commit 8824f91 into moby:main Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants