-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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()
There was a problem hiding this comment.
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.
There was a problem hiding this 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?
Did updates to the stim.Config* calls and how we deal with the config file.