Skip to content

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