Skip to content
/ env Public

Package to provide configuration as environment variables for 12 factor applications

License

Notifications You must be signed in to change notification settings

nitintf/env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ENV

env is a simple package to get enviorment variables from env files. you can also provide default value as fallback when env variable is not found in env files

Basic Usage

package main

import (
	"fmt"
	"os"

	"github.com/nitintf/env/v1"
)

var PORT = env.Int("PORT", 3000)

func main() {
	err := env.Parse()

	if err != nil {
		fmt.Print(err.Error())
		os.Exit(0)
	}

	fmt.Println("PORT", *PORT)
}

About

Package to provide configuration as environment variables for 12 factor applications

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published