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

updated stim.Config options #30

Merged
merged 5 commits into from
Sep 20, 2019
Merged

updated stim.Config options #30

merged 5 commits into from
Sep 20, 2019

Conversation

lwahlmeier
Copy link
Member

Did updates to the stim.Config* calls and how we deal with the config file.

@@ -223,6 +223,8 @@ gopkg.in/alecthomas/kingpin.v3-unstable
gopkg.in/inf.v0
# gopkg.in/yaml.v2 v2.2.2
gopkg.in/yaml.v2
Copy link
Collaborator

@thorix thorix Sep 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need this version two parts?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didnt make that file so I dont know, it could be any libs or other dependencies pulling it in, thats made by go mod init/vendor

return err
}
cm := config[keys[0]].(map[interface{}]interface{})
//This is super gross, not sure of a better way to deal with this
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would agree, but I don't know how to do it better.

func init() {
home, err := homedir.Dir()
if err != nil {
defaultStimConfigFilePath = filepath.Join(os.TempDir(), ".stim", "config.yaml")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would this happen? When would this code run and there isn't a home dir? os.TempDir()

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, say a badly setup build machine or something like that with no home env, we need to do something thats the best idea I had.

Copy link
Collaborator

@thorix thorix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Maybe change the defaults for the log in the main config?

pkg/utils/filesystem.go Outdated Show resolved Hide resolved
pkg/utils/filesystem.go Outdated Show resolved Hide resolved
stim/pagerduty.go Outdated Show resolved Hide resolved
stim/config.go Show resolved Hide resolved
@lwahlmeier lwahlmeier merged commit 4ce1467 into master Sep 20, 2019
@lwahlmeier lwahlmeier deleted the configUpdates branch October 4, 2019 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants