Small correction to code in the README.

This commit is contained in:
Mark Wolfe 2013-09-03 18:34:37 +10:00
parent 05b73c4383
commit 4392e21bf6

View File

@ -26,15 +26,18 @@ SECRET_KEY=YOURSECRETKEYGOESHERE
Then in your Go app you can do something like Then in your Go app you can do something like
```go ```go
package main
import ( import (
"github.com/joho/godotenv" "github.com/joho/godotenv"
"log"
"os" "os"
) )
func main() { func main() {
err := godotenv.Load() err := godotenv.Load()
if err != nil { if err != nil {
os.Fatal("Error loading .env file") log.Fatal("Error loading .env file")
} }
s3Bucket := os.Getenv("S3_BUCKET") s3Bucket := os.Getenv("S3_BUCKET")