Skip to content

ForSeason/env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

How to use

Set .env file in the root of your workspace. This file will be loaded while this package is imported.

If initialization fails, the package will print error in log and clear all data that has been loaded in memory .

Initializer use = as seprator between key and value. That is to say, part before first = is key, and the rest part is value. It is ok to use empty value.

Initializer will ignore empty lines and lines begin with #.

Sample .env file

# "KEY" => "VALUE"
KEY=VALUE

# "KEY " => " VALUE"
KEY = VALUE

# "APP_KEY" => "123/=123"
APP_KEY=123/=123

About

env loader for golang

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages