-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUG] Addressing Version Check Issue
Fixes #221 ChangeLog: - Removed Dependency of config for version info - Updating documentation for context - Refactoring and removing api calls that are no longer needed
- Loading branch information
1 parent
7503ab7
commit bf5ff3c
Showing
23 changed files
with
107 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package support | ||
|
||
import ( | ||
"github.com/esnet/gdg/internal/config" | ||
appconfig "github.com/esnet/gdg/internal/log" | ||
"github.com/spf13/cobra" | ||
"os" | ||
) | ||
|
||
// InitConfiguration Loads configuration, and setups fail over case | ||
func InitConfiguration(cmd *cobra.Command) { | ||
configOverride, _ := cmd.Flags().GetString("config") | ||
if DefaultConfig == "" { | ||
raw, err := os.ReadFile("config/importer-example.yml") | ||
if err == nil { | ||
DefaultConfig = string(raw) | ||
} else { | ||
DefaultConfig = "" | ||
} | ||
} | ||
|
||
//Registers sub CommandsList | ||
config.InitConfig(configOverride, DefaultConfig) | ||
appconfig.InitializeAppLogger(os.Stdout, os.Stderr, config.Config().IsDebug()) | ||
|
||
//Validate current configuration | ||
config.Config().GetDefaultGrafanaConfig().Validate() | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package cli | ||
package tools | ||
|
||
import ( | ||
"context" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
package main | ||
|
||
import ( | ||
_ "embed" | ||
"github.com/esnet/gdg/cli" | ||
"github.com/esnet/gdg/cli/support" | ||
"log" | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.