Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed setting default values #72

Merged
merged 1 commit into from
Mar 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# Stim Changelog
## 0.3.2
### Bugfix
* Fixed setting of default values



## 0.3.1
### Improvements
Expand Down
9 changes: 5 additions & 4 deletions stim/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ import (
)

func (stim *Stim) ConfigSetDefaultValues() {
stim.ConfigSetString("kube.config.path", "secret/kubernetes/")
stim.ConfigSetString("kube.config.keyname", "kube-config")
stim.ConfigSetBool("vault.retryOnThrottle", false)
stim.ConfigSetString("vault.address", "https://127.0.0.1:8200/")
stim.config.SetDefault("kube.config.path", "secret/kubernetes/")
stim.config.SetDefault("kube.config.keyname", "kube-config")
stim.config.SetDefault("vault.retryOnThrottle", false)
stim.config.SetDefault("vault.address", "https://127.0.0.1:8200/")
}

func (stim *Stim) ConfigGetRaw(configKey string) interface{} {
Expand Down Expand Up @@ -143,6 +143,7 @@ Main:
}

func (stim *Stim) ConfigSetRaw(key string, value interface{}) error {

config := make(map[string]interface{})
sc := make(map[string]interface{})
if strings.Contains(key, ".") {
Expand Down