cli/cli-plugins/manager
Sebastiaan van Stijn 091421f13f
cli-plugins/manager: getPluginDirs: remove redundant error-return
This function returned an error (if any) from [config.Path]. However, the
only situation in which an error could be returned was if the given path
to append to `config.Dir` was outside of the config directory. This can
only happen if the path to append would try to traverse directories (e.g.,
passing `../../cli-plugins`).

Given that we're passing a hard-coded value, that would not be the case,
so we can simplify the code to join the path directly, and don't have to
handle errors.

[config.Path]: 2d74733942/cli/config/config.go (L100-L107)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-03-18 12:10:38 +01:00
..
annotations.go move cli-plugins annotation consts to a separate package 2025-03-07 12:46:11 +01:00
candidate.go move cli-plugins metadata types/consts to a separate package 2025-03-07 12:38:06 +01:00
candidate_test.go move cli-plugins metadata types/consts to a separate package 2025-03-07 12:38:06 +01:00
cobra.go move cli-plugins annotation consts to a separate package 2025-03-07 12:46:11 +01:00
cobra_test.go cli-plugins: merge OTEL_RESOURCE_ATTRIBUTES environment variable 2025-02-18 12:06:46 -06:00
error.go cli-plugins/manager: use stdlib errors, and minor cleanup 2025-03-07 19:14:32 +01:00
error_test.go linting: fmt.Errorf can be replaced with errors.New (perfsprint) 2024-06-10 21:19:31 +02:00
hooks.go cli-plugins/manager: getPluginDirs: remove redundant error-return 2025-03-18 12:10:38 +01:00
hooks_test.go plugins/hooks: Don't show empty hooks 2024-05-20 11:20:39 +02:00
manager.go cli-plugins/manager: getPluginDirs: remove redundant error-return 2025-03-18 12:10:38 +01:00
manager_test.go cli-plugins/manager: getPluginDirs: remove redundant error-return 2025-03-18 12:10:38 +01:00
manager_unix.go cli-plugins/manager: add GoDoc for getPluginDirs, defaultSystemPluginDirs 2024-06-19 14:02:40 +02:00
manager_windows.go cli-plugins/manager: add GoDoc for getPluginDirs, defaultSystemPluginDirs 2024-06-19 14:02:40 +02:00
metadata.go move cli-plugins metadata types/consts to a separate package 2025-03-07 12:38:06 +01:00
plugin.go cli-plugins/manager: use stdlib errors, and minor cleanup 2025-03-07 19:14:32 +01:00
suffix_unix.go remove pre-go1.17 build-tags 2023-05-05 18:23:03 +02:00
suffix_windows.go cli-plugins/manager: use stdlib errors, and minor cleanup 2025-03-07 19:14:32 +01:00
telemetry.go move cli-plugins annotation consts to a separate package 2025-03-07 12:46:11 +01:00