mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-11-02 06:47:34 +00:00
Automatic merge from submit-queue (batch tested with PRs 51031, 51705, 51888, 51727, 51684). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.. kubectl: Fix golint warnings for plugins/* **What this PR does / why we need it**: We currently have an entry in `hack/.golint_failures` for `pkg/kubectl/plugins`. If we lint the files in `plugins/` then we can safely remove this entry. `golint` emits the following warnings (only one of each type shown) ``` exported method EnvList.Slice should have comment or be unexported error var IncompletePluginError should have name of the form ErrFoo func name will be used as plugins.PluginsEnvVarPluginLoader by other packages, and that stutters; consider calling this EnvVarPluginLoader ``` This PR clears all `golint` warnings from `kubectl/plugins/`. 1. Remove entry from `hack/.golint_failures` 2. Add missing documentation to exported types and functions. 3. Rename error variables to `ErrFoo`. 4. Rename `PluginsEnvVarPluginLoader` to `KubectlPluginsPathPluginLoader` (mirrors env var name). 5. Rename `XDGDataPluginLoader` to `XDGDataDirsPluginLoader` (to make uniform change above). **Special notes for your reviewer**: Felt a bit dirty doing this cleanup because the code in `plugins/` is particularly clean and well written already. **Release note**: ```release-note NONE ``` /sig cli /kind cleanup