Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
deeper-x authored May 21, 2024
1 parent 0ab7bb6 commit aee0d7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ package main

import (
"fmt"
"github.com/deeper-x/goenv"
gde "github.com/deeper-x/goenv"
)


func main() {
cfo, err := goenv.New()
cfo, err := gde.New(".env")
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -57,7 +57,7 @@ go test -v ./...

Build file object:
```golang
efo, err := goenv.New() // <-- access default .env file in current dir, or New("./assets/.env") for custom file path
efo, err := gde.New() // <-- access default .env file in current dir, or New("./assets/.env") for custom file path
if err != nil {
panic(err)
}
Expand All @@ -74,7 +74,7 @@ fmt.Println(fc)

Access .env parameters:
```golang
v, err = efo.Get("USERNAME")
v, err = cfo.Get("USERNAME")
if err == nil {
panic("...handle error...")
}
Expand Down

0 comments on commit aee0d7e

Please sign in to comment.