aboutsummaryrefslogtreecommitdiff
path: root/lib/exdatadog/config.ex
blob: f686309c9fd1384fbc2b69191680030d9196166c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
defmodule Exdatadog.Config do
  @moduledoc """
  Provides helper functions for interacting with Application variables
  """

  def get_env_var(app, key, default \\ nil) do
    app
    |> Application.get_env(key, default)
    |> case do
      {:system, env_key} -> System.get_env(env_key)
      env_var -> env_var
    end
  end

end