broke out the preferences and config (#1362)

* broke out the preferences and config

* resolved UTs

* resolved golangCI comments

* resolved some e2e tests

* resolved error message in tests

* Resolved codeclimate issue

* resolved the e2e_test failure

* resolved some comments on the PR

* renamed GlobalConfig to Preference

* made the logic of unset simpler

* reverted the test changed

* use log instead of fmt for output

* resolved e2e test

* use log.Info instead of log.Println
This commit is contained in:
girish ramnani
2019-03-04 22:26:24 +05:30
committed by GitHub
parent 7fef28a7c9
commit 2a47599245
25 changed files with 2535 additions and 2173 deletions

View File

@@ -7,11 +7,11 @@ import (
"github.com/golang/glog"
"github.com/posener/complete"
"github.com/redhat-developer/odo/pkg/config"
"github.com/redhat-developer/odo/pkg/odo/cli"
"github.com/redhat-developer/odo/pkg/odo/cli/version"
"github.com/redhat-developer/odo/pkg/odo/util"
"github.com/redhat-developer/odo/pkg/odo/util/completion"
"github.com/redhat-developer/odo/pkg/preference"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
)
@@ -54,7 +54,7 @@ func main() {
// Call commands
// checking the value of updatenotification in config
// before proceeding with fetching the latest version
cfg, err := config.New()
cfg, err := preference.New()
if err != nil {
util.LogErrorAndExit(err, "")
}