/go-hocon

HOCON parser for Golang

Primary LanguageGo

HOCON configuration for Golang :: Build Status

The basic implementation of HOCON for Golang, using ANTLR grammar derived from JSON.

Usage example

package main

import (
    "github.com/jdevelop/go-hocon"
    "fmt"
    )

func main() {
	res, _ := hocon.ParseHoconFile("reference.conf")
	
	res.GetString("akka.persistence.view.auto-update")
	res.GetString("akka.persistence.view.auto-update-replay-max")
	res.GetInt("akka.persistence.view.auto-update-replay-min")

	obj := res.GetObject("akka.persistence.snapshot-store.proxy")
	obj.GetString("init-timeout")
}