Skip to content

Commit

Permalink
chore(release): bumped version to v1.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
whatwewant committed Jul 22, 2022
1 parent b383311 commit a807426
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion dotenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

// Load loads the .env file into the environment.
func Load(value interface{}, filenames ...string) error {
if err := godotenv.Load(filenames...); err != nil {
if err := LoadToEnv(filenames...); err != nil {
return err
}

Expand All @@ -21,6 +21,11 @@ func Load(value interface{}, filenames ...string) error {
return nil
}

// LoadToEnv loads the .env file into environment.
func LoadToEnv(filenames ...string) error {
return godotenv.Load(filenames...)
}

// Get gets the value of the given key from system environment.
func Get(key string, defaultValue ...string) string {
if len(defaultValue) > 1 {
Expand Down
4 changes: 4 additions & 0 deletions version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package dotenv

// Version is the current version of the package.
var Version = "1.2.0"

0 comments on commit a807426

Please sign in to comment.