Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
0d464cac
Commit
0d464cac
authored
Aug 31, 2017
by
tcharding
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename XDGDataPluginLoader to be uniform
parent
91eaa8a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
factory_builder.go
pkg/kubectl/cmd/util/factory_builder.go
+1
-1
loader.go
pkg/kubectl/plugins/loader.go
+2
-2
No files found.
pkg/kubectl/cmd/util/factory_builder.go
View file @
0d464cac
...
...
@@ -183,7 +183,7 @@ func (f *ring2Factory) PluginLoader() plugins.PluginLoader {
return
plugins
.
KubectlPluginsPathPluginLoader
()
}
return
plugins
.
TolerantMultiPluginLoader
{
plugins
.
XDGDataPluginLoader
(),
plugins
.
XDGData
Dirs
PluginLoader
(),
plugins
.
UserDirPluginLoader
(),
}
}
...
...
pkg/kubectl/plugins/loader.go
View file @
0d464cac
...
...
@@ -143,11 +143,11 @@ func KubectlPluginsPathPluginLoader() PluginLoader {
return
PathFromEnvVarPluginLoader
(
"KUBECTL_PLUGINS_PATH"
)
}
// XDGDataPluginLoader returns a PluginLoader that loads plugins from one or more
// XDGData
Dirs
PluginLoader returns a PluginLoader that loads plugins from one or more
// directories specified by the XDG system directory structure spec in the
// XDG_DATA_DIRS env var, plus the "kubectl/plugins/" suffix. According to the
// spec, if XDG_DATA_DIRS is not set it defaults to "/usr/local/share:/usr/share".
func
XDGDataPluginLoader
()
PluginLoader
{
func
XDGData
Dirs
PluginLoader
()
PluginLoader
{
envVarName
:=
"XDG_DATA_DIRS"
if
len
(
os
.
Getenv
(
envVarName
))
>
0
{
return
PathFromEnvVarPluginLoader
(
envVarName
,
"kubectl"
,
"plugins"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment