An open API service indexing awesome lists of open source software.

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.

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 main

import (
"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
```