Skip to content

Instantly share code, notes, and snippets.

@joho
Last active September 5, 2018 00:34
Show Gist options
  • Save joho/e5ce5415f75feac3c7dedc8ea38611cb to your computer and use it in GitHub Desktop.
Save joho/e5ce5415f75feac3c7dedc8ea38611cb to your computer and use it in GitHub Desktop.
import _ "github.com/joho/godotenv/autoload"
package main
import "fmt"
import "os"
import _ "github.com/joho/godotenv/autoload"
func main() {
fmt.Println(os.Getenv("MAIL_SECRET")) // xTvDqw7
fmt.Println(os.Getenv("OTHER_SECRET")) // foo\
}
require "dotenv/load"
puts ENV["MAIL_SECRET"] # => xTvDqw
puts ENV["OTHER_SECRET"] # => foo$bar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment