Skip to content
/ dotenv Public

Load environment variables from .env file and start using secrets!

Notifications You must be signed in to change notification settings

jaavier/dotenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

HOW TO USE

Get the latest version of this module running go get -d github.com/jaavier/dotenv in your project directory

package example

import (
	"fmt"
	"os"

	"github.com/jaavier/dotenv"
)

func main() {
	if err := dotenv.Load(".env"); err != nil {
		fmt.Println(err)
	} else {
		fmt.Println(os.Getenv("YOUR_SECRET_KEY_HERE"))
	}
}