Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/isayme/go-config


https://github.com/isayme/go-config

Last synced: 12 days ago
JSON representation

Awesome Lists containing this project

README

        

## Config
Simple configure loader

## Features
- support json/yaml
- default config path from env `CONF_FILE_PATH`;

## Example
```
package conf

import "github.com/isayme/go-config"

type Config struct {
Addr string `json:"addr" yaml:"addr"`
}

var cfg Config

func Get() *Config {
config.Parse(&cfg)

return &cfg
}
```