https://github.com/josestg/kindenv
Set of constants for the environment mode.
https://github.com/josestg/kindenv
Last synced: about 1 month ago
JSON representation
Set of constants for the environment mode.
- Host: GitHub
- URL: https://github.com/josestg/kindenv
- Owner: josestg
- License: apache-2.0
- Created: 2024-02-18T12:14:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-28T12:48:49.000Z (about 1 year ago)
- Last Synced: 2025-01-31T06:47:09.172Z (3 months ago)
- Language: Go
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kindenv
Set of constants for the environment mode.
## Installation
```bash
go get github.com/josestg/kindenv
```## Usage
```go
package mainimport (
"fmt"
"os""github.com/josestg/kindenv"
)func main() {
env, err := kindenv.Parse(os.Getenv("APP_ENV"))
if err != nil {
panic(err)
}
if env < kindenv.Release {
fmt.Println("verbose mode")
} else {
fmt.Println("quiet mode")
}
}
``````shell
APP_ENV=develop go run main.go
# verbose mode
```