Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/bmf-san/goemon

A dotenv built with golang.
https://github.com/bmf-san/goemon

dotenv golang

Last synced: about 1 month ago
JSON representation

A dotenv built with golang.

Awesome Lists containing this project

README

        

# goemon
[![CircleCI](https://circleci.com/gh/bmf-san/goemon/tree/master.svg?style=svg)](https://circleci.com/gh/bmf-san/goemon/tree/master)

A dotenv built with golang.

# Installation
`go get github.com/bmf-san/goemon`

# Get Started
Add a .env file in your project.

```
FOO=foo
BAR=bar
```

Then you can load env file like this.

```golang
package main

import (
"fmt"
"os"

"github.com/bmf-san/goemon"
)

func main() {
if err := dotenv.LoadEnv(); err != nil {
fmt.Printf("%s", err)
}

fmt.Println(os.Getenv("FOO")) // foo
fmt.Println(os.Getenv("BAR")) // bar
}
```