Skip to content

Commit

Permalink
made private ExpandHomeDir to expandHomeDir
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Ulferts committed Feb 28, 2019
1 parent 9313e4a commit c4604ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dcos/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ type ConfigManagerOpts struct {
Dir string
}

func ExpandHomeDir() string {
func expandHomeDir() string {
dir, err := homedir.Expand(dcosDefaultFolder)
if err != nil {
return dcosDefaultFolder
Expand Down Expand Up @@ -477,7 +477,7 @@ func NewConfigManager(opts *ConfigManagerOpts) *ConfigManager {
}

if opts.Dir == "" {
opts.Dir = ExpandHomeDir()
opts.Dir = expandHomeDir()
}

return &ConfigManager{
Expand Down
2 changes: 1 addition & 1 deletion dcos/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ func TestConfigAttach(t *testing.T) {
func TestExpandHomedir(t *testing.T) {
homedir.DisableCache = true
os.Setenv("HOME", "/home/testuser")
dir := ExpandHomeDir()
dir := expandHomeDir()

require.Equal(t, dir, "/home/testuser/.dcos", "wrong return")
}

0 comments on commit c4604ec

Please sign in to comment.