 
 (def cljs-reserved-file-names #{"deps.cljs"})
 
-(def ^:dynamic *go-import-prefix* "github.com/hraberg/cljs.go/")
+(def go-cljs-import-prefix "github.com/hraberg/cljs.go/")
+(def ^:dynamic *go-import-prefix* (zipmap '[goog
+                                            goog.string
+                                            goog.array
+                                            goog.object
+                                            js
+                                            js.Math
+                                            cljs.core
+                                            cljs.reader
+                                            clojure.data
+                                            clojure.set
+                                            clojure.string
+                                            clojure.walk
+                                            clojure.zip]
+                                          (repeat go-cljs-import-prefix)))
 (def ^:dynamic *go-return-name* nil)
 (def ^:dynamic *go-return-tag* nil)
 (def ^:dynamic *go-protocol-fn* nil)

            (emitln " return " return)
            (emits "}()")))))))

(def provided-lib? '#{goog goog.string goog.array goog.object
                      js js/Math
                      cljs.core cljs.reader
                      clojure.data clojure.set clojure.string clojure.walk clojure.zip})

(defmethod emit* :ns
  [{:keys [name requires uses imports require-macros env]}]

  (emitln "package " (last (string/split (str (munge name)) #"\.")))
  (emitln)
  (emitln "import (")
  (doseq [lib (distinct (concat (when-not (= name 'cljs.core)
                                  '[cljs.core])
                                js-base-libs
                                (map #(symbol (string/replace % #"(.+)(\..+)$" "$1")) (vals imports))
                                (vals (apply dissoc requires (keys imports))) (vals uses)))]
    (emitln "\t" (when-not (js-base-libs lib)
                   (str (string/replace (munge lib) "." "_") " "))
            (wrap-in-double-quotes
             (str (*go-import-prefix* lib)
                  (-> lib
                      (string/replace #"[._]" "/")
                      (string/replace #"[-]" "_"))))))
  (emitln ")")
  (emitln))

