Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added linter and removed deprecated and unused packages #357

Merged
merged 14 commits into from
Apr 10, 2024

Conversation

enrichman
Copy link
Contributor

@enrichman enrichman commented Apr 8, 2024

Ref:


This PR adds a Github Action that perform a lint, test and build to quick check deprecations and errors.

Edited the golangci-lint config to run the default linters.
Removed "io/ioutil" deprecated package, removed some unused funcs, removed unused prompt command (see #115), fixed error checking.

Removed direct dependencies:

github.com/c-bata/go-prompt v0.2.6
github.com/docker/docker v1.6.1
github.com/gorilla/websocket v1.4.2
github.com/patrickmn/go-cache v2.1.0+incompatible

The "new" golang.org/x/text v0.11.0 dependency was already present as an indirect dep.

@enrichman enrichman changed the title Added CI Github action Added linter and removed deprecated and unused packages Apr 9, 2024
@enrichman enrichman marked this pull request as ready for review April 9, 2024 13:28
@enrichman enrichman changed the base branch from ci-action to v2.9 April 9, 2024 13:29
@enrichman enrichman linked an issue Apr 9, 2024 that may be closed by this pull request
@enrichman enrichman self-assigned this Apr 9, 2024
bigkevmcd
bigkevmcd previously approved these changes Apr 9, 2024
Copy link

@bigkevmcd bigkevmcd left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup!

Neither of the two issues are blockers.

cmd/server.go Outdated Show resolved Hide resolved
cmd/cluster.go Outdated Show resolved Hide resolved
@enrichman
Copy link
Contributor Author

@bigkevmcd thanks for the review! I also found two more unused/old commands.

@enrichman enrichman requested a review from bigkevmcd April 9, 2024 14:42
Copy link

@andreas-kupries andreas-kupries left a comment

Choose a reason for hiding this comment

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

lgtm

@enrichman enrichman merged commit 0e8a110 into rancher:v2.9 Apr 10, 2024
2 checks passed
enrichman added a commit to enrichman/cli that referenced this pull request Apr 10, 2024
* Create go.yml

* updated golangci config file

* renamed action file

* removed unused prompt command

* fixed SA6005 (staticcheck): used strings.EqualFold

* removed unused monitor package

* removed unused funcs and fields

* fixed SA1019 (staticcheck): removed deprecations

* added missing error checking

* fixed linter

* removed unused (and unimplemented) commands

* added error to getClusterK8sOptions

* oneliner err check in displayListServers

* removed unused docker dependency
enrichman added a commit to enrichman/cli that referenced this pull request Apr 10, 2024
* Create go.yml

* updated golangci config file

* renamed action file

* removed unused prompt command

* fixed SA6005 (staticcheck): used strings.EqualFold

* removed unused monitor package

* removed unused funcs and fields

* fixed SA1019 (staticcheck): removed deprecations

* added missing error checking

* fixed linter

* removed unused (and unimplemented) commands

* added error to getClusterK8sOptions

* oneliner err check in displayListServers

* removed unused docker dependency
enrichman added a commit that referenced this pull request Apr 11, 2024
…ages (#357) (#359)

* Added linter and removed deprecated and unused packages (#357)

* Create go.yml

* updated golangci config file

* renamed action file

* removed unused prompt command

* fixed SA6005 (staticcheck): used strings.EqualFold

* removed unused monitor package

* removed unused funcs and fields

* fixed SA1019 (staticcheck): removed deprecations

* added missing error checking

* fixed linter

* removed unused (and unimplemented) commands

* added error to getClusterK8sOptions

* oneliner err check in displayListServers

* removed unused docker dependency

* fixed linting issues
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.

[CLI] Update Go dependencies in rancher/cli
3 participants