Skip to content

Conversation

@davidcheung
Copy link
Contributor

No description provided.

@davidcheung davidcheung requested review from bmonkman and dtoki June 16, 2020 04:20
// FIXME: what is a good way to dynamically modify partial data of a struct
// current just marashing to yaml, then unmarshaling into the base struct
yamlContent, _ := yaml.Marshal(promptsValues)
yaml.Unmarshal(yamlContent, &credentials)
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm yeah that's not ideal..

Copy link
Contributor

Choose a reason for hiding this comment

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

Probably okay for now though..

yamlContent, _ := yaml.Marshal(promptsValues)
yaml.Unmarshal(yamlContent, &credentials)

globalconfig.Save(credentials)
Copy link
Contributor

Choose a reason for hiding this comment

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

The name of this function doesn't make it very clear that it's actually going to save the file. Maybe rename or just return the credentials and let the caller save it?

@davidcheung davidcheung merged commit 10d851b into master Jun 17, 2020
@davidcheung davidcheung deleted the global-cred-prompt branch June 17, 2020 18:15
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.

3 participants