Popularity
0.8
Growing
Activity
0.0
-
3
1
2

Description

Go Simple config is an open source configuration lib for storing and accessing configuration data with minimal dependencies

Programming language: Go
License: Apache License 2.0
Tags: Utilities     Configuration     Golang    

go-simple-config alternatives and similar packages

Based on the "Configuration" category.
Alternatively, view go-simple-config alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of go-simple-config or a related project?

Add another 'Configuration' Package

README

Go Report Card License Gitter

go-simple-config

Go Simple config is an open source configuration lib for storing and accessing configuration data with minimal dependencies

Installation

go get github.com/chen-keinan/go-simple-config

Supported configuration files:

  • yaml
  • json
  • properties
  • environment variables
  • ini

Usage

json config example:

{
  "SERVER": {
    "host": "127.0.0.1",
    "port": "8080"
}

yaml config example:

---
SERVER:
  host: 127.0.0.1
  port: '8080'

properties config example:

SERVER.host=127.0.0.1
SERVER.port=8080

env. variable config example:

export SERVER_HOST="127.0.0.1"
export SERVER_PORT="8080"

code example :

func readConfig() error{
    c := New()
    err := c.Load("config.json")

    if err != nil {
       return err
     }   

    fmt.Print(c.GetStringValue("SERVER.host"))
}


*Note that all licence references and agreements mentioned in the go-simple-config README section above are relevant to that project's source code only.