From ee39a22e0f281b6189fa53071219b1b4518ba9d2 Mon Sep 17 00:00:00 2001 From: "Adam D. Cornett" Date: Wed, 20 Apr 2022 07:40:40 -0700 Subject: [PATCH] removing pyxis host and api key from viper in init since they are gathered in different way now Signed-off-by: Adam D. Cornett --- cmd/check_container.go | 2 +- cmd/utils.go | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/cmd/check_container.go b/cmd/check_container.go index fb3390a5..5918debb 100644 --- a/cmd/check_container.go +++ b/cmd/check_container.go @@ -162,7 +162,7 @@ var checkContainerCmd = &cobra.Command{ // establish a pyxis client. apiToken := viper.GetString("pyxis_api_token") - pyxisClient := pyxis.NewPyxisClient(viper.GetString("pyxis_host"), apiToken, projectId, &http.Client{Timeout: 60 * time.Second}) + pyxisClient := pyxis.NewPyxisClient(pyxisHost, apiToken, projectId, &http.Client{Timeout: 60 * time.Second}) // get the project info from pyxis certProject, err := pyxisClient.GetProject(ctx) diff --git a/cmd/utils.go b/cmd/utils.go index 9b74d385..fefda5f3 100644 --- a/cmd/utils.go +++ b/cmd/utils.go @@ -46,10 +46,6 @@ func initConfig() { // Set up scorecard wait time default viper.SetDefault("scorecard_wait_time", DefaultScorecardWaitTime) - - // Set up pyxis host - viper.SetDefault("pyxis_host", certification.DefaultPyxisHost) - viper.SetDefault("pyxis_api_token", "") } // preRunConfig is used by cobra.PreRun in all non-root commands to load all necessary configurations