aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkballou <kballou@devnulllabs.io>2016-03-22 15:16:51 -0600
committerkballou <kballou@devnulllabs.io>2016-03-22 16:40:21 -0600
commit7c902cfadff18e93d181d3b4c0e91b68316104f4 (patch)
treee88abccb9a729b7bf22907ce8838d634baadf830
parentcdd1d2aff78b06fa5083d74bd38cbfc3301c48f2 (diff)
downloadex_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.ex2
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