diff options
author | kballou <kballou@devnulllabs.io> | 2016-03-22 15:16:51 -0600 |
---|---|---|
committer | kballou <kballou@devnulllabs.io> | 2016-03-22 16:40:21 -0600 |
commit | 7c902cfadff18e93d181d3b4c0e91b68316104f4 (patch) | |
tree | e88abccb9a729b7bf22907ce8838d634baadf830 | |
parent | cdd1d2aff78b06fa5083d74bd38cbfc3301c48f2 (diff) | |
download | ex_prometheus_io-7c902cfadff18e93d181d3b4c0e91b68316104f4.tar.gz ex_prometheus_io-7c902cfadff18e93d181d3b4c0e91b68316104f4.tar.xz |
Add guard to series function
This function will not work down the chain unless this parameter is a list,
this will make sure that it comes in as a list (or will match error)
-rw-r--r-- | lib/ex_prometheus_io.ex | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ex_prometheus_io.ex b/lib/ex_prometheus_io.ex index dd47bee..43604ea 100644 --- a/lib/ex_prometheus_io.ex +++ b/lib/ex_prometheus_io.ex @@ -15,7 +15,7 @@ defmodule ExPrometheusIo do spawn_query(:range, query_opts) end - def series(matches, _opts \\ []) do + def series(matches, _opts \\ []) when is_list(matches) do spawn_query(:series, [matches]) end |