Skip to content

Yaml parsing refacto #299

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

Merged

Conversation

alexissellier
Copy link
Contributor

Use struct instead of interface{} while parsing user queries file.
I split the function so it easier to test it.

I also added a basic test to start strengthening the code

I did not use the unmarshalled struct in the rest of the code just to be sure I do not break something. Will do it in a near future

@nouney
Copy link

nouney commented Aug 14, 2019

Please merge

@coveralls
Copy link

Coverage Status

Coverage increased (+5.07%) to 64.55% when pulling 5cf85c1 on AlexisSellier:yaml-parsing-refacto into 27d5c99 on wrouesnel:master.

@wrouesnel wrouesnel merged commit ececfde into prometheus-community:master Oct 31, 2019
ritbl referenced this pull request in heniek/postgres_exporter Mar 19, 2023
* Use struct instead of interface{} when parsing query user

* Use MappingOptions

* Split function to be more testable

* Rename function to parseUserQueries

* Start to add test about query parsing
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.

4 participants