Skip to content

Commit

Permalink
up: breaking - remove all on pkg dotnev, please use gookit/ini/v2/dotenv
Browse files Browse the repository at this point in the history
  • Loading branch information
inhere committed Oct 9, 2022
1 parent 02cd35d commit 5aa4a79
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 170 deletions.
13 changes: 0 additions & 13 deletions dotnev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,3 @@

Package `dotenv` that supports importing data from files (eg `.env`) to ENV

## Usage

```go
err := dotenv.Load("./", ".env")
// err := dotenv.LoadExists("./", ".env")

val := dotenv.Get("ENV_KEY")
// Or use
// val := os.Getenv("ENV_KEY")

// with default value
val := dotenv.Get("ENV_KEY", "default value")
```
63 changes: 0 additions & 63 deletions dotnev/dotenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,3 @@
//
// Deprecated: please use github.com/gookit/ini/v2/dotenv
package dotnev

import (
"github.com/gookit/ini/v2/dotenv"
)

// LoadedData get all loaded data by dontenv
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func LoadedData() map[string]string {
return dotenv.LoadedData()
}

// ClearLoaded clear the previously set ENV value
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func ClearLoaded() {
dotenv.ClearLoaded()
}

// DontUpperEnvKey don't change key to upper on set ENV
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func DontUpperEnvKey() {
dotenv.DontUpperEnvKey()
}

// Load parse .env file data to os ENV.
//
// Usage:
//
// dotenv.Load("./", ".env")
//
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func Load(dir string, filenames ...string) (err error) {
return dotenv.Load(dir, filenames...)
}

// LoadExists only load on file exists
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func LoadExists(dir string, filenames ...string) error {
return dotenv.LoadExists(dir, filenames...)
}

// LoadFromMap load data from given string map
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func LoadFromMap(kv map[string]string) (err error) {
return dotenv.LoadFromMap(kv)
}

// Get get os ENV value by name
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func Get(name string, defVal ...string) (val string) {
return dotenv.Get(name, defVal...)
}

// Bool get a bool value by key
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func Bool(name string, defVal ...bool) (val bool) {
return dotenv.Bool(name, defVal...)
}

// Int get a int value by key
// Deprecated: please use github.com/gookit/ini/v2/dotenv
func Int(name string, defVal ...int) (val int) {
return dotenv.Int(name, defVal...)
}
90 changes: 0 additions & 90 deletions dotnev/dotenv_test.go

This file was deleted.

2 changes: 0 additions & 2 deletions dotnev/testdata/.env

This file was deleted.

2 changes: 0 additions & 2 deletions dotnev/testdata/error.ini

This file was deleted.

0 comments on commit 5aa4a79

Please sign in to comment.