-
Notifications
You must be signed in to change notification settings - Fork 20
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
Update main to use setup.File interfaces #21
Conversation
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.
Please use ioutil and its MakeTemp functions instead of putting an empty file under source control.
Reviewable status: 0 of 1 LGTMs obtained
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.
PTAL?
Reviewable status: 0 of 1 LGTMs obtained
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.
Reviewable status: complete! 1 of 1 LGTMs obtained
cmd/bigquery_exporter/main_test.go, line 49 at r2 (raw file):
func Test_main(t *testing.T) {
Random blank line
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.
Reviewable status: complete! 1 of 1 LGTMs obtained
cmd/bigquery_exporter/main_test.go, line 49 at r2 (raw file):
Previously, pboothe (Peter Boothe) wrote…
Random blank line
Fixed.
This change updates main to use the new setup.File interfaces and completes unit test coverage.
Note: this is a breaking change with respect to the original handling of flags. The flag package is changed from
github.com/spf13/pflag
so that we can take advantage offlagx.ArgsFromEnv
andflagx.StringArray
. As well, the separate flags for metric '--type' and '--query' filename are combined as--guage-query
. This change removes support for counter queries, but adds a TODO. Counters are a special use-case that make queries more expensive and might be suited to a different collector implementation.This change is