Skip to content

all: remove duplicate imports#2277

Merged
tonistiigi merged 6 commits into
moby:masterfrom
zchee:remove-dupimport
Aug 11, 2021
Merged

all: remove duplicate imports#2277
tonistiigi merged 6 commits into
moby:masterfrom
zchee:remove-dupimport

Conversation

@zchee

@zchee zchee commented Jul 25, 2021

Copy link
Copy Markdown
Contributor

all: remove duplicate imports.

@zchee

zchee commented Jul 25, 2021

Copy link
Copy Markdown
Contributor Author

/cc @tonistiigi

@zchee
zchee force-pushed the remove-dupimport branch from 613ca65 to 1ca460b Compare July 25, 2021 07:32
Comment thread cache/remotecache/registry/registry.go Outdated
@zchee

zchee commented Jul 26, 2021

Copy link
Copy Markdown
Contributor Author

@thaJeztah cc: @AkihiroSuda @crazy-max

As @thaJeztah suggested, I'd choiced and unified the specs-go package import alias to ocispecs. Noted also in the commit message, which means "O" pen "C" ontainer "I" nitiative image-spec/ "specs" -go/v1.
Because shorthand specs conflicted github.com/opencontainers/image-spec/specs-go such as https://github.com/moby/buildkit/pull/2277/files#diff-ee35853b147517e9f5e781474c10ed66da6990a6a7c6813338e5cfea8e68d3f9R20.

Also, upgrade the golangci-lint version to v1.41.1 to use importas linter. We can setting and validation any import aliases. such as go-digest package, See also zchee/moby-buildkit@remove-dupimport...strict-digest-import-alias.

PTAL.


Note: Currently, golangci-lint outputs a warning message which "golint has been deprecated, use revive instead". But if enabled this linter, faced some lint error a bit. So let's ignore the warning, leave to use golint for now.
If you certainly want to fix the revive lint error, I'll send another PR later.

Ref: zchee/moby-buildkit@remove-dupimport...remove-dupimport-revive

Comment thread .golangci.yml
- goimports
- golint
- govet
- importas

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

add importas and sorted alphabetically.

@zchee

zchee commented Jul 30, 2021

Copy link
Copy Markdown
Contributor Author

@thaJeztah @AkihiroSuda @crazy-max
Sorry for mentioned.
I know your busy... but have any opinions?

@tonistiigi

Copy link
Copy Markdown
Member

Needs rebase

zchee added 6 commits August 11, 2021 08:28
Signed-off-by: Koichi Shiraishi <[email protected]>
ocispecs means "O"pen "C"ontainer "I"nitiative image-spec/"specs"-go/v1
                      opencontainers          /image-spec/specs-go/v1

Signed-off-by: Koichi Shiraishi <[email protected]>
@zchee
zchee force-pushed the remove-dupimport branch from 0e02981 to 9e6ea26 Compare August 10, 2021 23:29
@zchee

zchee commented Aug 10, 2021

Copy link
Copy Markdown
Contributor Author

@tonistiigi done

@tonistiigi
tonistiigi merged commit 175e841 into moby:master Aug 11, 2021
@zchee

zchee commented Aug 11, 2021

Copy link
Copy Markdown
Contributor Author

@tonistiigi Thanks!

@zchee
zchee deleted the remove-dupimport branch August 11, 2021 06:32
@thaJeztah

Copy link
Copy Markdown
Member

Sorry for mentioned.
I know your busy... but have any opinions?

oh! looks like I missed your comment; LGTM, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants