From 8723b569658f55deac07f7a8f8fb3da07b389102 Mon Sep 17 00:00:00 2001 From: Alexander Nesterenko Date: Mon, 11 Mar 2019 20:22:36 +0200 Subject: [PATCH] Small docs improvements and fix lints Signed-off-by: Alexander Nesterenko --- cmd/helm/root.go | 2 +- cmd/helm/root_test.go | 3 ++- docs/faq.md | 2 +- docs/glossary.md | 2 +- pkg/helm/environment/default_home_dir.go | 5 +++-- pkg/helm/environment/environment.go | 3 ++- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/cmd/helm/root.go b/cmd/helm/root.go index dc066c7bb..c691f00bb 100644 --- a/cmd/helm/root.go +++ b/cmd/helm/root.go @@ -47,7 +47,7 @@ Environment: $HELM_HOME set an alternative location for Helm files. By default, these are stored in $XDG_CONFIG_DIR/helm ($HOME/.config/helm on Linux, %APPDATA%\helm on Windows and $HOME/Library/Preferences/helm on macOS). - NOTE: if there is old-style $HOME/.helm directory, it will be used. + NOTE: if default does not exist but $HOME/.helm does, the last will be used. $HELM_DRIVER set the backend storage driver. Values are: configmap, secret, memory $HELM_NO_PLUGINS disable plugins. Set HELM_NO_PLUGINS=1 to disable plugins. $KUBECONFIG set an alternative Kubernetes configuration file (default $HOME/.kube/config) diff --git a/cmd/helm/root_test.go b/cmd/helm/root_test.go index b6280b813..705dfa901 100644 --- a/cmd/helm/root_test.go +++ b/cmd/helm/root_test.go @@ -17,9 +17,10 @@ limitations under the License. package main import ( - "k8s.io/helm/pkg/helm/environment" "os" "testing" + + "k8s.io/helm/pkg/helm/environment" ) func TestRootCmd(t *testing.T) { diff --git a/docs/faq.md b/docs/faq.md index 02c5aaa84..9561eefa8 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -48,7 +48,7 @@ located by default in one of following directories: * `$HOME/.config/helm` on Linux * `$HOME/Library/Preferences/helm` on macOS * `%APPDATA%\helm` on Windows - * `$HOME/.helm` if you have used helm before 3rd release + * `$HOME/.helm` if it exists (this means you were using old version of Helm) ## Troubleshooting diff --git a/docs/glossary.md b/docs/glossary.md index 5ea8789a8..710764665 100644 --- a/docs/glossary.md +++ b/docs/glossary.md @@ -61,7 +61,7 @@ _helm home_. By default, it is located in one of these directories: * `$HOME/.config/helm` on Linux * `$HOME/Library/Preferences/helm` on OSx * `%APPDATA%\helm` on Windows - * `$HOME/.helm` if you have used helm before 3rd release + * `$HOME/.helm` if it exists (this means you were using old version of Helm) This directory contains configuration and cache data, and is created by `helm init`. diff --git a/pkg/helm/environment/default_home_dir.go b/pkg/helm/environment/default_home_dir.go index 3f2b9ed30..a3209aba4 100644 --- a/pkg/helm/environment/default_home_dir.go +++ b/pkg/helm/environment/default_home_dir.go @@ -17,10 +17,11 @@ limitations under the License. package environment import ( - "github.com/casimir/xdg-go" - "k8s.io/client-go/util/homedir" "os" "path/filepath" + + "github.com/casimir/xdg-go" + "k8s.io/client-go/util/homedir" ) // New default helm home, with different paths for different OS: diff --git a/pkg/helm/environment/environment.go b/pkg/helm/environment/environment.go index 9f4e855a6..91b7ececb 100644 --- a/pkg/helm/environment/environment.go +++ b/pkg/helm/environment/environment.go @@ -23,9 +23,10 @@ These dependencies are expressed as interfaces so that alternate implementations package environment import ( + "os" + "github.com/spf13/pflag" "k8s.io/helm/pkg/helm/helmpath" - "os" ) // EnvSettings describes all of the environment settings.