Skip to content

ralvescosta/dotenv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DotEnv Package

This GoLang package was create to handle only .env files.

The idea of ​​this package is to get the variables from the file and register them in the variable runtime environments.

Installation

go get -u github.com/ralvescosta/dotenv

Example

package main

import (
  "fmt"
  "os"
  
  "github.com/ralvescosta/dotenv"
)

func main() {
  dotenv.Configure(".env")

  fmt.Println(os.Getenv("SOME_ENV"))
}