Skip to content

Instantly share code, notes, and snippets.

@pjstadig
Created February 25, 2022 13:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pjstadig/c7b8dc2a7cb2d164fd6169b5291837c8 to your computer and use it in GitHub Desktop.
Save pjstadig/c7b8dc2a7cb2d164fd6169b5291837c8 to your computer and use it in GitHub Desktop.
Plain functions
(ns stadig.main
(:require
[stadig.storage.s3 :as storage]))
(defn -main
[& args]
;; ... initialize some things ...
(let [access-key (System/getenv "AWS_ACCESS_KEY_ID")
secret-key (System/getenv "AWS_SECRET_ACCESS_KEY")
storage-conn (storage/connect access-key secret-key)]
(try
;; ... initialize some more things, or maybe just do stuff ...
(finally
(storage/close storage-conn)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment