-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
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
There are no files selected for viewing
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() | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
package cli | ||
package tools | ||
|
||
import ( | ||
"context" | ||
|
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.