 
 (defmacro import-def
   "Import a single function or var:
-  ```clj
+  ```
   (import-def a b) => (def b a/b)
   ```"
   [from-ns def-name]

(ns cmr.client.common.util
  (:require
   [cmr.client.common.const :as const]
   #?(:clj [clojure.core.async :as async :refer [go go-loop]]
      :cljs [cljs.core.async :as async]))
  #?(:cljs (:require-macros [cljs.core.async.macros :refer [go go-loop]])))

(def default-environment-type :prod)

(defn get-endpoint
  [environment-type service-key]
  (->> (environment-type const/deployment-type)
       (vector service-key)
       (get-in const/endpoints)
       (str (environment-type const/hosts))))

(defn get-default-endpoint
  [options service-key]
  (or (:endpoint options)
      (get-endpoint default-environment-type service-key)))

(defn parse-endpoint
  ([endpoint]
   (parse-endpoint endpoint nil))
  ([endpoint service-key]


   This works for vars and functions, but not macros. Uses the same syntax as
   `potemkin.namespaces/import-vars`, namely:
   ```
   (import-vars
     [m.n.ns1 a b]
     [x.y.ns2 d e f])
