Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/bmf-san/goemon
- Owner: bmf-san
- License: mit
- Created: 2019-10-01T04:09:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-01T05:06:14.000Z (about 4 years ago)
- Last Synced: 2024-10-16T21:05:49.659Z (3 months ago)
- Topics: dotenv, golang
- Language: Go
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
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 mainimport (
"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
}
```