Skip to content

Commit b310eec

Browse files
Andreas PR comments
1 parent 6d79eec commit b310eec

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

cmd/atlas/atlas.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To learn more, see our documentation: https://www.mongodb.com/docs/atlas/cli/sta
5050

5151
// loadConfig reads in config file and ENV variables if set.
5252
func loadConfig() (*config.Profile, error) {
53-
configStore, initErr := config.LoadViperStore(afero.NewOsFs())
53+
configStore, initErr := config.NewViperStore(afero.NewOsFs())
5454

5555
if initErr != nil {
5656
return nil, fmt.Errorf("error loading config: %w. Please run `atlas auth login` to reconfigure your profile", initErr)

internal/config/viper_store.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ import (
2929
"github.com/spf13/viper"
3030
)
3131

32+
// ViperConfigStore implements the config.Store interface
3233
type ViperConfigStore struct {
3334
viper viper.Viper
3435
configDir string
3536
fs afero.Fs
3637
}
3738

38-
// / ViperConfigStore specific methods
39-
func LoadViperStore(fs afero.Fs) (*ViperConfigStore, error) {
39+
// ViperConfigStore specific methods
40+
func NewViperStore(fs afero.Fs) (*ViperConfigStore, error) {
4041
configDir, err := CLIConfigHome()
4142
if err != nil {
4243
return nil, err
@@ -95,7 +96,7 @@ func (s *ViperConfigStore) Filename() string {
9596
return ViperConfigStoreFilename(s.configDir)
9697
}
9798

98-
/// ConfigStore implementation
99+
// ConfigStore implementation
99100

100101
func (s *ViperConfigStore) Save() error {
101102
exists, err := afero.DirExists(s.fs, s.configDir)

0 commit comments

Comments
 (0)